[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimqTH5Fqus4CvBvmJUrfC9RyijPQxcohVbGMNzG@mail.gmail.com>
Date: Wed, 8 Sep 2010 16:48:18 +0100
From: Will Newton <will.newton@...il.com>
To: fabio de francesco <fabio@...anix.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [process scheduler] Possible bug in context_swich()?
On Wed, Sep 8, 2010 at 4:28 PM, fabio de francesco <fabio@...anix.org> wrote:
> Dear List,
>
> My previous mails to you have gone unheard... my last chance...
>
> In context_switch() (in linux/kernel/sched.c), starting with release 2.6.33,
> two "unlikely" macro have been changed to "likely". I think the previous
> logic was right while the latter is wrong.
>
> In case I am missing something I, please, ask someone to explain the above
> mentioned inversion of logic through releases.
Hi fabio,
The logic was changed in commit
710390d90f143a9ebb87a475215140f426792efd on the basis of a branch hint
profiling run. It would guess previous logic was more likely to be
correct, unless one is often scheduling between kernel threads, but
maybe that happens more often than I expect.
I would suggest trying the branch tracer yourself if you think the
current code is wrong for your workload, the config option is
PROFILE_ANNOTATED_BRANCHES. I would suggest not profiling the boot
process (which will have predominantly kernel threads) and not
profiling on an idle system (which may also be relatively heavy on
kernel threads).
--
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