RFC: fault-injection capabilities (v2)
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 6 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | fault-injection capabilities infrastructureinclude/ lib/ lib/ +1 more | +132 | 1 reply | |
| 2/6 | fault-injection capability for kmalloc.include/ lib/ mm/ | +32 | 0 replies | |
| 3/6 | fault-injection capability for alloc_pages()include/ lib/ mm/ | +32 | 3 replies | |
| 4/6 | fault-injection capability for disk IOblock/ block/ fs/ +3 more | +105 | 0 replies | |
| 5/6 | debugfs entries for configurationlib/ lib/ lib/ | +177 | 0 replies | |
| 6/6 | process filtering for fault-injection capabilitiesfs/ include/ include/ +2 more | +101 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/6] RFC: fault-injection capabilities (v2)
Changes from last version
- use lightweight random simulator instead of get_random_int()
- added per queue filter for disk IO failures (/sys/blocks/sda/sda1/make-it-fail, /sys/blocks/sda/make-it-fail)
- added process filter (/debug/{failslab,fail_page_alloc,fail_make_request}/process-filter, /proc/<pid>/make-it-fail)
---
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.
/debug/failslab/process-filter
enable process filter.
5. see what really happens.