All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/48] percpu: Consistent per cpu operations V4
@ 2014-02-14 20:18 Christoph Lameter
  2014-02-14 20:18 ` [PATCH 01/48] percpu: Add raw_cpu_ops Christoph Lameter
                   ` (48 more replies)
  0 siblings, 49 replies; 87+ messages in thread
From: Christoph Lameter @ 2014-02-14 20:18 UTC (permalink / raw)
  To: Tejun Heo
  Cc: akpm, rostedt, linux-kernel, Ingo Molnar, Peter Zijlstra,
	Thomas Gleixner

Can we please get this merged? The first patch alone would at least define
the functions required to enable the merging of the rest in any order and
through any tree.

There is a git tree that can be pulled at 

https://git.kernel.org/cgit/linux/kernel/git/christoph/percpu.git/

It has the following branches:

minimal		Just the first 5 patches to get the preemption checks going
most		All the conversion but not the removal of functionality in 47/48
all		All these patches 

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.


^ permalink raw reply	[flat|nested] 87+ messages in thread

end of thread, other threads:[~2014-03-07 18:16 UTC | newest]

Thread overview: 87+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-14 20:18 [PATCH 00/48] percpu: Consistent per cpu operations V4 Christoph Lameter
2014-02-14 20:18 ` [PATCH 01/48] percpu: Add raw_cpu_ops Christoph Lameter
2014-02-14 20:18 ` [PATCH 02/48] mm: Use raw_cpu ops for determining current NUMA node Christoph Lameter
2014-02-14 20:18   ` Christoph Lameter
2014-02-14 20:18 ` [PATCH 03/48] modules: Use raw_cpu_write for initialization of per cpu refcount Christoph Lameter
2014-02-14 20:18 ` [PATCH 04/48] net: Replace __this_cpu_inc in route.c with raw_cpu_inc Christoph Lameter
2014-02-14 20:18 ` [PATCH 05/48] percpu: Add preemption checks to __this_cpu ops Christoph Lameter
2014-03-04 22:27   ` Andrew Morton
2014-03-04 23:27     ` Steven Rostedt
2014-03-05  3:27     ` Christoph Lameter
2014-03-05 21:34       ` Andrew Morton
2014-02-14 20:18 ` [PATCH 06/48] mm: Replace __get_cpu_var uses with this_cpu_ptr Christoph Lameter
2014-02-14 20:18   ` Christoph Lameter
2014-02-14 20:18 ` [PATCH 07/48] tracing: " Christoph Lameter
2014-02-14 20:18 ` [PATCH 08/48] percpu: Replace __get_cpu_var " Christoph Lameter
2014-02-14 20:18 ` [PATCH 09/48] kernel misc: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:18 ` [PATCH 10/48] drivers/char/random: " Christoph Lameter
2014-02-14 20:18 ` [PATCH 11/48] drivers/cpuidle: Replace __get_cpu_var uses for address calculation Christoph Lameter
2014-02-14 20:18 ` [PATCH 12/48] drivers/oprofile: " Christoph Lameter
2014-02-14 20:18 ` [PATCH 13/48] drivers/leds: Replace __get_cpu_var use through this_cpu_ptr Christoph Lameter
2014-02-14 20:18 ` [PATCH 14/48] drivers/clocksource: Replace __get_cpu_var used for address calculation Christoph Lameter
2014-02-14 20:18 ` [PATCH 15/48] parisc: Replace __get_cpu_var uses " Christoph Lameter
2014-02-14 20:18   ` Christoph Lameter
2014-02-14 20:18 ` [PATCH 16/48] metag: " Christoph Lameter
2014-02-14 20:18 ` [PATCH 17/48] drivers/net/ethernet/tile: " Christoph Lameter
2014-02-14 20:18 ` [PATCH 18/48] drivers/net/ethernet/tile: __get_cpu_var call introduced in 3.14 Christoph Lameter
2014-02-14 20:19 ` [PATCH 19/48] tilegx: Another case of get_cpu_var Christoph Lameter
2014-02-14 20:19 ` [PATCH 20/48] time: Replace __get_cpu_var uses Christoph Lameter
2014-02-15 11:33   ` Thomas Gleixner
2014-02-14 20:19 ` [PATCH 21/48] scheduler: Replace __get_cpu_var with this_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 22/48] tick-sched: Fix two new uses of __get_cpu_ptr Christoph Lameter
2014-02-15 11:33   ` Thomas Gleixner
2014-02-14 20:19 ` [PATCH 23/48] block: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 24/48] rcu: Replace __this_cpu_ptr uses " Christoph Lameter
2014-02-16 16:17   ` Paul E. McKenney
2014-02-14 20:19 ` [PATCH 25/48] watchdog: Replace __raw_get_cpu_var uses Christoph Lameter
2014-02-14 20:19 ` [PATCH 26/48] net: Replace get_cpu_var through this_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 27/48] md: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 28/48] irqchips: Replace __this_cpu_ptr uses Christoph Lameter
2014-02-14 20:19 ` [PATCH 29/48] x86: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19 ` [PATCH 30/48] x86: Change __get_cpu_var calls introduced in 3.14 Christoph Lameter
2014-02-14 20:19 ` [PATCH 31/48] uv: Replace __get_cpu_var Christoph Lameter
2014-03-04 23:02   ` Andrew Morton
2014-03-04 23:42     ` Steven Rostedt
2014-03-04 23:47       ` Andrew Morton
2014-03-05  0:18     ` H. Peter Anvin
2014-03-05  3:31     ` Christoph Lameter
2014-03-05  4:00       ` Andrew Morton
2014-03-05 15:35         ` Christoph Lameter
2014-03-05 21:57         ` Christoph Lameter
2014-03-06  2:53           ` Mike Travis
2014-03-07 18:16             ` Christoph Lameter
2014-02-14 20:19 ` [PATCH 32/48] arm: Replace __this_cpu_ptr with raw_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 33/48] MIPS: Replace __get_cpu_var uses in FPU emulator Christoph Lameter
2014-02-14 20:19 ` [PATCH 34/48] mips: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19 ` [PATCH 35/48] s390: rename __this_cpu_ptr to raw_cpu_ptr Christoph Lameter
2014-02-14 20:19 ` [PATCH 36/48] s390: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19 ` [PATCH 37/48] s390: Handle new __get_cpu_var calls added in 3.14 Christoph Lameter
2014-02-14 20:19 ` [PATCH 38/48] ia64: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19   ` Christoph Lameter
2014-02-14 20:19 ` [PATCH 39/48] powerpc: " Christoph Lameter
2014-02-15  3:50   ` Benjamin Herrenschmidt
2014-02-15  4:26     ` Steven Rostedt
2014-02-15  7:54       ` Mike Galbraith
2014-02-15 10:00         ` Benjamin Herrenschmidt
2014-02-15 11:29           ` Mike Galbraith
2014-02-15  9:59       ` Benjamin Herrenschmidt
2014-02-15  9:42     ` Peter Zijlstra
2014-02-15 10:01       ` Benjamin Herrenschmidt
2014-02-15 12:07         ` Andreas Schwab
2014-02-15 15:45         ` Peter Zijlstra
2014-02-15 18:12           ` David Woodhouse
2014-02-15 20:32             ` Benjamin Herrenschmidt
2014-02-15 20:52               ` Benjamin Herrenschmidt
2014-02-14 20:19 ` [PATCH 40/48] powerpc: Handle new __get_cpu_var calls in 3.14 Christoph Lameter
2014-02-14 20:19 ` [PATCH 41/48] sparc: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19   ` Christoph Lameter
2014-02-14 20:19 ` [PATCH 42/48] tile: " Christoph Lameter
2014-02-14 20:19 ` [PATCH 43/48] blackfin: " Christoph Lameter
2014-02-14 20:19 ` [PATCH 44/48] avr32: Replace __get_cpu_var with __this_cpu_write Christoph Lameter
2014-02-14 20:19 ` [PATCH 45/48] alpha: Replace __get_cpu_var Christoph Lameter
2014-02-14 20:19 ` [PATCH 46/48] sh: Replace __get_cpu_var uses Christoph Lameter
2014-02-14 20:19   ` Christoph Lameter
2014-02-14 20:19 ` [PATCH 47/48] Remove __get_cpu_var and __raw_get_cpu_var macros [only in 3.16] Christoph Lameter
2014-02-14 20:19 ` [PATCH 48/48] percpu: Remove __this_cpu_ptr Christoph Lameter
2014-03-04 22:27 ` [PATCH 00/48] percpu: Consistent per cpu operations V4 Andrew Morton
2014-03-05  3:29   ` Christoph Lameter

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.