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: [RFC PATCH 0/4] Update hotplug for pseries systems
Date: Tue, 17 Jun 2014 10:42:36 -0500	[thread overview]
Message-ID: <53A061EC.10403@linux.vnet.ibm.com> (raw)

In order to support device hotplug (cpu, memory, and pci) in both the
PowerVM and the PowerKVM environments the handling of hotplug events
will need to be updated. This patch set adresses this by creating a
common entry point for handling hotplug events in the kernel that
can be used in both PowerVM and PowerKVM environments. To accomplish
this several changes need to be made.

For PowerVM systems hotplug (DLPAR) events are requested by users from the
HMC which then communicates the request to the partitions via the RSCT
framework. The RSCT framework then invokes the drmgr command to handle
the hotplug event. The drmgr command performs some of the work in user
space and makes calls into the kernel to handle the remaining work.

For PowerKVM systems hotplug events are communicated to the guest via
the ras epow interrupt by qemu. We could have the rtas event sent up
to user space through rtas_errd that would then invoke drmgr. This is
not the most ideal solution and it would be nicer to have hotplug
handled completely in the kernel.

To do this, hotplug events will now be communicated to the kernel in
the form of rtas hotplug events. For PowerKVM systems this is done
by qemu using the ras epow interrupt. For PowerVM systems the drmgr
command will be updated to create a rtas hotplug event and send it to
the kernel via a new /proc/powerpc/dlpar interface. Both of these
entry points for hotplug rtas events then call a common routine
for handling rtas hotplug events.

Additionally we will need to be able to handle all of the work to
do resource hotplug in the kernel. This patch set addresses this for
cpu and memory hotplug, pci hotplug will be done later.

Once all of the work is done to move hotplug handling into the kernel
we should also be able to get rid of the /proc/powerpc/ofdt interface.

Of course these updates do depend on updating the drmgr command. If
you care to look the updates for this is here;

https://github.com/nfont/powerpc-utils/tree/mem_rtas_hp

Patch 1/4:
o Create a common rtas hotplug event handling routine
o Create the /proc/powerpc/dlpar interface for PowerVM systems
o Implement memory hotplug handling in the kernel.

Patch 2/4:
o Move the cpu hotplug code from pseries/dlpar.c to pseries/hotplug-cpu.c

Patch 3/4:
o Update cpu hotplug handling to allow for invocation from rtas event
  notifications.

Patch 4/4:
o Update the ras epow interrupt handler to recognize hotplug rtas events

This code (except for patch 4/4 which I cannot test right now) has been tested
on PowerVM systems. There are some error paths that still need to be tested
and of course testing on PowerKVM when cpu and memory hotplug is enabled
for Power.

Thoughts?

-Nathan
---
 include/asm/rtas.h                 |   27 ++
 kernel/rtas.c                      |    7 
 platforms/pseries/dlpar.c          |  253 ++++++--------------------
 platforms/pseries/hotplug-cpu.c    |  358 +++++++++++++++++++++++++++++++++++++
 platforms/pseries/hotplug-memory.c |  351 ++++++++++++++++++++++++++++++------ 
 platforms/pseries/pseries.h        |    6                                      
 platforms/pseries/ras.c            |   12 +                                    
 platforms/pseries/reconfig.c       |    6 
 8 files changed, 780 insertions(+), 240 deletions(-)

             reply	other threads:[~2014-06-17 15:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 15:42 Nathan Fontenot [this message]
2014-06-17 15:45 ` [RFC PATCH 1/4] Create interface for rtas hotplug events and move mem hotplug to the kernel Nathan Fontenot
2014-06-17 15:46 ` [RFC PATCH 2/4] Migrate cpu hotplug code to pseries/hotplug-cpu.c Nathan Fontenot
2014-06-17 15:46 ` [RFC PATCH 3/4] Handle cpu hotplug from rtas hotplug events Nathan Fontenot
2014-06-17 15:47 ` [RFC PATCH 4/4] Hook into ras epow interrupt handler for hotplug 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=53A061EC.10403@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).