Re: [GIT PULL] Bitmap patches for v5.19-rc1
From: Linus Torvalds
Date: Sat Jun 04 2022 - 17:28:17 EST
On Fri, Jun 3, 2022 at 12:48 PM Yury Norov <yury.norov@xxxxxxxxx> 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