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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1231351212.27813.44.camel@think.oraclecorp.com>
Date:	Wed, 07 Jan 2009 13:00:12 -0500
From:	Chris Mason <chris.mason@...cle.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Peter Zijlstra <peterz@...radead.org>, paulmck@...ux.vnet.ibm.com,
	Gregory Haskins <ghaskins@...ell.com>,
	Ingo Molnar <mingo@...e.hu>, Matthew Wilcox <matthew@....cx>,
	Andi Kleen <andi@...stfloor.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	linux-btrfs <linux-btrfs@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Steven Rostedt <rostedt@...dmis.org>,
	Nick Piggin <npiggin@...e.de>,
	Peter Morreale <pmorreale@...ell.com>,
	Sven Dietrich <SDietrich@...ell.com>
Subject: Re: [PATCH -v4][RFC]: mutex: implement adaptive spinning

On Wed, 2009-01-07 at 09:50 -0800, Linus Torvalds wrote:
> 
> On Wed, 7 Jan 2009, Chris Mason wrote:
> > 
> > So far I haven't found any btrfs benchmarks where this is slower than
> > mutexes without any spinning.  But, it isn't quite as fast as the btrfs
> > spin.
> 
> Quite frankly, from our history with ext3 and other filesystems, using a 
> mutex in the filesystem is generally the wrong thing to do anyway. 
> 
> Are you sure you can't just use a spinlock, and just release it over IO? 
> The "have to do IO or extend the btree" case is usually pretty damn clear.
> 
> Because it really sounds like you're lock-limited, and you should just try 
> to clean it up. A pure "just spinlock" in the hotpath is always going to 
> be better.

There are definitely ways I can improve performance for contention in
the hot btree nodes, and I think it would be a mistake to tune the
generic adaptive locks just for my current code.

But, it isn't a bad test case to compare the spin with the new patch and
with the plain mutex.  If the adaptive code gets in, I think it would be
best for me to drop the spin.

Either way there's more work to be done in the btrfs locking code.

-chris


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