[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1203021540040.18377@chino.kir.corp.google.com>
Date: Fri, 2 Mar 2012 15:47:17 -0800 (PST)
From: David Rientjes <rientjes@...gle.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
cc: Mel Gorman <mgorman@...e.de>, Christoph Lameter <cl@...ux.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Miao Xie <miaox@...fujitsu.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpuset: mm: Remove memory barrier damage from the page
allocator
On Fri, 2 Mar 2012, Peter Zijlstra wrote:
> Also, for the write side it doesn't really matter, changing mems_allowed
> should be rare and is an 'expensive' operation anyway.
>
It's very expensive even without memory barriers since the page allocator
wraps itself in {get,put}_mems_allowed() until a page or NULL is returned
and an update to current's set of allowed mems can stall indefinitely
trying to change the nodemask during this time. The thread changing
cpuset.mems is holding cgroup_mutex the entire time which locks out
changes, including adding additional nodes to current's set of allowed
mems. If direct reclaim takes a long time or an oom killed task fails to
exit quickly (or the allocation is __GFP_NOFAIL and we just spin
indefinitely holding get_mems_allowed()), then it's not uncommon to see a
write to cpuset.mems taking minutes while holding the mutex, if it ever
actually returns at all.
--
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