lkml.org 
[lkml]   [2022]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/5] smp: don't declare nr_cpu_ids if NR_CPUS == 1
On Tue, Sep 06, 2022 at 07:06:31AM -0700, Yury Norov wrote:
> 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.

Can't you simply disallow NR_CPUS==1 for SMP builds? It doesn't make
sense anyway.

> > Why do we need extra source complexity for this?
>
> To have effective code generation for UP builds.

Again, who cares... isn't it hard to find actual UP chips these days?

It was suggested the other day we remove a whole bunch of SMP=n code and
unconditionally use SMP code, even if its pointless on UP just to make
the source simpler.

\
 
 \ /
  Last update: 2022-09-06 17:27    [W:0.188 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site