lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Nov 2006 12:02:34 -0800
From:	"Paul E. McKenney" <paulmck@...ibm.com>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>,
	linux-kernel@...r.kernel.org, ego@...ibm.com
Subject: Re: New filesystem for Linux

On Thu, Nov 02, 2006 at 03:15:33PM -0800, Linus Torvalds wrote:
> 
> 
> On Thu, 2 Nov 2006, Mikulas Patocka wrote:
> > 
> > * There is a rw semaphore that is locked for read for nearly all operations
> > and locked for write only rarely. However locking for read causes cache line
> > pingpong on SMP systems. Do you have an idea how to make it better?

[ . . . ]

> (Seqlocks could be changed to drop the first requirement, although it 
> could cause some serious starvation issues, so I'm not sure it's a good 
> idea. For RCU the atomic nature is pretty much designed-in.)

I can't help putting in a plug for SRCU, which is in the 2.6.19-rc series,
and which allows readers to sleep.  (http://lwn.net/Articles/202847/)

SRCU allows readers and writers to run concurrently (as do all forms of
RCU).  If this is a problem, it might be worth looking into Gautham
Shenoy's reader-writer lock built on top of RCU.  (A version for hotplug
may be found at http://lkml.org/lkml/2006/10/26/73.)  This approach
keeps the reader-writer-lock semantics, but gets rid of cache thrashing.
That said, writers have to wait for a grace period.

And as Linus pointed out, if you have disk I/O involved, you probably
won't notice normal reader-writer-lock overhead.

							Thanx, Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ