[lkml]   [2011]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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.

 \ /
  Last update: 2011-07-02 17:37    [from the cache]
©2003-2011 Jasper Spaans