All of lore.kernel.org
 help / color / mirror / Atom feed
* Questions on semaphores
@ 2002-09-04 21:29 Juan M. de la Torre
  2002-09-04 22:21 ` Bob Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Juan M. de la Torre @ 2002-09-04 21:29 UTC (permalink / raw)
  To: linux-kernel


 Hi people, I have two question regarding the i386 semaphore implementation
 in kernel 2.4.19. 
 
 Please dont blame me if they are too obvius; i'm a newbie in kernel hacking
 :)

 The functions __down, __down_interruptible and __down_trylock (defined
 in arch/i386/kernel/semaphore.c) use the global spinlock
 'semaphore_lock' to access some fields of the semaphore they are
 working on:
 
 1) Is there any reason to do this?
 2) Wouldn't it be more scalable to use a per-semaphore lock instead a
    global spinlock?

 The function __down_trylock try to get the spinlock using
 spin_lock_irqsave, instead of using spin_lock_irq:

 1) why? :)

 Thanks in advance,
 Juanma

-- 
/jm


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-09-04 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-04 21:29 Questions on semaphores Juan M. de la Torre
2002-09-04 22:21 ` Bob Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.