lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.11.1504211353590.13914@nanos>
Date:	Tue, 21 Apr 2015 14:04:41 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Marcelo Tosatti <mtosatt@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Josh Triplett <josh@...htriplett.org>,
	Lai Jiangshan <laijs@...fujitsu.com>,
	John Stultz <john.stultz@...aro.org>,
	Marcelo Tosatti <mtosatti@...hat.com>
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ