lkml.org 
[lkml]   [2021]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched/fair: Rate limit calls to update_blocked_averages() for NOHZ
On 05/11/21 10:25, Tim Chen wrote:
> > update_next_balance() is only used in newidle_balance() so we could
> > modify it to have:
> >
> > next = max(jiffies+1, next = sd->last_balance + interval)
>
> Is the extra assignment "next = sd->last_balance + interval" needed?
> This seems more straight forward:
>
> next = max(jiffies+1, sd->last_balance + interval)

I haven't been following the whole conversation closely, but it's always
interesting when manipulating time in non time_*() functions.

Is this max() safe against wrapping?

Thanks

--
Qais Yousef

\
 
 \ /
  Last update: 2021-05-12 16:00    [W:0.106 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site