Re: [PATCH 13/17] kernel/cpu: add num_possible_cpus counter

From
Peter Zijlstra <peterz@infradead.org>
Date
2021-12-21 13:16:25
Also in
kvm, linux-alpha, linux-crypto, linux-mips, linux-mm, linux-riscv, linux-s390, linuxppc-dev, lkml
Reply to
Yury Norov, 2021-12-18
On Sat, Dec 18, 2021 at 01:20:09PM -0800, Yury Norov wrote:
Similarly to the online cpus, the cpu_possible_mask is actively used
in the kernel. This patch adds a counter for possible cpus, so that
users that call num_possible_cpus() would know the result immediately,
instead of calling the bitmap_weight for the mask underlying.
So what user actually cares about performance here enough to warrant
this?

+EXPORT_SYMBOL(set_cpu_possible);
NAK
Thread (24 messages) 24 messages, 4 authors, last reply 2021-12-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help