Skip to content

RFC: fault-injection capabilities

Akinobu Mita lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5fail-injection libraryinclude/linux/should_fail.h lib/Kconfig.debug lib/Makefile +1 more+118 -01 reply
2/5fail-injection capability for kmalloc.include/linux/should_fail.h lib/Kconfig.debug mm/slab.c+31 -00 replies
3/5fail-injection capability for alloc_pages()include/linux/should_fail.h lib/Kconfig.debug mm/page_alloc.c+31 -00 replies
4/5fail-injection capability for disk IOblock/ll_rw_blk.c include/linux/should_fail.h lib/Kconfig.debug+30 -010 replies
5/5debugfs entries for configurationlib/Kconfig.debug lib/Makefile lib/should_fail_knobs.c+177 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/5] RFC: fault-injection capabilities

This patch set provides some fault-injection capabilities.

- kmalloc failures

- alloc_pages() failures

- disk IO errors

We can see what really happens if those failures happen.

In order to enable these fault-injection capabilities:

1. Enable relevant config options (CONFIG_FAILSLAB, CONFIG_PAGE_ALLOC, CONFIG_MAKE_REQUEST) and runtime configuration kernel module (CONFIG_SHOULD_FAIL_KNOBS)

2. build and boot with this kernel

3. modprobe should_fail_knob

4. configure fault-injection capabilities behavior by debugfs

For example about kmalloc failures:

/debug/failslab/probability

specifies how often it should fail in percent.

/debug/failslab/interval

specifies the interval of failures.

/debug/failslab/times

specifies how many times failures may happen at most.

/debug/failslab/space

specifies the size of free space where memory can be allocated safely in bytes.

5. see what really happens.

The idea is taken from failmalloc (http://www.nongnu.org/failmalloc/).
Andrew Morton gave me interesting suggestions.

--