Change mutex contention behaviour such that it will sometimes busy wait on
acquisition - moving its behaviour closer to that of spinlocks.
This concept got ported to mainline from the -rt tree, where it was originally
implemented for rtmutexes by Steven Rostedt, based on work by Gregory Haskins.
2009/1/7 Peter Zijlstra pet...@infradead.org:
Change mutex contention behaviour such that it will sometimes busy wait on
acquisition - moving its behaviour closer to that of spinlocks.
This concept got ported to mainline from the -rt tree, where it was originally
implemented for rtmutexes by
On Wed, 2009-01-07 at 15:50 +0100, Frédéric Weisbecker wrote:
2009/1/7 Peter Zijlstra pet...@infradead.org:
Change mutex contention behaviour such that it will sometimes busy wait on
acquisition - moving its behaviour closer to that of spinlocks.
This concept got ported to mainline from
On Wed, 7 Jan 2009, Steven Rostedt wrote:
On Wed, 7 Jan 2009, Peter Zijlstra wrote:
--- a/kernel/mutex.c
+++ b/kernel/mutex.c
@@ -10,6 +10,10 @@
* Many thanks to Arjan van de Ven, Thomas Gleixner, Steven Rostedt and
* David Howells for suggestions and improvements.
*
+ * -
On Wed, 2009-01-07 at 10:22 -0500, Steven Rostedt wrote:
Peter, nice work!
Thanks!
+ }
+
+ if (!spin) {
+ schedstat_inc(this_rq(), mtx_sched);
+ __set_task_state(task, state);
I still do not know why you set state here instead of in the mutex code.
Yes, you
On Wed, 7 Jan 2009, Peter Zijlstra wrote:
Change mutex contention behaviour such that it will sometimes busy wait on
acquisition - moving its behaviour closer to that of spinlocks.
Ok, this one looks _almost_ ok.
The only problem is that I think you've lost the UP case.
In UP, you
On Wed, 2009-01-07 at 08:25 -0800, Linus Torvalds wrote:
On Wed, 7 Jan 2009, Peter Zijlstra wrote:
Change mutex contention behaviour such that it will sometimes busy wait on
acquisition - moving its behaviour closer to that of spinlocks.
Ok, this one looks _almost_ ok.
The only
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
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