[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87twqgpe4y.fsf@rustcorp.com.au>
Date: Sun, 27 Sep 2015 16:01:09 +0930
From: Rusty Russell <rusty@...tcorp.com.au>
To: Rasmus Villemoes <linux@...musvillemoes.dk>,
Thomas Gleixner <tglx@...utronix.de>,
Oleg Nesterov <oleg@...hat.com>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Rasmus Villemoes <linux@...musvillemoes.dk>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection
Rasmus Villemoes <linux@...musvillemoes.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@...tcorp.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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists