From: Oleg Nesterov Date: Wed, 29 Mar 2006 00:11:12 +0000 (-0800) Subject: [PATCH] convert sighand_cache to use SLAB_DESTROY_BY_RCU X-Git-Tag: v2.6.17-rc1~189 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa1757f90bea3f598b6e5d04d922a6a60200f1da;p=pandora-kernel.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed