percpu: Consistent per cpu operations V5
Status from this message: Applied to wq/for-3.17-consistent-ops.
Get series with b4
b4 am [email protected]Versions newest first
V4->V5 from the cover letter
- Remove patches that were merged
- Update patches against 3.16-rc1
- randconfig debugging on x86
- All patches can be merged individually now (asid from the last two that remove functions)
- Non x86 and powerpc architecture patches have minimal verification.
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/31 | kernel misc: Replace __get_cpu_var useskernel/ kernel/ | +5 | 1 reply | |
| 2/31 | time: Replace __get_cpu_var usesdrivers/ kernel/ kernel/ +7 more | +35 | 0 replies | |
| 3/31 | scheduler: Replace __get_cpu_var with this_cpu_ptrinclude/ kernel/ kernel/ +7 more | +26 | 1 reply | |
| 4/31 | block: Replace __this_cpu_ptr with raw_cpu_ptrfs/ | +1 | 1 reply | |
| 5/31 | drivers/char/random: Replace __get_cpu_var usesdrivers/ | +1 | 1 reply | |
| 6/31 | drivers/cpuidle: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +5 | 1 reply | |
| 7/31 | drivers/oprofile: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +6 | 2 replies | |
| 8/31 | drivers/clocksource: Replace __get_cpu_var used for address calculationdrivers/ | +1 | 1 reply | |
| 9/31 | drivers/net/ethernet/tile: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +13 | 1 reply | |
| 10/31 | watchdog: Replace __raw_get_cpu_var useskernel/ | +6 | 1 reply | |
| 11/31 | net: Replace get_cpu_var through this_cpu_ptrinclude/ include/ net/ +8 more | +20 | 1 reply | |
| 12/31 | md: Replace __this_cpu_ptr with raw_cpu_ptrdrivers/ | +1 | 1 reply | |
| 13/31 | metag: Replace __get_cpu_var uses for address calculationarch/ | +7 | 1 reply | |
| 14/31 | drivers/net/ethernet/tile: __get_cpu_var call introduced in 3.14drivers/ | +2 | 1 reply | |
| 15/31 | irqchips: Replace __this_cpu_ptr usesdrivers/ kernel/ | +6 | 1 reply | |
| 16/31 | x86: Replace __get_cpu_var usesarch/ arch/ arch/ +30 more | +150 | 0 replies | |
| 17/31 | uv: Replace __get_cpu_vararch/ arch/ | +23 | 1 reply | |
| 18/31 | arm: Replace __this_cpu_ptr with raw_cpu_ptrarch/ | +6 | 1 reply | |
| 19/31 | MIPS: Replace __get_cpu_var uses in FPU emulator.arch/ | +12 | 2 replies | |
| 20/31 | mips: Replace __get_cpu_var usesarch/ arch/ arch/ +2 more | +29 | 1 reply | |
| 21/31 | s390: Replace __get_cpu_var usesarch/ arch/ arch/ +9 more | +44 | 1 reply | |
| 22/31 | s390: cio driver &__get_cpu_var replacementsdrivers/ drivers/ drivers/ +2 more | +8 | 1 reply | |
| 23/31 | ia64: Replace __get_cpu_var usesarch/ arch/ arch/ +9 more | +38 | 1 reply | |
| 24/31 | alpha: Replace __get_cpu_vararch/ arch/ arch/ | +14 | 1 reply | |
| 25/31 | powerpc: Replace __get_cpu_var usesarch/ arch/ arch/ +29 more | +108 | 0 replies | |
| 26/31 | tile: Replace __get_cpu_var usesarch/ arch/ arch/ +9 more | +30 | 1 reply | |
| 27/31 | tile: Use this_cpu_ptr() for hardware countersarch/ | +6 | 1 reply | |
| 28/31 | blackfin: Replace __get_cpu_var usesarch/ arch/ arch/ +1 more | +11 | 1 reply | |
| 29/31 | avr32: Replace __get_cpu_var with __this_cpu_writearch/ | +1 | 1 reply | |
| 30/31 | Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.17]include/ | +0 | 0 replies | |
| 31/31 | percpu: Remove __this_cpu_ptrinclude/ | +0 | 0 replies |
Reviews trailers per patch
12 of 31 patches have a Reviewed-by or Acked-by.
| Patch | David S. Miller | Thomas Gleixner | Ingo Molnar | Rafael J. Wysocki | Chris Metcalf | James Hogan | Heiko Carstens | Richard Henderson | Hans-Christian Egtvedt | H. Peter Anvin |
|---|---|---|---|---|---|---|---|---|---|---|
| 1/31 | ||||||||||
| 2/31 | R-b | |||||||||
| 3/31 | A-b | |||||||||
| 4/31 | ||||||||||
| 5/31 | ||||||||||
| 6/31 | A-b | |||||||||
| 7/31 | ||||||||||
| 8/31 | A-b | |||||||||
| 9/31 | A-b | |||||||||
| 10/31 | ||||||||||
| 11/31 | A-b | |||||||||
| 12/31 | ||||||||||
| 13/31 | A-b | |||||||||
| 14/31 | ||||||||||
| 15/31 | ||||||||||
| 16/31 | A-b | A-b | ||||||||
| 17/31 | ||||||||||
| 18/31 | ||||||||||
| 19/31 | ||||||||||
| 20/31 | ||||||||||
| 21/31 | A-b | |||||||||
| 22/31 | ||||||||||
| 23/31 | ||||||||||
| 24/31 | A-b | |||||||||
| 25/31 | ||||||||||
| 26/31 | A-b | |||||||||
| 27/31 | ||||||||||
| 28/31 | ||||||||||
| 29/31 | A-b | |||||||||
| 30/31 | ||||||||||
| 31/31 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 10 reviewers.
Cover letter [PATCH 00/31] percpu: Consistent per cpu operations V5
V4->V5
- Remove patches that were merged
- Update patches against 3.16-rc1
- randconfig debugging on x86
- All patches can be merged individually now (asid from the last two that remove functions)
- Non x86 and powerpc architecture patches have minimal verification.
V3->V4:
- Rediff patches
- Put the patches first that define the new API.
- Add patches to convert the __get_cpu_var stuff added in 3.14
V2->V3:
- Rediff patches
- Fix breakage caused by mips patches. Add a mips patch to convert from local_t.
- Update some descriptions.
V1->V2:
- Move legacy definition for __this_cpu_ptr into include/asm-generic/percpu.h so that users bypassing include/linux/percpu.h do not break (affects tile and s390)
- Merge raw_cpu_ops core and the patch to rename x86 __this_cpu primitives into one. Otherwise breakage will occur since x86 __this_cpu ops will fall back to generic ops which is not tolerated well by the preempt hackery in x86.
- Add notes to each patch that depends on another to avoid mismerges. Add acks etc.
- Use quilt-0.61 with the bug fix that ensures all mailing lists receive the postings intended for them.
The kernel has never been audited to ensure that this_cpu operations are consistently used throughout the kernel. The code generated in many places can be improved through the use of this_cpu operations (which uses a segment register for relocation of per cpu offsets instead of performing address calculations).
The patch set also addresses various consistency issues in general with the per cpu macros.
A. The semantics of __this_cpu_ptr() differs from this_cpu_ptr only
because checks are skipped. This is typically shown through a raw_ prefix. So this patch set changes the places where __this_cpu_ptr() is used to raw_cpu_ptr().
B. There has been the long term wish by some that __this_cpu operations
would check for preemption. However, there are cases where preemption checks need to be skipped. This patch set adds raw_cpu operations that do not check for preemption and then adds preemption checks to the __this_cpu operations.
C. The use of __get_cpu_var is always a reference to a percpu variable
that can also be handled via a this_cpu operation. This patch set replaces all uses of __get_cpu_var with this_cpu operations.
D. We can then use this_cpu RMW operations in various places replacing
sequences of instructions by a single one.
E. The use of this_cpu operations throughout will allow other arches than
x86 to implement optimized references and RMV operations to work with per cpu local data.
F. The use of this_cpu operations opens up the possibility to
further optimize code that relies on synchronization through per cpu data.
The patch set works in a couple of stages:
I. Patch 1 adds the additional raw_cpu operations and raw_cpu_ptr().
Also converts the existing __this_cpu_xx_# primitive in the x86 code to raw_cpu_xx_#.
II. Patch 2-4 use the raw_cpu operations in places that would give
us false positives once they are enabled.
III. Patch 5 adds preemption checks to __this_cpu operations to allow
checking if preemption is properly disabled when these functions are used.
IV. Patches 6-20 are patches that simply replace uses of __get_cpu_var
with this_cpu_ptr. They do not depend on any changes to the percpu code. No preemption tests are skipped if they are applied.
V. Patches 21-46 are conversion patches that use this_cpu operations
in various kernel subsystems/drivers or arch code.
VI. Patches 47/48 remove no longer used functions (__this_cpu_ptr
and __get_cpu_var). These should only be applied after all the conversion patches have made it and after we have done additional passes through the kernel to ensure that none of the uses of these functions remain.