lkml.org 
[lkml]   [1999]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch] shm bug introduced with pagecache in 2.3.11


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/

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