lkml.org 
[lkml]   [1998]   [Mar]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromJakub Jelinek <>
SubjectRe: semaphore => spinlock in {get|put}name
DateMon, 9 Mar 1998 15:24:55 +0100 (MET)
> 
> 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). 

But what I did in the patch was to move get_free_page out of the guarded
area... Once we find out we need to get_free_page, we won't touch any shared
variable, so we don't need to stay protected by the semaphore/spinlock...

Cheers,
    Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.1.89 on a sparc64 machine (498.80 BogoMips).
___________________________________________________________________
-
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 12:41    [from the cache]
©2003-2008