Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1233624
| From | Rusty Russell <rusty@rustcorp.com.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection |
| Date | 2015-09-27 08:40 +0200 |
| Message-ID | <qddMS-7Cu-7@gated-at.bofh.it> (permalink) |
| References | <qcFUR-VU-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
> Maybe third time's the charm...
>
> The four cpumasks cpu_{possible,online,present,active}_bits are
> exposed readonly via the corresponding const variables
> cpu_xyz_mask. But they are also accessible for arbitrary writing via
> the exposed functions set_cpu_xyz. There's quite a bit of code
> throughout the kernel which iterates over or otherwise accesses these
> bitmaps, and having the access go via the cpu_xyz_mask variables is
> simply a useless indirection.
Thanks, consider all patches Acked-by: Rusty Russell <rusty@rustcorp.com.au>
But to be clear, it has outlived its usefulness, but it was not useless.
In particular, there used to be a debug config where 'struct cpumask'
wasn't defined, so we could catch people declaring 'struct cpumask' on
the stack (or passing by value).
There was a plan to remove CONFIG_NR_CPUS (ie. having no compile-time
cpu limit), but it seemed overkill and was abandoned. But avoiding
'struct cpumask' (not struct cpumask *) in the core wherever possible
was a step towards it.
Hope that clarifies,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/5] kernel/cpu.c: eliminate some indirection Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-25 20:30 +0200
[PATCH 1/5] kernel/cpu.c: change type of cpu_possible_bits and friends Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-25 20:30 +0200
[PATCH 5/5] kernel/cpu.c: make set_cpu_* static inlines Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-25 20:30 +0200
Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rusty Russell <rusty@rustcorp.com.au> - 2015-09-27 08:40 +0200
Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-09-28 08:30 +0200
Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rusty Russell <rusty@rustcorp.com.au> - 2015-09-29 01:40 +0200
csiph-web