[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-kernel
Subject: Re: [Patch] shm bug introduced with pagecache in 2.3.11
From: Linus Torvalds <torvalds () transmeta ! com>
Date: 1999-11-19 20:29:03
[Download RAW message or body]
On Fri, 19 Nov 1999, Alexander Viro wrote:
> On Fri, 19 Nov 1999, Linus Torvalds wrote:
>
> > Is anybody willing to take a stab at creating a read-write semaphore?
>
> Do you want readers' and writers' waitqueues share the spinlock?
I would go for something very similar to the current semaphore
implementation - one global spinlock for all rw-semaphores, and only if
that actually becomes a real contention point do we try to be more clever
(starting with moving it to a per-semaphore thing, and only as a last
thing doing separate wait-queues with separate spinlocks).
I doubt you'll get much contention. The current semaphores get very little
contention - the test-case that triggered this discussion in the first
place is probably the worst one by far, and that test-case will have no
contention at all with the read-write version because 99% of everything is
just readers.
The holy grail is "Make it as simple as possible. And no simpler"
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic