Patch "sched/fair: Avoid using decay_load_missed() with a negative value" has been added to the 4.5-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
sched/fair: Avoid using decay_load_missed() with a negative value
to the 4.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
sched-fair-avoid-using-decay_load_missed-with-a-negative-value.patch
and it can be found in the queue-4.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
7400d3bbaa229eb8e7631d28fb34afd7cd2c96ffMon Sep 17 00:00:00 2001
From: Byungchul Park <[email protected]>
Date: Fri, 15 Jan 2016 16:07:49 +0900
Subject: sched/fair: Avoid using decay_load_missed() with a negative value
From: Byungchul Park <[email protected]>
commit 7400d3bbaa229eb8e7631d28fb34afd7cd2c96ff upstream.
decay_load_missed() cannot handle nagative values, so we need to prevent using the function with a negative value.
--- kernel/sched/fair.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
kernel/sched/fair.c +10 -2
@@ -4459,9 +4459,17 @@ static void __update_cpu_load(struct rq/* scale is effectively 1 << i now, and >> i divides by scale */ - old_load = this_rq->cpu_load[i] - tickless_load; + old_load = this_rq->cpu_load[i]; old_load =decay_load_missed (old_load, pending_updates -1 , i); - old_load += tickless_load; +if (tickless_load) { + old_load -=decay_load_missed (tickless_load, pending_updates -1 , i); +/* +* old_load can never be a negative value because a +* decayed tickless_load cannot be greater than the +* original tickless_load. +*/ + old_load += tickless_load; + } new_load = this_load;/* * Round up the averaging division if load is increasing. This
Patches currently in stable-queue which might be from [email protected] are
queue-4.5/sched-fair-avoid-using-decay_load_missed-with-a-negative-value.patch