Re: [PATCH] convert sighand_cache to use SLAB_DESTROY_BY_RCU

From: Hugh Dickins
Date: Fri Feb 17 2006 - 14:24:59 EST


On Fri, 17 Feb 2006, Oleg Nesterov wrote:
> 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.

Yes, that looks a good use of SLAB_DESTROY_BY_RCU to me: thanks!

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/