Messages in this thread | | | Date | Tue, 6 Sep 2022 07:06:31 -0700 | From | Yury Norov <> | Subject | Re: [PATCH v2 1/5] smp: don't declare nr_cpu_ids if NR_CPUS == 1 |
| |
On Tue, Sep 06, 2022 at 10:53:53AM +0200, Peter Zijlstra wrote: > On Mon, Sep 05, 2022 at 04:08:16PM -0700, Yury Norov wrote: > > SMP and NR_CPUS are independent options, hence nr_cpu_ids may be > > declared even if NR_CPUS == 1, which is useless. > > I'm thikning you're fixing the wrong problem here.
I'm removing dead code. If NR_CPUS == 1, nr_cpu_ids does exist, exported as an interface variable, but never normally reached, because in some other piece of code (not even in smp.h) it's declared conditionally.
> Also who the heck > cares about SMP=y NR_CPUS=1 anyway?
Build bots.
> Why do we need extra source complexity for this?
To have effective code generation for UP builds.
| |