]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
sched/smp: Use the SMP version of schedstats
authorIngo Molnar <mingo@kernel.org>
Wed, 28 May 2025 08:09:12 +0000 (10:09 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 13 Jun 2025 06:47:21 +0000 (08:47 +0200)
Simplify the scheduler by making CONFIG_SMP=y schedstats
debugging output unconditional.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Shrikanth Hegde <sshegde@linux.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Valentin Schneider <vschneid@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20250528080924.2273858-32-mingo@kernel.org
kernel/sched/stats.c

index 86acd374fc4d83fb8baa2b6034c5c5c1b7ecf68f..d1c9429a4ac5ac8dd238709a0f683b0e50784e6e 100644 (file)
@@ -115,10 +115,8 @@ static int show_schedstat(struct seq_file *seq, void *v)
                seq_printf(seq, "timestamp %lu\n", jiffies);
        } else {
                struct rq *rq;
-#ifdef CONFIG_SMP
                struct sched_domain *sd;
                int dcount = 0;
-#endif
                cpu = (unsigned long)(v - 2);
                rq = cpu_rq(cpu);
 
@@ -133,7 +131,6 @@ static int show_schedstat(struct seq_file *seq, void *v)
 
                seq_printf(seq, "\n");
 
-#ifdef CONFIG_SMP
                /* domain-specific stats */
                rcu_read_lock();
                for_each_domain(cpu, sd) {
@@ -164,7 +161,6 @@ static int show_schedstat(struct seq_file *seq, void *v)
                            sd->ttwu_move_balance);
                }
                rcu_read_unlock();
-#endif /* CONFIG_SMP */
        }
        return 0;
 }