Messages in this thread | ![/](/images/icornerl.gif) | | Date | Thu, 18 Apr 2024 13:26:00 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] cpu: memoise number of possible cpus |
| |
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?
| ![\](/images/icornerr.gif) |