lkml.org 
[lkml]   [2007]   [Jun]   [6]   [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 Wed, 6 Jun 2007, Peter Zijlstra wrote:

> Right, I see your point; however considering that its a system
> allocation, and all these constraints get violated by interrupts anyway,
> its more of an application container than a strict allocation container.
>

It is not necessarily system allocations at all. It is quite possible, as
described earlier, to mlock a large quantity of memory that exceeds the
capacity of all nodes in a task's mems_allowed and then when this task
OOM's to continue allocating memory in get_user_pages() but with the
TIF_MEMDIE exception that allows it to allocate anywhere. Then other
cpusets get their memory infringed upon and they can OOM themselves even
though there was no preexisting memory pressure. This happens before we
return to userspace in the mlock() and thus we cannot properly handle the
SIGKILL sent down from the OOM killer.

> Are you actually seeing the described behaviour, or just being pedantic
> (nothing wrong with that per-se)?
>

Yes, as described above. An exclusive cpuset containing only root,
system-critical tasks was OOM'd when it was not under any memory pressure
at all because a separate exclusive cpuset mlock'd a gigantic amount of
memory and it could not reliably exit because the mlock continued to
allocate outside its own cpuset and eventually OOM'd system-critical tasks
or depleated all system memory. True story.

At the least, if this patch is not agreed upon, I would suggest adding
sanity checks against gfp_mask in cpuset_zone_allowed() to ensure we
should allow the allocation in TIF_MEMDIE circumstances to avoid the above
scenario.

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 09:21    [W:0.104 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site