[Devel,RHEL7,COMMIT] sched: Fix cfs_rq->active assignment in sched_cfs_active_timer()

Submitted by Konstantin Khorenko on Sept. 8, 2016, 10:10 a.m.


Message ID 201609081010.u88AAYlj003119@finist_cl7.x64_64.work.ct
State New
Series "sched: Fix cfs_rq->active assignment in sched_cfs_active_timer()"
Headers show

Commit Message

Konstantin Khorenko Sept. 8, 2016, 10:10 a.m.
The commit is pushed to "branch-rh7-3.10.0-327.28.2.vz7.17.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.28.2.vz7.17.4
commit 2b655a517e936eb505360756204daf60de2f3e00
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Thu Sep 8 14:10:34 2016 +0400

    sched: Fix cfs_rq->active assignment in sched_cfs_active_timer()
    sched_cfs_active_timer() is used to postpone decrementing of
    tg->nr_cpus_active and marking cfs_rq as inactive. It's need
    to give a possibility for a new tg task to stand on a hot cpu,
    where another tg's task gone to sleep a moment ago.
    See for dec_nr_active_cfs_rqs(), which postpone actions it does.
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index a419f39..6d03ebf 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -510,7 +510,7 @@  static enum hrtimer_restart sched_cfs_active_timer(struct hrtimer *timer)
 	unsigned long flags;
 	raw_spin_lock_irqsave(&rq->lock, flags);
-	cfs_rq->active = !!list_empty(&cfs_rq->tasks);
+	cfs_rq->active = !list_empty(&cfs_rq->tasks);
 	raw_spin_unlock_irqrestore(&rq->lock, flags);