[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aDgB7VoNbHoJqDDT@gmail.com>
Date: Thu, 29 May 2025 08:42:53 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org,
Dietmar Eggemann <dietmar.eggemann@....com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Shrikanth Hegde <sshegde@...ux.ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
Valentin Schneider <vschneid@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>, Mel Gorman <mgorman@...e.de>,
Vincent Guittot <vincent.guittot@...aro.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Subject: Re: [PATCH 00/43] sched: Use the SMP scheduler on UP too
* Peter Zijlstra <peterz@...radead.org> wrote:
> You know about unifdef, right :-)
>
> $ unifdef -m -DCONFIG_SMP=y kernel/sched/*.[ch] include/linux/sched.h include/linux/sched/*.h
Except we cannot really do that:
starship:~/mingo.tip.git> git grep CONFIG_SMP kernel/sched/ | wc -l
36
There's a number of external facilities not present on UP we don't want
to remove, plus where possible we want to do the conversion with
smaller steps, as long as the interim scheduler still works.
> I'd just run that tool, have changelog include the command and patch
> be the effect.
This tool might be a good double check for files where all CONFIG_SMP
instances were removed though, although with the markers consistently
in place it's pretty obvious at sight for even a human that matching
#ifdef blocks got removed.
The mechanical removal was maybe 5% of the work. The other 95% was to
identify what to remove/convert, and the tool doesn't help much with
that. ;-)
A tool to check/generate #ifdef block markers would be nice though,
with a threshold for when to mark it at over ~3 lines or so when a CPP
directive gets out of sight for standard patch context. Even after the
CONFIG_SMP series there's still another ~500 CPP blocks in the
scheduler:
starship:~/mingo.tip.git> git grep -E '^#if|^#else' kernel/sched/ | wc -l
561
:-)
Thanks,
Ingo
Powered by blists - more mailing lists