[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0901071510390.3057@localhost.localdomain>
Date: Wed, 7 Jan 2009 15:15:48 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Gregory Haskins <ghaskins@...ell.com>
cc: Andi Kleen <andi@...stfloor.org>, Matthew Wilcox <matthew@....cx>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
paulmck@...ux.vnet.ibm.com, Ingo Molnar <mingo@...e.hu>,
Chris Mason <chris.mason@...cle.com>,
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>,
Nick Piggin <npiggin@...e.de>,
Peter Morreale <pmorreale@...ell.com>,
Sven Dietrich <SDietrich@...ell.com>
Subject: Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning
On Wed, 7 Jan 2009, Gregory Haskins wrote:
>
> Can I ask a simple question in light of all this discussion?
>
> "Is get_task_struct() really that bad?"
Yes. It's an atomic access (two, in fact, since you need to release it
too), which is a huge deal if we're talking about a timing-critical
section of code.
And this is timing-critical, or we wouldn't even care - even in the
contention case. Admittedly btrfs apparently makes it more so that it
_should_ be, but Peter had some timings that happened with just regular
create/unlink that showed a big difference.
So the whole and only point of spinning mutexes is to get rid of the
scheduler overhead, but to also not replace it with some other thing ;)
Linus
--
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