Re: spinlocking between user context / tasklet / tophalf question

From: Robert Love (rml@tech9.net)
Date: Fri Apr 26 2002 - 14:19:35 EST


On Fri, 2002-04-26 at 04:52, Emmanuel Michon wrote:

> 1. Should I use spin_lock(&Y_lock); or spin_lock_bh(&Y_lock); in the tasklet
> body?

You would want to use spin_lock_bh to serialize against other softirqs.
That does not seem to be a need, here.

> 2. What is the reality behind: ``things which sleep'', is it really a problem
> to use copy_from_user/copy_to_user holding a spinlock?

Yes, they sleep.

        Robert Love

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



This archive was generated by hypermail 2b29 : Tue Apr 30 2002 - 22:00:13 EST