Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1163095 > unrolled thread
| Started by | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| First post | 2015-06-11 11:40 +0200 |
| Last post | 2015-06-11 11:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2015-06-11 11:40 +0200
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Date | 2015-06-11 11:40 +0200 |
| Subject | Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection |
| Message-ID | <pA77P-1Bx-3@gated-at.bofh.it> |
On Thu, May 07 2015, Rasmus Villemoes <linux@rasmusvillemoes.dk> wrote:
> 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.
>
> The first four patches eliminate the cpu_xyz_mask variables by simply
> exposing the actual bitmaps, after renaming them to discourage direct
> access - that still happens through cpu_xyz_mask, which are now simply
> macros with the same type and value as they used to have.
>
> After that, there's no longer any reason to have the setter functions
> be out-of-line: The boolean parameter is almost always a literal true
> or false, so by making them static inlines they will usually compile
> to one or two instructions.
>
> Altogether, bloat-o-meter reports a saving of ~2600 bytes.
ping...
--
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 top | Article view | linux.kernel
csiph-web