Skip to content

Commit

Permalink
sched: Fix use of count for nr_running tracepoint
Browse files Browse the repository at this point in the history
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: 9d24605 ("sched: Add a tracepoint to track rq->nr_running")
Signed-off-by: Phil Auld <pauld@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200805203138.1411-1-pauld@redhat.com
  • Loading branch information
Phil Auld authored and Ingo Molnar committed Aug 6, 2020
1 parent 4da9f33 commit a1bd068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a1bd068

Please sign in to comment.