[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130813162916.GD24092@twins.programming.kicks-ass.net>
Date: Tue, 13 Aug 2013 18:29:16 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mike Galbraith <bitbucket@...ine.de>,
Peter Anvin <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] per-cpu preempt_count
On Tue, Aug 13, 2013 at 08:39:46AM -0700, Linus Torvalds wrote:
> Also, I think your patch is too big, and you should have aim to just
> made the "preempt_count()" helper function mask off PREEMPT_MASK, so
> that you don't change the semantics of that. I realize that there are
> a couple of users that do things like "preempt_count() += x", and you
> probably wanted to keep those working, but I think it is easier (and
> cleaner) to fix those to "preempt_count_update(x)" instead of adding
> all those explicitly PREEMPT_MASK masks.
For sure.. but I didn't want to spend time cleaning things up until
there was something half-way promising in it.
The inverted need_resched that gives decl+jnz idea from Ingo should do
it though. Not entirely sure I understand your MSB + jns suggestion:
0x80000002 - 1 = 0x80000001
Both are very much signed and neither wants to cause a reschedule.
--
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