]> err.no Git - linux-2.6/commit
[PATCH] convert sighand_cache to use SLAB_DESTROY_BY_RCU
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 29 Mar 2006 00:11:12 +0000 (16:11 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 29 Mar 2006 02:36:42 +0000 (18:36 -0800)
commitaa1757f90bea3f598b6e5d04d922a6a60200f1da
tree4f8f3804b2595031d0b84de7086dc28375290f0d
parent1f09f9749cdde4e69f95d62d96d2e03f50b3353c
[PATCH] convert sighand_cache to use SLAB_DESTROY_BY_RCU

This patch borrows a clever Hugh's 'struct anon_vma' trick.

Without tasklist_lock held we can't trust task->sighand until we locked it
and re-checked that it is still the same.

But this means we don't need to defer 'kmem_cache_free(sighand)'.  We can
return the memory to slab immediately, all we need is to be sure that
sighand->siglock can't dissapear inside rcu protected section.

To do so we need to initialize ->siglock inside ctor function,
SLAB_DESTROY_BY_RCU does the rest.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/exec.c
include/linux/sched.h
kernel/fork.c
kernel/signal.c