lkml.org 
[lkml]   [2022]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] Bitmap patches for v5.19-rc1
On Fri, Jun 3, 2022 at 12:48 PM Yury Norov <yury.norov@gmail.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

\
 
 \ /
  Last update: 2022-06-04 23:26    [W:0.028 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site