linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 00/10][RESEND] CPU hotplug: stop_machine()-free CPU hotplug
@ 2012-12-05 18:42 Srivatsa S. Bhat
  2012-12-05 18:43 ` [RFC PATCH v2 01/10] CPU hotplug: Provide APIs for "light" atomic readers to prevent CPU offline Srivatsa S. Bhat
                   ` (9 more replies)
  0 siblings, 10 replies; 41+ messages in thread
From: Srivatsa S. Bhat @ 2012-12-05 18:42 UTC (permalink / raw)
  To: tglx, peterz, paulmck, rusty, mingo, akpm, namhyung,
	vincent.guittot, tj, oleg
  Cc: sbw, amit.kucheria, rostedt, rjw, srivatsa.bhat, wangyun,
	xiaoguangrong, nikunj, linux-pm, linux-kernel

[Resending because I forgot to CC lkml last time. Please send your replies to
this thread instead of the previous (non-public) one. Sorry for the trouble!]

Hi,

This patchset removes CPU hotplug's dependence on stop_machine() from the CPU
offline path and provides an alternative (set of APIs) to preempt_disable() to
prevent CPUs from going offline, which can be invoked from atomic context.

This is an RFC patchset with only a few call-sites of preempt_disable()
converted to the new APIs for now, and the main goal is to get feedback on the
design of the new atomic APIs and see if it serves as a viable replacement for
stop_machine()-free CPU hotplug.

Overview of the patches:
-----------------------

Patch 1 introduces the new APIs that can be used from atomic context, to
prevent CPUs from going offline. This set of APIs is for "light" atomic
hotplug readers (the term "light" is explained in the changelog/comments).

Patch 2 introduces the new APIs for "full" atomic hotplug readers.

Patch 3 is a cleanup; it converts preprocessor macros to static inline
functions.

Patches 4 to 9 convert various call-sites to use the new APIs.
(Patches 4 to 8 deal with "light" readers, patch 9 deals with a "full"
reader. Together, they demonstrate how to use these APIs effectively).

Patch 10 is the one which actually removes stop_machine() from the CPU
offline path.


Changes in v2:
-------------
* Completely redesigned the synchronization scheme to avoid using any extra
  cpumasks.

* Provided APIs for 2 types of atomic hotplug readers: "light" (for
  light-weight) and "full". We wish to have more "light" readers than
  the "full" ones, to avoid indirectly inducing the "stop_machine effect"
  without even actually using stop_machine().

  And the patches show that it _is_ generally true: 5 patches deal with
  "light" readers, whereas only 1 patch deals with a "full" reader.

  Also, the "light" readers happen to be in very hot paths. So it makes a
  lot of sense to have such a distinction and a corresponding light-weight
  API.

v1: https://lkml.org/lkml/2012/12/4/88

Comments and suggestions welcome!

--
 Paul E. McKenney (1):
      cpu: No more __stop_machine() in _cpu_down()

Srivatsa S. Bhat (9):
      CPU hotplug: Provide APIs for "light" atomic readers to prevent CPU offline
      CPU hotplug: Provide APIs for "full" atomic readers to prevent CPU offline
      CPU hotplug: Convert preprocessor macros to static inline functions
      smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly
      smp, cpu hotplug: Fix on_each_cpu_*() to prevent CPU offline properly
      sched, cpu hotplug: Use stable online cpus in try_to_wake_up() & select_task_rq()
      kick_process(), cpu-hotplug: Prevent offlining of target CPU properly
      yield_to(), cpu-hotplug: Prevent offlining of other CPUs properly
      kvm, vmx: Add full atomic synchronization with CPU Hotplug


  arch/x86/kvm/vmx.c  |    8 ++-
 include/linux/cpu.h |   12 ++++-
 kernel/cpu.c        |  136 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 kernel/sched/core.c |   22 +++++++-
 kernel/smp.c        |   64 +++++++++++++++---------
 5 files changed, 210 insertions(+), 32 deletions(-)



Thanks,
Srivatsa S. Bhat
IBM Linux Technology Center


^ permalink raw reply	[flat|nested] 41+ messages in thread
[parent not found: <20121205131038.17383.55472.stgit@srivatsabhat.in.ibm.com>]

end of thread, other threads:[~2012-12-10 19:07 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-05 18:42 [RFC PATCH v2 00/10][RESEND] CPU hotplug: stop_machine()-free CPU hotplug Srivatsa S. Bhat
2012-12-05 18:43 ` [RFC PATCH v2 01/10] CPU hotplug: Provide APIs for "light" atomic readers to prevent CPU offline Srivatsa S. Bhat
2012-12-05 18:47   ` Srivatsa S. Bhat
2012-12-05 18:51     ` Srivatsa S. Bhat
2012-12-05 18:53       ` Srivatsa S. Bhat
2012-12-05 18:56         ` Srivatsa S. Bhat
2012-12-05 18:59           ` Srivatsa S. Bhat
2012-12-05 20:14             ` Srivatsa S. Bhat
2012-12-06 16:18               ` Oleg Nesterov
2012-12-06 18:48                 ` Srivatsa S. Bhat
2012-12-06 19:17                   ` Srivatsa S. Bhat
2012-12-07 21:01                     ` Oleg Nesterov
2012-12-06 19:28                   ` Steven Rostedt
2012-12-06 19:36                     ` Srivatsa S. Bhat
2012-12-06 22:02                       ` Steven Rostedt
2012-12-07 17:33                         ` Srivatsa S. Bhat
     [not found]                     ` <20121207200014.GB13238@redhat.com>
2012-12-10 18:21                       ` Oleg Nesterov
2012-12-10 19:07                         ` Steven Rostedt
2012-12-07 19:56                   ` Oleg Nesterov
2012-12-07 20:25                     ` Srivatsa S. Bhat
2012-12-07 20:59                       ` Oleg Nesterov
2012-12-05 19:07   ` Oleg Nesterov
2012-12-05 19:16     ` Srivatsa S. Bhat
2012-12-05 18:43 ` [RFC PATCH v2 02/10] CPU hotplug: Provide APIs for "full" " Srivatsa S. Bhat
2012-12-05 19:01   ` Srivatsa S. Bhat
2012-12-05 20:31     ` Srivatsa S. Bhat
2012-12-05 20:57       ` Tejun Heo
2012-12-06  4:31         ` Srivatsa S. Bhat
2012-12-05 18:43 ` [RFC PATCH v2 03/10] CPU hotplug: Convert preprocessor macros to static inline functions Srivatsa S. Bhat
2012-12-05 18:43 ` [RFC PATCH v2 04/10] smp, cpu hotplug: Fix smp_call_function_*() to prevent CPU offline properly Srivatsa S. Bhat
2012-12-05 18:43 ` [RFC PATCH v2 05/10] smp, cpu hotplug: Fix on_each_cpu_*() " Srivatsa S. Bhat
2012-12-05 18:44 ` [RFC PATCH v2 06/10] sched, cpu hotplug: Use stable online cpus in try_to_wake_up() & select_task_rq() Srivatsa S. Bhat
2012-12-05 18:44 ` [RFC PATCH v2 07/10] kick_process(), cpu-hotplug: Prevent offlining of target CPU properly Srivatsa S. Bhat
2012-12-05 18:44 ` [RFC PATCH v2 08/10] yield_to(), cpu-hotplug: Prevent offlining of other CPUs properly Srivatsa S. Bhat
2012-12-05 18:44 ` [RFC PATCH v2 09/10] kvm, vmx: Add full atomic synchronization with CPU Hotplug Srivatsa S. Bhat
2012-12-05 18:45 ` [RFC PATCH v2 10/10] cpu: No more __stop_machine() in _cpu_down() Srivatsa S. Bhat
2012-12-05 19:08   ` Oleg Nesterov
2012-12-05 19:12     ` Srivatsa S. Bhat
     [not found] <20121205131038.17383.55472.stgit@srivatsabhat.in.ibm.com>
     [not found] ` <20121205131136.17383.23318.stgit@srivatsabhat.in.ibm.com>
     [not found]   ` <20121205142316.GI3885@mtj.dyndns.org>
     [not found]     ` <20121205164640.GA7382@redhat.com>
     [not found]       ` <20121205165356.GL3885@mtj.dyndns.org>
2012-12-05 18:15         ` [RFC PATCH v2 01/10] CPU hotplug: Provide APIs for "light" atomic readers to prevent CPU offline Oleg Nesterov
2012-12-05 18:27           ` Tejun Heo
2012-12-05 18:32         ` Srivatsa S. Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).