Re: Terminate process that fails on a constrained allocation V3

From: Andi Kleen
Date: Thu Feb 09 2006 - 15:03:18 EST


On Thursday 09 February 2006 20:53, Christoph Lameter wrote:
> Changes V2->V3:
>
> - Do the killing of the current process following the execution
> procedure already established by the OOM killer.
>
> - Do not return NULL and therefore do not change the return values of
> __alloc_pages.

Hmm, to make this work well i guess mmap() would need to be changed
to take the policy into account when doing the !MAP_NORESERVE checking
when the kernel runs in strict no overcommit mode.
Otherwise there is no fool proof way an application can prevent getting killed.
And mbind() would need to recompute it and fail if the new policy's possible
allocation are not guaranteed to work.

Doing this all properly would probably get quite messy.

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