summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorLuca Abeni <luca.abeni@unitn.it>2014-12-17 11:50:32 +0100
committerLuis Henriques <luis.henriques@canonical.com>2015-01-16 14:34:34 +0000
commit90f577a1d9fea14c455b0dcd5965fe992d9b1e96 (patch)
treedf312d04d031ec4235a0284790e3335d77186655 /drivers/hid
parent225a4eaaeccc4c197f76ab98699eb8f023c611f2 (diff)
downloadlinux-stable-90f577a1d9fea14c455b0dcd5965fe992d9b1e96.tar.gz
linux-stable-90f577a1d9fea14c455b0dcd5965fe992d9b1e96.tar.bz2
linux-stable-90f577a1d9fea14c455b0dcd5965fe992d9b1e96.zip
sched/deadline: Avoid double-accounting in case of missed deadlines
commit 269ad8015a6b2bb1cf9e684da4921eb6fa0a0c88 upstream. The dl_runtime_exceeded() function is supposed to ckeck if a SCHED_DEADLINE task must be throttled, by checking if its current runtime is <= 0. However, it also checks if the scheduling deadline has been missed (the current time is larger than the current scheduling deadline), further decreasing the runtime if this happens. This "double accounting" is wrong: - In case of partitioned scheduling (or single CPU), this happens if task_tick_dl() has been called later than expected (due to small HZ values). In this case, the current runtime is also negative, and replenish_dl_entity() can take care of the deadline miss by recharging the current runtime to a value smaller than dl_runtime - In case of global scheduling on multiple CPUs, scheduling deadlines can be missed even if the task did not consume more runtime than expected, hence penalizing the task is wrong This patch fix this problem by throttling a SCHED_DEADLINE task only when its runtime becomes negative, and not modifying the runtime Signed-off-by: Luca Abeni <luca.abeni@unitn.it> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Juri Lelli <juri.lelli@gmail.com> Cc: Dario Faggioli <raistlin@linux.it> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1418813432-20797-3-git-send-email-luca.abeni@unitn.it Signed-off-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/hid')
0 files changed, 0 insertions, 0 deletions