From: Andrew Morton <akpm@linux-foundation.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: tglx@linutronix.de, peterz@infradead.org, yury.norov@gmail.com,
linux@rasmusvillemoes.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpu: memoise number of possible cpus
Date: Thu, 18 Apr 2024 13:26:00 -0700 [thread overview]
Message-ID: <20240418132600.ffbf4d53b39eaaeaffc28198@linux-foundation.org> (raw)
In-Reply-To: <20240418041927.3903-1-adobriyan@gmail.com>
On Thu, 18 Apr 2024 07:19:27 +0300 Alexey Dobriyan <adobriyan@gmail.com> wrote:
> cpu_possible_mask is fixed after boot, so it makes sense
> to calculate number of possible cpus to
> a) make num_possible_cpus() faster (distros ship with _large_ NR_CPUS),
> b) unscrew codegen elsewhere replacing function call
> with simple memory load.
There are a lot of calls to set_cpu_possible(). Perhaps calculating
num_possible_cpus within there would reduce risk of things getting out
of sync, either now or in the future.
reset_cpu_possible_mask() appears to have no callers. Kill?
next prev parent reply other threads:[~2024-04-18 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-18 4:19 [PATCH] cpu: memoise number of possible cpus Alexey Dobriyan
2024-04-18 20:26 ` Andrew Morton [this message]
2024-04-18 20:27 ` Andrew Morton
2024-04-19 5:32 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240418132600.ffbf4d53b39eaaeaffc28198@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=adobriyan@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=yury.norov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox