From: Phil Auld Date: Wed, 5 Aug 2020 20:31:38 +0000 (-0400) Subject: sched: Fix use of count for nr_running tracepoint X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a1bd06853ee478d37fae9435c5521e301de94c67;p=linux.git sched: Fix use of count for nr_running tracepoint The count field is meant to tell if an update to nr_running is an add or a subtract. Make it do so by adding the missing minus sign. Fixes: 9d246053a691 ("sched: Add a tracepoint to track rq->nr_running") Signed-off-by: Phil Auld Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200805203138.1411-1-pauld@redhat.com --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 3fd283892761d..28709f6b0975c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1999,7 +1999,7 @@ static inline void sub_nr_running(struct rq *rq, unsigned count) { rq->nr_running -= count; if (trace_sched_update_nr_running_tp_enabled()) { - call_trace_sched_update_nr_running(rq, count); + call_trace_sched_update_nr_running(rq, -count); } /* Check if we still need preemption */