On Thu, 12 Oct 2006 16:43:09 +0900
Akinobu Mita <[email protected]> wrote:
> @@ -1058,6 +1097,9 @@ __alloc_pages(gfp_t gfp_mask, unsigned i
>
> might_sleep_if(wait);
>
> + if (should_fail_alloc_page(gfp_mask, order))
> + return NULL;
In previous work I've done on this I've found that allowing
application-initiated allocations to fail is a right pain: all of userspace
gets all unreliable and applications die all the time.
I realise that it's possible to limit the failures to a particular process,
but it's also possible to let the allocations fail for _all_ processes, in
which case this problem will hurt.
What I found was a reasonable fix for this problem was to limit the
failures to those requests which did not have __GFP_HIGHMEM set. That way,
userspace allocations work, but kernel-internal allocations are subject to
failures.
That might be worth adding as an additional tunable?
-
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]