From: Greg Kroah-Hartman Date: Tue, 10 Sep 2019 12:15:33 +0000 (+0100) Subject: drop sched patch from 4.4 X-Git-Tag: v4.4.193~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d9b7cf40a508f411c1621d456362ee5abf2b12a3;p=thirdparty%2Fkernel%2Fstable-queue.git drop sched patch from 4.4 --- diff --git a/queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch b/queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch deleted file mode 100644 index 15a633cbac5..00000000000 --- a/queue-4.4/sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 Mon Sep 17 00:00:00 2001 -From: Liangyan -Date: Mon, 26 Aug 2019 20:16:33 +0800 -Subject: sched/fair: Don't assign runtime for throttled cfs_rq - -From: Liangyan - -commit 5e2d2cc2588bd3307ce3937acbc2ed03c830a861 upstream. - -do_sched_cfs_period_timer() will refill cfs_b runtime and call -distribute_cfs_runtime to unthrottle cfs_rq, sometimes cfs_b->runtime -will allocate all quota to one cfs_rq incorrectly, then other cfs_rqs -attached to this cfs_b can't get runtime and will be throttled. - -We find that one throttled cfs_rq has non-negative -cfs_rq->runtime_remaining and cause an unexpetced cast from s64 to u64 -in snippet: - - distribute_cfs_runtime() { - runtime = -cfs_rq->runtime_remaining + 1; - } - -The runtime here will change to a large number and consume all -cfs_b->runtime in this cfs_b period. - -According to Ben Segall, the throttled cfs_rq can have -account_cfs_rq_runtime called on it because it is throttled before -idle_balance, and the idle_balance calls update_rq_clock to add time -that is accounted to the task. - -This commit prevents cfs_rq to be assgined new runtime if it has been -throttled until that distribute_cfs_runtime is called. - -Signed-off-by: Liangyan -Signed-off-by: Peter Zijlstra (Intel) -Reviewed-by: Valentin Schneider -Reviewed-by: Ben Segall -Cc: Linus Torvalds -Cc: Peter Zijlstra -Cc: Thomas Gleixner -Cc: shanpeic@linux.alibaba.com -Cc: stable@vger.kernel.org -Cc: xlpang@linux.alibaba.com -Fixes: d3d9dc330236 ("sched: Throttle entities exceeding their allowed bandwidth") -Link: https://lkml.kernel.org/r/20190826121633.6538-1-liangyan.peng@linux.alibaba.com -Signed-off-by: Ingo Molnar -Signed-off-by: Greg Kroah-Hartman - ---- - kernel/sched/fair.c | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/kernel/sched/fair.c -+++ b/kernel/sched/fair.c -@@ -3546,6 +3546,8 @@ static void __account_cfs_rq_runtime(str - if (likely(cfs_rq->runtime_remaining > 0)) - return; - -+ if (cfs_rq->throttled) -+ return; - /* - * if we're unable to extend our runtime we resched so that the active - * hierarchy can be throttled -@@ -3743,6 +3745,9 @@ static u64 distribute_cfs_runtime(struct - if (!cfs_rq_throttled(cfs_rq)) - goto next; - -+ /* By the above check, this should never be true */ -+ SCHED_WARN_ON(cfs_rq->runtime_remaining > 0); -+ - runtime = -cfs_rq->runtime_remaining + 1; - if (runtime > remaining) - runtime = remaining; diff --git a/queue-4.4/series b/queue-4.4/series index bf3767b79a0..ac222d0aa14 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -1,3 +1,2 @@ alsa-hda-fix-potential-endless-loop-at-applying-quirks.patch alsa-hda-realtek-fix-overridden-device-specific-initialization.patch -sched-fair-don-t-assign-runtime-for-throttled-cfs_rq.patch