Messages in this thread | | | Date | Thu, 12 Oct 2006 14:40:42 -0700 | From | Andrew Morton <> | Subject | Re: [patch 4/7] fault-injection capability for alloc_pages() |
| |
On Thu, 12 Oct 2006 16:43:09 +0900 Akinobu Mita <akinobu.mita@gmail.com> 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 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/
| |