Re: [PATCH 09/13] sched: Add bandwidth management for sched_dl

From: Peter Zijlstra
Date: Wed Dec 18 2013 - 11:55:52 EST


On Tue, Dec 17, 2013 at 01:27:29PM +0100, Peter Zijlstra wrote:
> @@ -4381,6 +4592,13 @@ static int __migrate_task(struct task_st
> goto fail;
>
> /*
> + * If p is -deadline, proceed only if there is enough
> + * bandwidth available on dest_cpu
> + */
> + if (unlikely(dl_task(p)) && !set_task_cpu_dl(p, dest_cpu))
> + goto fail;
> +
> + /*
> * If we're not on a rq, the next wake-up will ensure we're
> * placed properly.
> */

I just noticed this one.. we can't do this.

The reason we cannot do this is because:

CPU_DYING -> migration_call() -> migrate_tasks() -> __migrate_task()

cannot fail and hard assumes it _will_ move all tasks off of the dying
cpu, failing this will break hotplug.

Also, I'm not entirely sure why this hunk exists. For GEDF we don't need
this constraints AFAIK, as long as we guarantee we run the N earliest
deadlines, it only matters what the total utilization (root domain wide)
is, the per-cpu utilization is irrelevant.

If the purpose is to fail hotplug because taking out the CPU would end
up in over-subscription, then we need a DOWN_PREPARE handler.

Dario, Juri?
--
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/