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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]