lkml.org 
[lkml]   [2006]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2006-10-12 23:43    [W:0.059 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site