[PATCH v3 0/5] pseries: Move memory hotplug to the kernel
Nathan Fontenot
nfont at linux.vnet.ibm.com
Wed Feb 11 06:40:49 AEDT 2015
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(-)
More information about the Linuxppc-dev
mailing list