percpu: Consistent per cpu operations V1
Status from this message: Applied to percpu/for-3.14.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/41 | mm: Replace __get_cpu_var uses with this_cpu_ptrlib/ mm/ mm/ +5 more | +13 | 1 reply | |
| 2/41 | tracing: Replace __get_cpu_var uses with this_cpu_ptrinclude/ kernel/ kernel/ | +4 | 2 replies | |
| 3/41 | percpu: Replace __get_cpu_var with this_cpu_ptrinclude/ | +1 | 1 reply | |
| 4/41 | kernel misc: Replace __get_cpu_var useskernel/ kernel/ | +7 | 1 reply | |
| 5/41 | drivers/char/random: Replace __get_cpu_var usesdrivers/ | +1 | 1 reply | |
| 6/41 | drivers/cpuidle: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +5 | 1 reply | |
| 7/41 | drivers/oprofile: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +6 | 0 replies | |
| 8/41 | drivers/leds: Replace __get_cpu_var use through this_cpu_ptrdrivers/ | +1 | 1 reply | |
| 9/41 | drivers/clocksource: Replace __get_cpu_var used for address calculationdrivers/ | +1 | 1 reply | |
| 10/41 | staging/zsmalloc: Replace instances of using __get_cpu_var for address calculationdrivers/ | +2 | 1 reply | |
| 11/41 | parisc: Replace __get_cpu_var uses for address calculationarch/ arch/ | +2 | 6 replies | |
| 12/41 | metag: Replace __get_cpu_var uses for address calculationarch/ | +7 | 0 replies | |
| 13/41 | percpu: Add raw_cpu_opsarch/ include/ include/ | +207 | 13 replies | |
| 14/41 | x86: Rename __this_cpu_xxx_# operations to raw_cpu_xxx_#arch/ arch/ | +57 | 0 replies | |
| 15/41 | mm: Use raw_cpu ops for determining current NUMA nodeinclude/ | +2 | 0 replies | |
| 16/41 | modules: Use raw_cpu_write for initialization of per cpu refcount.kernel/ | +1 | 0 replies | |
| 17/41 | net:i Replace __this_cpu_inc in route.c with raw_cpu_incnet/ | +1 | 0 replies | |
| 18/41 | percpu: Add preemption checks to __this_cpu opsinclude/ lib/ | +46 | 0 replies | |
| 19/41 | time: Replace __get_cpu_var usesdrivers/ kernel/ kernel/ +6 more | +34 | 0 replies | |
| 20/41 | scheduler: Replace __get_cpu_var with this_cpu_ptrinclude/ kernel/ kernel/ +5 more | +22 | 0 replies | |
| 21/41 | block: Replace __this_cpu_ptr with raw_cpu_ptrfs/ fs/ | +2 | 3 replies | |
| 22/41 | rcu: Replace __this_cpu_ptr uses with raw_cpu_ptrkernel/ kernel/ | +5 | 2 replies | |
| 23/41 | watchdog: Replace __raw_get_cpu_var useskernel/ | +5 | 0 replies | |
| 24/41 | net: Replace get_cpu_var through this_cpu_ptrinclude/ include/ net/ +8 more | +20 | 0 replies | |
| 25/41 | drivers/net/ethernet/tile: Replace __get_cpu_var uses for address calculationdrivers/ drivers/ | +13 | 1 reply | |
| 26/41 | md: Replace __this_cpu_ptr with raw_cpu_ptrdrivers/ | +1 | 0 replies | |
| 27/41 | irqchips: Replace __this_cpu_ptr usesdrivers/ kernel/ | +6 | 0 replies | |
| 28/41 | x86: Replace __get_cpu_var usesarch/ arch/ arch/ +29 more | +142 | 0 replies | |
| 29/41 | arm: Replace __this_cpu_ptr with raw_cpu_ptrarch/ arch/ | +7 | 0 replies | |
| 30/41 | mips: Replace __get_cpu_var usesarch/ arch/ arch/ +2 more | +27 | 0 replies | |
| 31/41 | s390: Replace __get_cpu_var usesarch/ arch/ arch/ +8 more | +36 | 0 replies | |
| 32/41 | ia64: Replace __get_cpu_var usesarch/ arch/ arch/ +11 more | +40 | 0 replies | |
| 33/41 | powerpc: Replace __get_cpu_var usesarch/ arch/ arch/ +28 more | +91 | 0 replies | |
| 34/41 | sparc: Replace __get_cpu_var usesarch/ arch/ arch/ +7 more | +35 | 0 replies | |
| 35/41 | tile: Replace __get_cpu_var usesarch/ arch/ arch/ +9 more | +31 | 2 replies | |
| 36/41 | blackfin: Replace __get_cpu_var usesarch/ arch/ arch/ +1 more | +11 | 0 replies | |
| 37/41 | avr32: Replace __get_cpu_var with __this_cpu_writearch/ | +1 | 0 replies | |
| 38/41 | alpha: Replace __get_cpu_vararch/ arch/ | +10 | 0 replies | |
| 39/41 | sh: Replace __get_cpu_var usesarch/ arch/ arch/ +2 more | +23 | 0 replies | |
| 40/41 | Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.15]include/ | +0 | 0 replies | |
| 41/41 | percpu: Remove __this_cpu_ptrinclude/ | +0 | 0 replies |
Reviews trailers per patch
11 of 41 patches have a Reviewed-by or Acked-by.
| Patch | Heiko Carstens | James Hogan | Rafael J. Wysocki | Hans-Christian Egtvedt | David S. Miller | Bryan Wu | Masami Hiramatsu | Chris Metcalf | Ingo Molnar | Steven Rostedt |
|---|---|---|---|---|---|---|---|---|---|---|
| 1/41 | ||||||||||
| 2/41 | A-b | A-b | ||||||||
| 3/41 | ||||||||||
| 4/41 | ||||||||||
| 5/41 | ||||||||||
| 6/41 | A-b | |||||||||
| 7/41 | ||||||||||
| 8/41 | A-b | |||||||||
| 9/41 | A-b | |||||||||
| 10/41 | ||||||||||
| 11/41 | ||||||||||
| 12/41 | A-b | |||||||||
| 13/41 | A-b | |||||||||
| 14/41 | ||||||||||
| 15/41 | ||||||||||
| 16/41 | ||||||||||
| 17/41 | ||||||||||
| 18/41 | ||||||||||
| 19/41 | ||||||||||
| 20/41 | ||||||||||
| 21/41 | ||||||||||
| 22/41 | ||||||||||
| 23/41 | ||||||||||
| 24/41 | ||||||||||
| 25/41 | A-b | |||||||||
| 26/41 | ||||||||||
| 27/41 | ||||||||||
| 28/41 | ||||||||||
| 29/41 | ||||||||||
| 30/41 | ||||||||||
| 31/41 | A-b | |||||||||
| 32/41 | ||||||||||
| 33/41 | ||||||||||
| 34/41 | A-b | |||||||||
| 35/41 | A-b | |||||||||
| 36/41 | ||||||||||
| 37/41 | A-b | |||||||||
| 38/41 | ||||||||||
| 39/41 | ||||||||||
| 40/41 | ||||||||||
| 41/41 |
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/41] percpu: Consistent per cpu operations V1
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 patchset 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 patchset 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 patchset 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 patchset 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 patchset works in a couple of stages:
I. Patches 1-12 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.
II. Patch 13 adds the additional raw_cpu operations and raw_cpu_ptr().
Patch 14 converts the existing __this_cpu_xx_# primitive in the x86 code to raw_cpu_xx_#.
III. Patch 15-17 use the raw_cpu operations in places that would give
us false positives once they are enabled.
IV. Patch 18 adds preemption checks to __this_cpu operations to allow
checking if preemption is properly disabled when these functions are used.
V. Patches 19-39 are conversion patches that use this_cpu operations
in various kernel subsystems/drivers or arch code.
VI. Patches 41/42 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 additonal passes through the kernel to ensure that none of the uses of these functions remain.