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]
Date:	Tue, 19 Apr 2016 09:01:00 +0900
From:	Byungchul Park <byungchul.park@....com>
To:	Frederic Weisbecker <fweisbec@...il.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Chris Metcalf <cmetcalf@...hip.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Luiz Capitulino <lcapitulino@...hat.com>,
	Christoph Lameter <cl@...ux.com>,
	"Paul E . McKenney" <paulmck@...ux.vnet.ibm.com>,
	Mike Galbraith <efault@....de>, Rik van Riel <riel@...hat.com>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 2/3] sched: Correctly handle nohz ticks cpu load
 accounting

On Mon, Apr 18, 2016 at 03:35:06PM +0200, Frederic Weisbecker wrote:
> On Mon, Apr 18, 2016 at 06:17:21PM +0900, Byungchul Park wrote:
> > On Wed, Apr 13, 2016 at 03:56:51PM +0200, Frederic Weisbecker wrote:
> > > @@ -4645,11 +4674,11 @@ void cpu_load_update_nohz(int active)
> > >  void cpu_load_update_active(struct rq *this_rq)
> > >  {
> > >  	unsigned long load = weighted_cpuload(cpu_of(this_rq));
> > > -	/*
> > > -	 * See the mess around cpu_load_update_idle() / cpu_load_update_nohz().
> > > -	 */
> > > -	this_rq->last_load_update_tick = jiffies;
> > > -	__cpu_load_update(this_rq, load, 1, 1);
> > > +
> > > +	if (tick_nohz_tick_stopped())
> > > +		cpu_load_update_nohz(this_rq, READ_ONCE(jiffies), load);
> > > +	else
> > > +		cpu_load_update_periodic(this_rq, load);
> > 
> > Considering it further, I wonder if needing it.
> > (Sorry if I missed something.)
> > 
> > Case 1. tickless -> (scheduler_tick) -> tickless
> > 
> > 	I am not sure for this case if the rq's load can be changed or not,
> > 	especially, if the rq's load can be changed *at this point*.
> > 	Please remind that the load[0] is set here.
> 
> load[0] won't change because it's set by cpu_load_update_nohz_start().
> But all the other load[idx] need to be decayed further.

Ah. Right. Sched tick will be handled even in the case 1...

I like your patches. But I am still wondering if the sched tick handling is
necessary even in the case 1. Of course it's another problem though.

Thanks anyway,
Byungchul

> 
> > 
> > Case 2. tickless -> (scheduler_tick) -> restart tick
> > 
> > 	Will be done by the tick restart routine when exiting irq.
> > 	-> no problem.
> > 
> > Case 3. tick -> (scheduler_tick) -> tickless
> > 
> > 	Same as before.
> > 	-> no problem.
> > 
> > Case 4. tick -> (scheduler_tick) -> tick
> > 
> > 	We can rely on regular schedule_tick().
> > 	-> no problem.
> > 
> 
> Thanks for your review!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ