[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFxieQGUkEi9i=LRzVK2DRvavKgF-YEvskvJhF3-5xiU2A@mail.gmail.com>
Date: Tue, 13 Aug 2013 08:39:46 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Peter Zijlstra <peterz@...radead.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 5:26 AM, Peter Zijlstra <peterz@...radead.org> wrote:
>
> So we're now down to something like:
>
> decl fs:preempt_count
> cmpl PREEMPT_NEED_RESCHED,fs:preempt_count
> jnz 1f
Well, this isn't worth doing unless you can make PREEMPT_NEED_RESCHED
be the high bit, and we can combine it into just "decl+jns". Otherwise
we'd be better off with the simpler two separate adjacent variables.
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.
Hmm?
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