Skip to content

pseries: Add cede support for cpu-offline

Gautham R Shenoy linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 7 repliesIn review
  2. v44 patches 1 replySuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4pSeries: extended_cede_processor() helper function.arch/powerpc/include/asm/lppaca.h arch/powerpc/platforms/pseries/plpar_wrappers.h arch/powerpc/xmon/xmon.c+32 -20 replies
2/4pSeries: Add hooks to put the CPU into an appropriate offline stateDocumentation/cpu-hotplug.txt arch/powerpc/platforms/pseries/hotplug-cpu.c arch/powerpc/platforms/pseries/offline_states.h +1 more+216 -91 reply
3/4pseries: Add code to online/offline CPUs of a DLPAR node.arch/powerpc/platforms/pseries/dlpar.c+101 -00 replies
4/4pseries: Serialize cpu hotplug operations during deactivate Vs deallocatearch/powerpc/platforms/pseries/dlpar.c drivers/base/cpu.c include/linux/cpu.h+38 -50 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPeter Zijlstra
SeriesA-b
1/4
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] pseries: Add cede support for cpu-offline

Hi,

This is version 5 of patch series that provides a framework to choose the state a pseries CPU must be put to when it is offlined.

Previous versions can be found here:
Version 4: http://lkml.org/lkml/2009/10/9/59
Version 3: http://lkml.org/lkml/2009/9/15/164
Version 2: http://lkml.org/lkml/2009/8/28/102
Version 1: http://lkml.org/lkml/2009/8/6/236

Changes from the previous version include:
- Rebased against Nathan Fontenot's latest "pseries kernel handling of dynamic logical paritioning v4" patches found here:
http://lkml.org/lkml/2009/10/21/98

- Added boot-time option to disable putting the offlined vcpus into an extended H_CEDE state.

- Addressed Ben's comments regarding the if-else sequencing in pseries_mach_cpu_die().

- Addition of comments for pseries_cpu_die() to distinguish it from pseries_mach_cpu_die()

Also,

- This approach addresses Peter Z's objections regarding layering violations. The user simply offlines the cpu and doesn't worry about what state the CPU should be put into. That part is automatically handled by the kernel.

- It does not add any additional sysfs interface instead uses the existing sysfs interface to offline CPUs.

- On platforms which do not have support for ceding the vcpu with a latency specifier value, the offlining mechanism defaults to the current method of calling rtas_stop_self().

The patchset has been tested on the available pseries platforms and it works as per the expectations. I believe that the patch set is ready for inclusion.
---

Gautham R Shenoy (4):
pseries: Serialize cpu hotplug operations during deactivate Vs deallocate
pseries: Add code to online/offline CPUs of a DLPAR node.
pSeries: Add hooks to put the CPU into an appropriate offline state
pSeries: extended_cede_processor() helper function.

 Documentation/cpu-hotplug.txt                   |    6 +
 arch/powerpc/include/asm/lppaca.h               |    9 +
 arch/powerpc/platforms/pseries/dlpar.c          |  129 ++++++++++++++++
 arch/powerpc/platforms/pseries/hotplug-cpu.c    |  182 ++++++++++++++++++++++-
 arch/powerpc/platforms/pseries/offline_states.h |   18 ++
 arch/powerpc/platforms/pseries/plpar_wrappers.h |   22 +++
 arch/powerpc/platforms/pseries/smp.c            |   19 ++
 arch/powerpc/xmon/xmon.c                        |    3 
 drivers/base/cpu.c                              |    2 
 include/linux/cpu.h                             |   13 ++
 10 files changed, 387 insertions(+), 16 deletions(-)
 create mode 100644 arch/powerpc/platforms/pseries/offline_states.h
Signature · 2 lines
Thanks and Regards
gautham.