aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2010-02-26 01:36:12 -0500
committerPekka Enberg <penberg@cs.helsinki.fi>2010-02-26 12:19:39 -0500
commit4c13dd3b48fcb6fbe44f241eb11a057ecd1cba75 (patch)
treed9875477b9eb48ad598da8cbc36b473c941828ae /mm/slab.c
parent60b341b778cc2929df16c0a504c91621b3c6a4ad (diff)
failslab: add ability to filter slab caches
This patch allow to inject faults only for specific slabs. In order to preserve default behavior cache filter is off by default (all caches are faulty). One may define specific set of slabs like this: # mark skbuff_head_cache as faulty echo 1 > /sys/kernel/slab/skbuff_head_cache/failslab # Turn on cache filter (off by default) echo 1 > /sys/kernel/debug/failslab/cache-filter # Turn on fault injection echo 1 > /sys/kernel/debug/failslab/times echo 1 > /sys/kernel/debug/failslab/probability Acked-by: David Rientjes <rientjes@google.com> Acked-by: Akinobu Mita <akinobu.mita@gmail.com> Acked-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 7451bdacaf18..33496b704859 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3101,7 +3101,7 @@ static bool slab_should_failslab(struct kmem_cache *cachep, gfp_t flags)
3101 if (cachep == &cache_cache) 3101 if (cachep == &cache_cache)
3102 return false; 3102 return false;
3103 3103
3104 return should_failslab(obj_size(cachep), flags); 3104 return should_failslab(obj_size(cachep), flags, cachep->flags);
3105} 3105}
3106 3106
3107static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags) 3107static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)