]> git.hungrycats.org Git - linux/commit
[PATCH] 2.5.25 remove global semaphore_lock spin lock.
authorBob Miller <rem@osdl.org>
Sun, 14 Jul 2002 10:36:55 +0000 (03:36 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 14 Jul 2002 10:36:55 +0000 (03:36 -0700)
commit72785ef74af0ec8afc1c344981ca9ba609796f5d
treea34322490491917840e0dcbd473953b2cc839040
parent5150c802ecfb2e2779cb96296399d25ad6e33e4a
[PATCH] 2.5.25 remove global semaphore_lock spin lock.

Replace the global semaphore_lock with the spinlock embedded in
the wait_queue_head_t.  None of the data protected by semaphore_lock
is global and there is no need to restrict the system to only allow
one semaphore to be dealt with at a time.

This removes 2 lock round trips from __down() and __down_interruptible().
It also reduces the number of cache lines touched by 1 (the cache line
with seamphore_lock).
arch/i386/kernel/semaphore.c
include/linux/sched.h
kernel/sched.c