lkml.org 
[lkml]   [2007]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] cpusets: do not allow TIF_MEMDIE tasks to allocate globally
On Tue, 5 Jun 2007, Paul Jackson wrote:

> Well, I can't speak to the 'real' meaning of TIF_MEMDIE with authority,
> but I can speak to the meaning of cpuset flags.
>
> The mem_exclusive flag doesn't mean this.
>
> It means that you cannot overlap the memory of a sibling cpuset.
>

Which, with this patch, we will respect for tasks marked TIF_MEMDIE as
well.

> You will, necessarily, still overlap the memory of your ancestor cpusets.
>

And that's what nearest_exclusive_ancestor() determines later on if we're
not requesting GFP_HARDWALL.

> Whether or not you make any use of the mem_exclusive flag, you still
> get the same (limited) guarantees of memory usage -- namely that your
> memory won't be used by tasks in non-overlapping cpusets, with some
> exceptions, such as:
> 1) memory handed out to interrupt code,
> 2) memory handed out for GFP_ATOMIC requests, and
> 3) tasks marked PF_EXITING -- will soon free up memory
>

This is precisely the point: we already respect PF_EXITING tasks with
their ability to allocate outside their own cpuset. That gets set in
do_exit() when a task is in receipt of the SIGKILL from the OOM killer
during the exit path. Between these time periods (the time when we issue
the OOM SIGKILL and the time we're marked PF_EXITING in do_exit()), we
should not allow allocations outside of our cpuset because we do not yet
have the guarantee that they will exit synchronously or reliably.

> Tasks in cpusets ancestor to your tasks cpuset can always, easily,
> use memory on the same nodes your task is on.
>

Sure, that behavior is unchanged. We're relying on
nearest_exclusive_ancestor() to determine if such nodes overlap.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-06 03:21    [W:0.073 / U:2.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site