[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1309620931.3282.4.camel@twins>
Date: Sat, 02 Jul 2011 17:35:31 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Rakib Mullick <rakib.mullick@...il.com>
Cc: Ingo Molnar <mingo@...e.hu>,
linux-kernel <linux-kernel@...r.kernel.org>,
Paul Turner <pjt@...gle.com>
Subject: Re: [PATCH] sched: Check nr_running before calling pick_next_task
in schedule().
On Sat, 2011-07-02 at 20:26 +0600, Rakib Mullick wrote:
> Well, yes - branching seems definitely have some side effects.
It adds the cost of the test as well as a possible branch mis-predict.
> Thinking from UP's perspective, it will only hit slow path -- going
> into idle.
Uhm, no, every time the machine is busy and does a schedule between
tasks you still get to do that extra nr_running test and branch.
> In that case, that likely branch will just fail. And on an
> UP system that slow path -- going into idle -- is the only way, taking
> the fast path (trying picking a task) isn't the right thing, isn't
> it?
I'm not at all sure I even understand what you're trying to say. I
really don't understand what's the problem with going the long way with
picking the idle task, the machine is idle, it doesn't have anything
useful to do, who cares.
--
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