]> Git Repo - linux.git/commitdiff
sched: Fix use of count for nr_running tracepoint
authorPhil Auld <[email protected]>
Wed, 5 Aug 2020 20:31:38 +0000 (16:31 -0400)
committerIngo Molnar <[email protected]>
Thu, 6 Aug 2020 07:36:59 +0000 (09:36 +0200)
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 <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
kernel/sched/sched.h

index 3fd283892761dc47c51f0c71e2ba84bc6e76251c..28709f6b0975c8bf5a36266b41ec356280adde29 100644 (file)
@@ -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 */
This page took 0.068645 seconds and 4 git commands to generate.