summaryrefslogtreecommitdiffstats
path: root/kernel/sched/rt.c
diff options
context:
space:
mode:
authorKirill Tkhai <tkhai@yandex.ru>2014-05-09 03:00:14 +0400
committerIngo Molnar <mingo@kernel.org>2014-05-22 11:16:33 +0200
commit72465447867b9de6b5cdea5d10f9781585136270 (patch)
tree2067c7c82f389c91c325d04797ced6b851ba1691 /kernel/sched/rt.c
parent52a08ef1f13a11289c9e18cd4cfb4e51c024058b (diff)
downloadblackbird-obmc-linux-72465447867b9de6b5cdea5d10f9781585136270.tar.gz
blackbird-obmc-linux-72465447867b9de6b5cdea5d10f9781585136270.zip
sched, nohz: Change rq->nr_running to always use wrappers
Sometimes ->nr_running may cross 2 but interrupt is not being sent to rq's cpu. In this case we don't reenable the timer. Looks like this may be the reason for rare unexpected effects, if nohz is enabled. Patch replaces all places of direct changing of nr_running and makes add_nr_running() caring about crossing border. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> Acked-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20140508225830.2469.97461.stgit@localhost Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/rt.c')
-rw-r--r--kernel/sched/rt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 7795e292f4c9..0ebfd7a29472 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -973,7 +973,7 @@ dequeue_top_rt_rq(struct rt_rq *rt_rq)
BUG_ON(!rq->nr_running);
- rq->nr_running -= rt_rq->rt_nr_running;
+ sub_nr_running(rq, rt_rq->rt_nr_running);
rt_rq->rt_queued = 0;
}
@@ -989,7 +989,7 @@ enqueue_top_rt_rq(struct rt_rq *rt_rq)
if (rt_rq_throttled(rt_rq) || !rt_rq->rt_nr_running)
return;
- rq->nr_running += rt_rq->rt_nr_running;
+ add_nr_running(rq, rt_rq->rt_nr_running);
rt_rq->rt_queued = 1;
}
OpenPOWER on IntegriCloud