Re: [PATCH v3] sched: balance_cpu to consider other cpus in itsgroup as target of (pinned) task

From: Srivatsa Vaddagiri
Date: Wed Jun 20 2012 - 23:41:37 EST


* Peter Zijlstra <peterz@xxxxxxxxxxxxx> [2012-06-20 19:38:21]:

> On Tue, 2012-06-19 at 17:43 +0530, Prashanth Nageshappa wrote:
> > T2 will starve eternally in this case. The same
> > scenario can arise in presence of non-rt tasks as well (say we replace F1 with
> > high irq load or with a very high priority SCHED_OTHER task that can't move out
> > of C2).
>
> Uhm, no. In the case where both F1 and T2 are SCHED_OTHER starvation is
> impossible.
>
> What can happen with pure SCHED_OTHER affinities is being less fair than
> desired.

Right ..sorry should have made that more explicit in the description.

> Anyway, I took the patch with a few minor edits

Thanks!

> -- ie. we don't need to
> reset loop_break, its never changed (same for the ALL_PINNED patch you
> sent).

Hmm ..I can see loop_break being incremented here:

/* take a breather every nr_migrate tasks */
if (env->loop > env->loop_break) {
env->loop_break += sched_nr_migrate_break;
env->flags |= LBF_NEED_BREAK;
goto out;
}

As a result, when we redo with a different src_cpu, both loop and
loop_break could be at non-default values. Am I missing something here?

- vatsa

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/