From: Peter Zijlstra <peterz@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Mike Galbraith <bitbucket@online.de>, Peter Anvin <hpa@zytor.com>,
Andi Kleen <ak@linux.intel.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] per-cpu preempt_count
Date: Tue, 13 Aug 2013 18:29:16 +0200 [thread overview]
Message-ID: <20130813162916.GD24092@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CA+55aFxieQGUkEi9i=LRzVK2DRvavKgF-YEvskvJhF3-5xiU2A@mail.gmail.com>
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.
next prev parent reply other threads:[~2013-08-13 16:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-12 11:51 [RFC] per-cpu preempt_count Peter Zijlstra
2013-08-12 17:35 ` Linus Torvalds
2013-08-12 17:51 ` H. Peter Anvin
2013-08-12 18:53 ` Linus Torvalds
2013-08-13 8:39 ` Peter Zijlstra
2013-08-12 17:58 ` Ingo Molnar
2013-08-12 19:00 ` Linus Torvalds
2013-08-12 20:44 ` H. Peter Anvin
2013-08-13 10:30 ` Ingo Molnar
2013-08-13 12:26 ` Peter Zijlstra
2013-08-13 15:39 ` Linus Torvalds
2013-08-13 15:56 ` Ingo Molnar
2013-08-13 16:26 ` Peter Zijlstra
2013-08-13 16:28 ` H. Peter Anvin
2013-08-13 16:29 ` Peter Zijlstra [this message]
2013-08-13 16:38 ` Linus Torvalds
2013-08-18 17:57 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130813162916.GD24092@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ak@linux.intel.com \
--cc=bitbucket@online.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.