答复: [外部邮件] Re: [PATCH] sched/cputime: Fix a mostly theoretical divide by zero

From: Li,Rongqing
Date: Tue Jun 17 2025 - 02:38:30 EST


> Theoretical is the right word; If all 2^32 possible threads belong to the process,
> we can get an overflow to 0 after ~4sec run time of each thread. But then how
> long will it take to have those 2^32 threads run 4sec on a system ...
>
> It would be good to get number to show how realistic or not it could be to
> reach this value
>
>

The 2^64 ns is 584 years, if a process with 1000 busy polling threads is running in a machine with more than 1000 CPUs, the runtime will overflow about half year

Thank
-LI