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: <20140415084944.GK13658@twins.programming.kicks-ass.net>
Date:	Tue, 15 Apr 2014 10:49:44 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>
Cc:	linux-kernel@...r.kernel.org,
	Fernando Luis Vazquez Cao <fernando_b1@....ntt.co.jp>,
	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Preeti U Murthy <preeti@...ux.vnet.ibm.com>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	stable@...r.kernel.org
Subject: Re: [PATCH 1/2] nohz: stop updating sleep stats from
 get_cpu_{idle,iowait}_time_us()

On Tue, Apr 15, 2014 at 10:48:54AM +0200, Peter Zijlstra wrote:
> On Thu, Apr 10, 2014 at 06:11:03PM +0900, Hidetoshi Seto wrote:
> > -	if (ts->idle_active) {
> > -		delta = ktime_sub(now, ts->idle_entrytime);
> > -		if (nr_iowait_cpu(cpu) > 0)
> > -			ts->iowait_sleeptime = ktime_add(ts->iowait_sleeptime, delta);
> > -		else
> > -			ts->idle_sleeptime = ktime_add(ts->idle_sleeptime, delta);
> > -		ts->idle_entrytime = now;
> > -	}
> > -
> > -	if (last_update_time)
> > -		*last_update_time = ktime_to_us(now);
> > -
> > -}
> > -
> > -static void tick_nohz_stop_idle(struct tick_sched *ts, ktime_t now)
> > -{
> > -	update_ts_time_stats(smp_processor_id(), ts, now, NULL);
> > +	/* Updates the per cpu time idle statistics counters */
> > +	delta = ktime_sub(now, ts->idle_entrytime);
> > +	if (nr_iowait_cpu(smp_processor_id()) > 0)
> 
> Now I know the old code also uses nr_iowait_cpu(), but that function is
> crackbrained. This cannot possibly be right.
> 
> Anything using nr_iowait_cpu() is broken beyond repair.

Argh, still need to wake up.. so it uses the old rq to decrement
against.

never mind, I'll go stare at it more
--
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