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:	Mon, 05 May 2014 20:06:06 +0200
From:	Denys Vlasenko <dvlasenk@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
CC:	linux-kernel@...r.kernel.org,
	Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
	Fernando Luis Vazquez Cao <fernando_b1@....ntt.co.jp>,
	Tetsuo Handa <penguin-kernel@...ove.SAKURA.ne.jp>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Oleg Nesterov <oleg@...hat.com>
Subject: Re: [PATCH 4/4] nohz: Fix iowait overcounting if iowait task migrates

On 04/29/2014 04:47 PM, Frederic Weisbecker wrote:
> On Thu, Apr 24, 2014 at 08:45:58PM +0200, Denys Vlasenko wrote:
>> +void tick_nohz_iowait_to_idle(int cpu)
>> +{
>> +	struct tick_sched *ts = tick_get_tick_sched(cpu);
>> +	ktime_t now = ktime_get();
>> +
>> +	write_seqcount_begin(&ts->idle_sleeptime_seq);
>> +	ts->iowait_exittime = now;
>> +	write_seqcount_end(&ts->idle_sleeptime_seq);
> 
> So now you have two concurrent updaters using the seqcount, which is
> very dangerous as the counters aren't updated atomically.
> 
> seqcount is only suitable when there is a single sequential updater.
> Once you deal with concurrent updaters you need seqlock.
> 
> And once you add seqlock in the hot scheduler path, you're hitting
> a big scalability issue.

What I need here is merely an atomic store.
The complication is, of course, that, ktime_t is not atomic[64]_t.

How do you think I can do an atomic store?


--
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