[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0907271047590.8408@chino.kir.corp.google.com>
Date: Mon, 27 Jul 2009 10:55:47 -0700 (PDT)
From: David Rientjes <rientjes@...gle.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
cc: Andrew Morton <akpm@...ux-foundation.org>,
Lee Schermerhorn <lee.schermerhorn@...com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
miaox@...fujitsu.com, Ingo Molnar <mingo@...e.hu>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Christoph Lameter <cl@...ux-foundation.org>,
Paul Menage <menage@...gle.com>,
Nick Piggin <nickpiggin@...oo.com.au>, y-goto@...fujitsu.com,
Pekka Enberg <penberg@...helsinki.fi>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [BUG] set_mempolicy(MPOL_INTERLEAV) cause kernel panic
On Sat, 25 Jul 2009, KAMEZAWA Hiroyuki wrote:
> _Direct_ use of task->mems_allowed is only in cpuset and mempolicy.
> If no policy is used, it's not checked.
> (See alloc_pages_current())
>
> memory hotplug's notifier just updates top_cpuset's mems_allowed.
> But it doesn't update each task's ones.
That's not true, cpuset_track_online_nodes() will call
scan_for_empty_cpusets() on top_cpuset, which works from the root to
leaves updating each cpuset's mems_allowed by intersecting it with
node_states[N_HIGH_MEMORY]. This is done as part of the MEM_OFFLINE
callback in the cpuset code, so N_HIGH_MEMORY represents the nodes still
online.
The nodemask for each task is updated to reflect the removal of a node and
it calls mpol_rebind_mm() with the new nodemask.
This is admittedly pretty late to be removing mems from cpusets (and
mempolicies) when the unplug has already happened. We should look at
doing the rebind for MEM_GOING_OFFLINE.
--
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