Re: [rfc][patch] Avoid taking global tasklist_lock for single threadedprocess at getrusage()

From: Oleg Nesterov
Date: Thu Mar 23 2006 - 13:18:41 EST


Ravikiran G Thirumalai wrote:
>
> __exit_signal
> cleanup_sighand(tsk);
> kmem_cache_free(sighand)
> spin_unlock(sighand->lock)
>
> It looked suspicious to me until I realised sighand cache now had
> SLAB_DESTROY_BY_RCU. Can we please add comments (at cleanup_sighand or
> __exit_signal) to make it a bit clearer for people like me :)

Yes, this is really confusing, see also
http://marc.theaimsgroup.com/?l=linux-kernel&m=114089590923893
I'll send a cleanup patch soon.

> How is the following patch to avoid tasklist lock completely at getrusage?

I think this patch is correct, thanks.

Oleg.
-
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/