lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 20/39] tick: nohz: Rework next timer evaluation
On Thu, 16 Apr 2015, Paul E. McKenney wrote:
> > @@ -1508,11 +1509,12 @@ int rcu_needs_cpu(unsigned long *dj)
> >
> > /* Request timer delay depending on laziness, and round. */
> > if (!rdtp->all_lazy) {
> > - *dj = round_up(rcu_idle_gp_delay + jiffies,
> > + dj = round_up(rcu_idle_gp_delay + jiffies,
> > rcu_idle_gp_delay) - jiffies;
> > } else {
> > - *dj = round_jiffies(rcu_idle_lazy_gp_delay + jiffies) - jiffies;
> > + dj = round_jiffies(rcu_idle_lazy_gp_delay + jiffies) - jiffies;
> > }
> > + *nextevt = basemono + dj * TICK_NSEC;
>
> The multiply would have been a problem back in the day, but should
> be just fine on modern hardware. I suppose that slow hardware could
> compensate by having the scheduling-clock period be an exact power of
> two worth of nanoseconds.

I don't think the extra multiply matters much. round_up() and
round_jiffies() are way more expensive ...

> > #ifdef CONFIG_NO_HZ_FULL
> > + /* Limit the tick delta to the maximum scheduler deferment */
> > if (!ts->inidle)
> > - time_delta = min(time_delta, scheduler_tick_max_deferment());
> > + delta = min(time_delta, scheduler_tick_max_deferment());
>
> s/time_delta/delta/?

Doh, yes.

Btw. Could you please trim your replies? It's hard to find the single
line comment when forced to scroll down several pages.

Thanks,

tglx


\
 
 \ /
  Last update: 2015-04-21 14:41    [W:0.141 / U:27.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site