[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0901061026240.3057@localhost.localdomain>
Date: Tue, 6 Jan 2009 10:28:38 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
cc: Peter Zijlstra <peterz@...radead.org>,
Matthew Wilcox <matthew@....cx>,
Andi Kleen <andi@...stfloor.org>,
Chris Mason <chris.mason@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
linux-btrfs <linux-btrfs@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Gregory Haskins <ghaskins@...ell.com>,
Nick Piggin <npiggin@...e.de>
Subject: Re: [PATCH][RFC]: mutex: adaptive spin
On Tue, 6 Jan 2009, Steven Rostedt wrote:
>
> Caching the rq is an interesting idea. But since the rq struct is local to
> sched.c, what would be a good API to do this?
Just move the whole "spin_or_schedule()" into sched.c, and you're all
done.
Yeah, that requires having sched.c know a bit about mutex locking rules,
but the data structures are already exported in <linux/mutex.h>, and while
_normal_ code should never care or know exactly how it is used, I think
the scheduler might as well. Mutexes are clearly very much a scheduling
entity, so it's not too much of a break with internal knowledge.
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