public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Fix use of count for nr_running tracepoint
@ 2020-08-05 20:31 Phil Auld
  2020-08-06 17:09 ` [tip: sched/urgent] " tip-bot2 for Phil Auld
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Auld @ 2020-08-05 20:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Qais Yousef, Ingo Molnar, Peter Zijlstra, Vincent Guittot,
	Steven Rostedt, Juri Lelli

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 <pauld@redhat.com>
---
 kernel/sched/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 3fd283892761..28709f6b0975 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 */
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-08-06 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-05 20:31 [PATCH] sched: Fix use of count for nr_running tracepoint Phil Auld
2020-08-06 17:09 ` [tip: sched/urgent] " tip-bot2 for Phil Auld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox