lkml.org 
[lkml]   [2023]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2023-03-26 23:58    [W:0.623 / U:0.832 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site