[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHk-=wibRs6NXp1JXA58+cHcgQNDiAtdOTR7kieG5P=NOtWRGA@mail.gmail.com>
Date: Sat, 4 Jun 2022 14:24:52 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Yury Norov <yury.norov@...il.com>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Rasmus Villemoes <linux@...musvillemoes.dk>
Subject: Re: [GIT PULL] Bitmap patches for v5.19-rc1
On Fri, Jun 3, 2022 at 12:48 PM Yury Norov <yury.norov@...il.com> wrote:
>
> arch/ia64: replace cpumask_weight with cpumask_empty where appropriate
As you can tell from the pr-tracker-bot reply, I've pulled this.
But I did want to point out that this patch should probably have gone further.
That first argument to per_cpu_scan_finalize() is kind of ugly, but it
should probably have been something like
n = cpumask_weight(&early_cpu_possible_map) ? : 32;
instead of doing *both* cpumask_weight() and cpumask_empty().
The only case cpumask_empty() can be optimized if it's not entirely
empty, but that's the also the case where that code then ends up
calling cpumask_weight() to get the final result.
Note: I don't really care. This is ia64 boot-time setup code, so it's
not like performance matters. It's dead and irrelevant. I just reacted
to "that patch tries to micro-optimize the code, but is missing the
forest for the trees".
Linus
Powered by blists - more mailing lists