Skip to content

pseries: Move memory hotplug to the kernel

Nathan Fontenot linuxppc-dev 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 0 repliesNew
  2. v26 patches 13 repliesSuperseded
  3. v15 patches 13 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5pseries: Define rtas hotplug event sectionsarch/powerpc/include/asm/rtas.h+26 -00 replies
2/5pseries: Export the acquire/release drc index routinesarch/powerpc/platforms/pseries/pseries.h+2 -00 replies
3/5pseries: Create new device hotplug entry pointarch/powerpc/platforms/pseries/dlpar.c arch/powerpc/platforms/pseries/hotplug-memory.c arch/powerpc/platforms/pseries/pseries.h+145 -20 replies
4/5pseries: Implement memory hotplug add in the kernelarch/powerpc/platforms/pseries/hotplug-memory.c+265 -10 replies
5/5pseries: Implement memory hotplug remove in the kernelarch/powerpc/platforms/pseries/hotplug-memory.c+191 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/5] pseries: Move memory hotplug to the kernel

In order to improve hotplug support for cpus, memory, and pci devices in the PowerVM and PowerKVM environments, the handling of hotplugging devices should be updated to perform the hotplug operation entirely in the kernel. This patch set begins to address this by providing a framework and a common entry point for hotplug operations for the PowerVM anbd PowerKVM environments. This patch set also moves memory hotplug into the kernel. Patches to follow will do the same for cpus and pci devices.

To provide background, the current handling of memory hotplug is done by the drmgr command in user space. This command is invoked when memory add/remove requests are made at the HMC and conveyed to a partition through the RSCT framework. The drmgr command then performs parts of the hotplug in user-space and makes requests to the kernel to perform other pieces. This is not really ideal, we can do everything in the kernel and do it faster.

In this patch set the handling of hotplug requests for pseries kernels uses rtas hotplug events to communicate the hotplug request. For PowerKVM systems the rtas hotplug request is communicated to the guest by qemu using the ras epow interrupt, the current scheme also used for pci hotplug. For PowerVM systems the drmgr command will be updated to communicate the hotplug request by writing to /sys/kernel/dlpar. The format for hotplug requests for this file is of the form "<resource> <action> <id_type> <id>". The kernel will parse this request and create a rtas hotplug section that can be passed to a common kernel hotplug entry point for PowerVM and PowerKVM environments.

-Nathan

Patch 1/5
- Add definition of hotplug rtas event sections.

Patch 2/5
- export the dlpar_[acquire|release]_drc() routines.

Patch 3/5
- Create the new /sys/kernel/dpar interface

Patch 4/5
- Implement memory hotplug add in the kernel.

Patch 5/5
- Implement memory hotplug remove in the kernel.

 include/asm/rtas.h                 |   26 ++
 platforms/pseries/dlpar.c          |  118 ++++++++-
 platforms/pseries/hotplug-memory.c |  477 ++++++++++++++++++++++++++++++++++++-
 platforms/pseries/pseries.h        |   12 
 4 files changed, 629 insertions(+), 4 deletions(-)