diff options
author | Juri Lelli <[email protected]> | 2014-09-19 10:22:39 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2014-09-24 14:46:56 +0200 |
commit | a5e7be3b28a235108c59561bea55eea1072b23b0 (patch) | |
tree | 57e8b7c8c7059cf4775a5742ea0cfd69e71a04ee /net/lapb/lapb_subr.c | |
parent | be34f0f3e6aed6e828a8059247d169d38da128d7 (diff) |
sched/deadline: Clear dl_entity params when setscheduling to different class
When a task is using SCHED_DEADLINE and the user setschedules it to a
different class its sched_dl_entity static parameters are not cleaned
up. This causes a bug if the user sets it back to SCHED_DEADLINE with
the same parameters again. The problem resides in the check we
perform at the very beginning of dl_overflow():
if (new_bw == p->dl.dl_bw)
return 0;
This condition is met in the case depicted above, so the function
returns and dl_b->total_bw is not updated (the p->dl.dl_bw is not
added to it). After this, admission control is broken.
This patch fixes the thing, properly clearing static parameters for a
task that ceases to use SCHED_DEADLINE.
Reported-by: Daniele Alessandrelli <[email protected]>
Reported-by: Daniel Wagner <[email protected]>
Reported-by: Vincent Legout <[email protected]>
Tested-by: Luca Abeni <[email protected]>
Tested-by: Daniel Wagner <[email protected]>
Tested-by: Vincent Legout <[email protected]>
Signed-off-by: Juri Lelli <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Fabio Checconi <[email protected]>
Cc: Dario Faggioli <[email protected]>
Cc: Michael Trimarchi <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions