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:	Sat, 26 Apr 2008 15:39:13 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Daniel Walker <dwalker@...sta.com>,
	Matthew Wilcox <matthew@....cx>, linux-kernel@...r.kernel.org,
	Stephen Rothwell <sfr@...b.auug.org.au>
Subject: Re: Announce: Semaphore-Removal tree

On Sat, 2008-04-26 at 05:30 -0400, Christoph Hellwig wrote:
> On Fri, Apr 25, 2008 at 02:22:31PM -0700, Daniel Walker wrote:
> > If you can make a case for converting some semaphores to spinlocks be my
> > guest .. If you have good reasoning I wouldn't stand in the way.. (Real
> > time converts all the spinlocks to mutexes anyway ..)
> 
> Right at hand I have the XFS inode hash lock was converted from a rw_semaphore
> to a rwlock_t becuase the context switch overhead was killing
> performance in various benchmarks. This is a very typical scenary for
> locks that are taken often and held for a rather short time.  Add to
> that fact that a spinlock is compltely optimized away for an UP kernel
> while a mutex is not and the amount of memory that any mutex takes
> compared to a spinlock you have a clear winner.

I'm guessing RCU would be a bit more work?

The problem with rwlock_t is that for it to be a spinning lock the hold
times should be short, for it to be a rwlock over a spinlock there
should be a significant amount of concurrency, these two things together
make for a cache-line bouncing fest.



--
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