Re: [PATCH] failslab - failmalloc for slab allocator

From: Andrew Morton
Date: Sun Aug 13 2006 - 15:14:44 EST


On Sun, 13 Aug 2006 18:22:19 +0800
Akinobu Mita <mita@xxxxxxxxxxxxxxxx> wrote:

> This patch is not intended for inclusion. But I could find
> several interesting crashes.
>
> The idea behind failslab is to demonstrate what really happens if
> slab allocation fails. The idea of failslab is completely taken
> from failmalloc (http://www.nongnu.org/failmalloc/).
>
> boot option:
>
> failslab=<probability>,<interval>,<times>,<space>
>
> <probability>
> specifies how often it should fail in percent.
> <interval>
> specifies the interval of failures.
> <times>
> specifies how many times failures may happen at most.
> <space>
> specifies the size of free space where memory can be allocated
> safely in bytes.
>
> examples:
>
> failslab=100,10,-1,0
>
> slab allocation (kmalloc, kmem_cache_alloc,..) fails once per 10 times.

We would benefit from having some faul-injection capabilities in the
mainline kernel.

- kmalloc failures

- alloc_pages() failures

- disk IO errors (there are rumours of a DM module for this, but I
haven't seen it).

They would need to be lightweight, clean and enabled/configured at runtime,
not at boot time.

This would end up being a fairly complex project.
-
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/