From: Rusty Russell <rusty@rustcorp.com.au>
To: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Thomas Gleixner <tglx@linutronix.de>,
Oleg Nesterov <oleg@redhat.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection
Date: Sun, 27 Sep 2015 16:01:09 +0930 [thread overview]
Message-ID: <87twqgpe4y.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1443205347-13634-1-git-send-email-linux@rasmusvillemoes.dk>
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.
next prev parent reply other threads:[~2015-09-27 6:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-25 18:22 [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rasmus Villemoes
2015-09-25 18:22 ` [PATCH 1/5] kernel/cpu.c: change type of cpu_possible_bits and friends Rasmus Villemoes
2015-09-25 18:22 ` [PATCH 2/5] kernel/cpu.c: export __cpu_*_mask Rasmus Villemoes
2015-09-25 18:22 ` [PATCH 3/5] drivers/base/cpu.c: use __cpu_*_mask directly Rasmus Villemoes
2015-10-04 19:09 ` Greg Kroah-Hartman
2015-09-25 18:22 ` [PATCH 4/5] kernel/cpu.c: eliminate cpu_*_mask Rasmus Villemoes
2015-09-28 6:02 ` kbuild test robot
2015-09-28 6:39 ` Rasmus Villemoes
2015-10-05 23:10 ` Rasmus Villemoes
2015-10-06 6:26 ` Michael Ellerman
2015-09-25 18:22 ` [PATCH 5/5] kernel/cpu.c: make set_cpu_* static inlines Rasmus Villemoes
2015-09-27 6:31 ` Rusty Russell [this message]
2015-09-28 6:21 ` [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rasmus Villemoes
2015-09-28 21:44 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2015-05-06 22:52 Rasmus Villemoes
2015-06-11 9:31 ` Rasmus Villemoes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twqgpe4y.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.