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:	Thu, 12 Jan 2012 17:13:32 +0200
From:	Gilad Ben-Yossef <gilad@...yossef.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Mel Gorman <mgorman@...e.de>, Linux-MM <linux-mm@...ck.org>,
	Linux-FSDevel <linux-fsdevel@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	Russell King - ARM Linux <linux@....linux.org.uk>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Miklos Szeredi <mszeredi@...ell.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Greg KH <gregkh@...e.de>, Gong Chen <gong.chen@...el.com>
Subject: Re: [PATCH 2/2] mm: page allocator: Do not drain per-cpu lists via
 IPI from page allocator context

On Thu, Jan 12, 2012 at 5:08 PM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Thu, 2012-01-12 at 16:51 +0200, Gilad Ben-Yossef wrote:
>> What I can't figure out is why we don't need  get/put_online_cpus()
>> pair around each and every call
>> to on_each_cpu everywhere? and if we do, perhaps making it a part of
>> on_each_cpu is the way to go?
>>
>> Something like:
>>
>> diff --git a/kernel/smp.c b/kernel/smp.c
>> index f66a1b2..cfa3882 100644
>> --- a/kernel/smp.c
>> +++ b/kernel/smp.c
>> @@ -691,11 +691,15 @@ void on_each_cpu(void (*func) (void *info), void
>> *info, int wait)
>>  {
>>         unsigned long flags;
>>
>> +       BUG_ON(in_atomic());
>> +
>> +       get_online_cpus();
>>         preempt_disable();
>
> Your preempt_disable() here serializes against hotplug..

I'm probably daft, but why didn't it work for the page allocator then?

Mel's description reads: "Part of the problem is the page allocator is
sending IPIs using
on_each_cpu() without calling get_online_cpus() to prevent changes
to the online cpumask."

on_each_cpu() disables preemption in master as well...

Gilad




Thanks,
Gilad

-- 
Gilad Ben-Yossef
Chief Coffee Drinker
gilad@...yossef.com
Israel Cell: +972-52-8260388
US Cell: +1-973-8260388
http://benyossef.com

"Unfortunately, cache misses are an equal opportunity pain provider."
-- Mike Galbraith, LKML
--
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