lkml.org 
[lkml]   [1998]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: semaphore => spinlock in {get|put}name
From
Date
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

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.035 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site