lkml.org 
[lkml]   [2024]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?



\
 
 \ /
  Last update: 2024-05-27 16:46    [W:0.150 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site