Re: [RFC][PATCH 18/22] sched: add reclaiming logic to -deadlinetasks
From: Peter Zijlstra
Date: Thu Nov 11 2010 - 17:13:21 EST
On Fri, 2010-10-29 at 08:42 +0200, Raistlin wrote:
> The bandwidth enforcing mechanism implemented inside the
> SCHED_DEADLINE policy ensures that overrunning tasks are slowed
> down without interfering with well behaving ones.
> This, however, comes at the price of limiting the capability of
> a task to exploit more bandwidth than it is asigned.
>
> The current implementation always stops a task that is trying
> to use more than its runtime (every deadline). Something else that
> could be done is to let it continue running, but with a "decreased
> priority". This way, we can exploit full CPU bandwidth and still
> avoid interferences.
>
> In order of "decreasing the priority" of a deadline task, we can:
> - let it stay SCHED_DEADLINE and postpone its deadline. This way it
> will always be scheduled before -rt and -other tasks but it
> won't affect other -deadline tasks;
> - put it in SCHED_FIFO with some priority. This way it will always
> be scheduled before -other tasks but it won't affect -deadline
> tasks, nor other -rt tasks with higher priority;
> - put it in SCHED_OTHER.
>
> Notice also that this can be done on a per-task basis, e.g., each
> task can specify what kind of reclaiming mechanism it wants to use
> by means of the sched_flags field of sched_param_ex.
>
> Therefore, this patch:
> - adds the flags for specyfing DEADLINE, RT or OTHER reclaiming
> behaviour;
> - adds the logic that changes the scheduling class of a task when
> it overruns, according to the requested policy.
The first two definitely should require SYS_CAP_ADMIN because it allows
silly while(1) loops again.. but can we postpone this fancy feature as
well?
I'd much rather have the stochastic thing implemented that allows
limited temporal overrun.
--
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/