Re: semaphore => spinlock in {get|put}name

Andi Kleen (ak@muc.de)
09 Mar 1998 15:10:44 +0100


Jakub Jelinek <jj@sunsite.ms.mff.cuni.cz> writes:

> Hi!
>
> Is there any reason why do we use an expensive semaphore instead of a cheap
> spinlock?

I think the reason is that get_free_page(GFP_KERNEL) may sleep, also a spin
lock is a nop on UP (and UP needs it too because of the sleep).

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu