public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: Drop outdated compile-optimization comment
@ 2022-06-15 22:27 Brian Norris
  2022-06-17 11:10 ` Valentin Schneider
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Norris @ 2022-06-15 22:27 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot
  Cc: Ben Segall, linux-kernel, Dietmar Eggemann,
	Daniel Bristot de Oliveira, Mel Gorman, Valentin Schneider,
	Steven Rostedt, Brian Norris

Looks like this exists from way back in 2011 (commit 095c0aa83e52
("sched: adjust scheduler cpu power for stolen time")), when there was a
little more aggressive use of #if around these variables. That #if is
gone, and the comment just confuses the reader now. (For one, we don't
call sched_rt_avg_update() directly any more either.)

Signed-off-by: Brian Norris <briannorris@chromium.org>
---

 kernel/sched/core.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bfa7452ca92e..6dbe52d90bef 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -679,10 +679,6 @@ struct rq *task_rq_lock(struct task_struct *p, struct rq_flags *rf)
 
 static void update_rq_clock_task(struct rq *rq, s64 delta)
 {
-/*
- * In theory, the compile should just see 0 here, and optimize out the call
- * to sched_rt_avg_update. But I don't trust it...
- */
 	s64 __maybe_unused steal = 0, irq_delta = 0;
 
 #ifdef CONFIG_IRQ_TIME_ACCOUNTING
-- 
2.36.1.476.g0c4daa206d-goog


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

end of thread, other threads:[~2022-06-17 20:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-15 22:27 [PATCH] sched: Drop outdated compile-optimization comment Brian Norris
2022-06-17 11:10 ` Valentin Schneider
2022-06-17 13:31   ` Peter Zijlstra
2022-06-17 20:33   ` Brian Norris

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