Re: [RFC 9/12][PATCH] SCHED_DEADLINE: system wide bandwidth management

From: Dhaval Giani
Date: Fri Nov 06 2009 - 06:34:21 EST

On Fri, Oct 16, 2009 at 9:15 PM, Raistlin <raistlin@xxxxxxxx> wrote:
> This commit adds the capability of controlling the maximum, system wide,
> CPU bandwidth that is devoted to SCHED_DEADLINE tasks.
> This is done by means of two files:
>  - /proc/sys/kernel/sched_deadline_runtime_us,
>  - /proc/sys/kernel/sched_deadline_period_us.
> The ratio runtime/period is the total bandwidth all the SCHED_DEADLINE tasks
> can use in the system as a whole.
> Trying to create tasks in such a way that they exceed this limitation will
> fail, as soon as the bandwidth cap would be overcome.
> Default value is _zero_ bandwidth available, thus write some numbers in those
> files before trying to start some SCHED_DEADLINE task. Setting runtime > period
> is allowed (i.e., more than 100% bandwidth available for -deadline tasks),
> since it makes more than sense in SMP systems.

I don't like this interface. A couple of issues that come to mind are
1. There is no check to prevent over provisioning of the system (if I
have missed the check, please correct me)
2. It is not CPU hotplug safe (I can understand that it is not that
important an issue now, but we should keep in mind that linux is
hotplug capable, so we would need to hook into the hotplug mechanism)

I would very much prefer the current interface where the runtime <=
period is always enforced. For SMP then across the system we would
allow a runtime equivalent to runtime * NR_CPU. I think it would make
more sense to push it as a percentage system wide. (I don't think it
should be an issue for processes since a process can only run one CPU
so its runtime and period will mean just that and not percentage).


Ogden Nash - "The trouble with a kitten is that when it grows up,
it's always a cat." -
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at