Re: [PATCH 5/5] cpumask: fix comment of cpumask_xxx

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2023-03-06 18:41:30
Also in
linux-scsi, lkml
Reply to
Vernon Yang, 2023-03-06
On Mon, Mar 6, 2023 at 10:13 AM Vernon Yang [off-list ref] wrote:
I also just see nr_cpumask_size exposed to outside, so...
Yeah, it's not great.

nr_cpumask_bits came out of the exact same "this is an internal value
that we use for optimized cpumask accesses", and existed exactly
because it *might* be the same as 'nr_cpu_ids', but it might also be a
simpler "small constant that is big enough" case.

It just depended on the exact kernel config which one was used.

But clearly that internal value then spread outside, and that then
caused problems when the internal implementation changed.

            Linus
Thread (19 messages) 19 messages, 4 authors, last reply 2023-03-06
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