Skip to content

Commit a1bd068

Browse files
auldpIngo Molnar
authored andcommitted
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: 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
1 parent 4da9f33 commit a1bd068

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/sched/sched.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,7 @@ static inline void sub_nr_running(struct rq *rq, unsigned count)
19991999
{
20002000
rq->nr_running -= count;
20012001
if (trace_sched_update_nr_running_tp_enabled()) {
2002-
call_trace_sched_update_nr_running(rq, count);
2002+
call_trace_sched_update_nr_running(rq, -count);
20032003
}
20042004

20052005
/* Check if we still need preemption */

0 commit comments

Comments
 (0)