Messages in this thread | | | Date | Fri, 27 Jan 2023 12:44:23 +0100 | From | Peter Zijlstra <> | Subject | Re: [bug-report] possible s64 overflow in max_vruntime() |
| |
On Thu, Jan 26, 2023 at 07:31:02PM +0100, Roman Kagan wrote:
> > All that only matters for small sleeps anyway. > > > > Something like: > > > > sleep_time = U64_MAX; > > if (se->avg.last_update_time) > > sleep_time = cfs_rq_clock_pelt(cfs_rq) - se->avg.last_update_time; > > Interesting, why not rq_clock_task(rq_of(cfs_rq)) - se->exec_start, as > others were suggesting? It appears to better match the notion of sleep > wall-time, no?
Should also work I suppose. cfs_rq_clock takes throttling into account, but that should hopefully also not be *that* long, so either should work.
| |