[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201004281406.04080.arnd@arndb.de>
Date: Wed, 28 Apr 2010 14:06:03 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Tony Breeds <tonyb@....ibm.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH/RFC] mutex: Fix optimistic spinning vs. BKL
On Wednesday 28 April 2010, Benjamin Herrenschmidt wrote:
> Now, we -could- make it a bit smarter about the BKL by introducing a
> contention counter and only go out if we own the BKL and it is contended,
> but I didn't feel like this was worth the effort, time is better spent
> removing the BKL from sensitive code path instead.
Agreed.
> - for (;;) {
> + for (timeout = jiffies + 2; jiffies < timeout;) {
> [...]
> - for (;;) {
> + while (jiffies < timeout) {
This needs to use time_before() to avoid problems on jiffies wraparound.
Arnd
--
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