lkml.org 
[lkml]   [2009]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] set_mempolicy(MPOL_INTERLEAV) cause kernel panic
On Mon, 27 Jul 2009 10:55:47 -0700 (PDT)
David Rientjes <rientjes@google.com> wrote:

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

> The nodemask for each task is updated to reflect the removal of a node and
> it calls mpol_rebind_mm() with the new nodemask.
>
yes, but _not_ updated at online.

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

What I felt at reading cpuset/mempolicy again is that it's too complex ;)
The 1st question is why mems_allowed which can be 1024bytes when max_node=4096
is copied per tasks....
And mempolicy code uses too much nodemask_t on stack.
I'll try some, today, including this bug-fix.

Thanks,
-Kame








\
 
 \ /
  Last update: 2009-07-28 02:03    [W:0.116 / U:0.136 seconds]
©2003-2011 Jasper Spaans. Advertise on this site