linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
To: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: [PATCH v3 0/5] pseries: Move memory hotplug to the kernel
Date: Tue, 10 Feb 2015 13:40:49 -0600	[thread overview]
Message-ID: <54DA5EC1.2060403@linux.vnet.ibm.com> (raw)

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(-)

             reply	other threads:[~2015-02-10 19:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 19:40 Nathan Fontenot [this message]
2015-02-10 19:43 ` [PATCH v3 1/5]pseries: Define rtas hotplug event sections Nathan Fontenot
2015-02-10 19:45 ` [PATCH v3 2/5] pseries: Export the acquire/release drc index routines Nathan Fontenot
2015-02-10 19:47 ` [PATCH v3 3/5] pseries: Create new device hotplug entry point Nathan Fontenot
2015-02-10 19:48 ` [PATCH v3 4/5] pseries: Implement memory hotplug add in the kernel Nathan Fontenot
2015-02-10 19:49 ` [PATCH v3 5/5] pseries: Implement memory hotplug remove " Nathan Fontenot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DA5EC1.2060403@linux.vnet.ibm.com \
    --to=nfont@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).