Re: [PATCH] rtas_errd: Add support for cpu and memory hotplugging via RTAS event
Vasant Hegde <[email protected]> Mon, 10 Nov 2014 10:25:40 +0530
| Newsgroups | gmane.linux.tools.diag.devel |
|---|---|
| Message-ID | <[email protected]> |
On 11/07/2014 07:53 PM, Nathan Fontenot wrote: > On 11/04/2014 12:33 PM, Thomas Falcon wrote: >> This patch adds support for handling RTAS hotplug events for cpus and memory >> blocks in addition to such events for pci devices. It includes additional >> support for events indicating an addition or a removal of multiple cpus or >> logical memory blocks. Finally, for debugging purposes, it includes the option >> to handle the event without calling the drmgr command. >> >> Signed-off-by: Thomas Falcon <[email protected]> > > Acked-by: Nathan Fontenot <[email protected]> Thanks > > Vasant, testing this right now is limited to feeding rtas_errd a cpu or > hotplug memory rtas event. This patch is in preparation for supporting > cpu and memory hotplug on kvm guests that are running older kernels > that do not have the kernel hotplug support for cpu/mem hotplug. > > This patch follows the same thing we currently do for pci hotplug and > is just a stop-gap measuere until all of the kernel code makes it > upstream and into the distro releases. Understood. Queued for next release. -Vasant > > -Nathan > >> --- >> rtas_errd/hotplug.c | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/rtas_errd/hotplug.c b/rtas_errd/hotplug.c >> index 0f84f8d..91036b2 100644 >> --- a/rtas_errd/hotplug.c >> +++ b/rtas_errd/hotplug.c >> @@ -24,6 +24,7 @@ void handle_hotplug_event(struct event *re) >> pid_t child; >> int status, rc; >> char drc_index[11]; >> + char count[4]; >> char *drmgr_args[] = { DRMGR_PROGRAM_NOPATH, "-c", NULL, NULL, NULL, >> NULL, NULL, "-d4", "-V", NULL}; >> >> @@ -39,6 +40,12 @@ void handle_hotplug_event(struct event *re) >> drmgr_args[2] = "pci"; >> drmgr_args[6] = "-n"; >> break; >> + case RTAS_HP_TYPE_CPU: >> + drmgr_args[2] = "cpu"; >> + break; >> + case RTAS_HP_TYPE_MEMORY: >> + drmgr_args[2] = "mem"; >> + break; >> default: >> dbg("Unknown or unsupported hotplug type %d\n", >> hotplug->type); >> @@ -63,6 +70,11 @@ void handle_hotplug_event(struct event *re) >> snprintf(drc_index, 11, "%#x", hotplug->u1.drc_index); >> drmgr_args[5] = drc_index; >> break; >> + case RTAS_HP_ID_DRC_COUNT: >> + drmgr_args[4] = "-q"; >> + snprintf(count, 4, "%u", hotplug->u1.count); >> + drmgr_args[5] = count; >> + break; >> default: >> dbg("Unknown or unsupported hotplug identifier %d\n", >> hotplug->identifier); >> @@ -73,6 +85,10 @@ void handle_hotplug_event(struct event *re) >> drmgr_args[1], drmgr_args[2], drmgr_args[3], >> drmgr_args[4], drmgr_args[5], drmgr_args[6]); >> >> +#ifdef DEBUG >> + if(no_drmgr) >> + return; >> +#endif >> /* invoke drmgr */ >> dbg("Invoke drmgr command\n"); >> > > > ------------------------------------------------------------------------------ > _______________________________________________ > Linux-diag-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/linux-diag-devel > ------------------------------------------------------------------------------