From: "canquan.shen" <shencanquan@huawei.com>
To: len.brown@intel.com
Cc: Bjorn Helgaas <bhelgaas@google.com>,
"shemminger@vyatta.com" <shemminger@vyatta.com>,
"yakui.zhao@intel.com" <yakui.zhao@intel.com>,
"xiaowei.yang@huawei.com" <xiaowei.yang@huawei.com>,
hanweidong <hanweidong@huawei.com>,
linqiangmin@huawei.com,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: [PATCH v4] acpi: Fix CPU hot removal problem
Date: Thu, 15 Sep 2011 09:06:50 +0800 [thread overview]
Message-ID: <4E714FAA.8060708@huawei.com> (raw)
We run linux as a guest in Xen environment. When we used the xen tools
(xm vcpu-set <n>) to hot add and remove vcpu to and from the guest, we
encountered the failure on vcpu removal. We found the reason is that it
didn't go to really remove cpu in the cpu removal code path.
This patch adds acpi_bus_trim in acpi_process_hotplug_notify to fix this
issue. With this patch, it works fine for us.
Signed-off-by:Canquan Shen <shencanquan@huawei.com>
---
drivers/acpi/processor_driver.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/processor_driver.c
b/drivers/acpi/processor_driver.c
index a4e0f1b..03d92d6 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -641,6 +641,7 @@ static void
acpi_processor_hotplug_notify(acpi_handle handle,
struct acpi_processor *pr;
struct acpi_device *device = NULL;
int result;
+ u32 id;
switch (event) {
@@ -677,6 +678,11 @@ static void
acpi_processor_hotplug_notify(acpi_handle handle,
"Driver data is NULL, dropping EJECT\n");
return;
}
+ id = pr->id;
+ if (acpi_bus_trim(device, 1)) {
+ printk(KERN_ERR PREFIX
+ "Fail to Remove CPU %d\n", id);
+ }
break;
default:
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--
1.7.6.0
next reply other threads:[~2011-09-15 1:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 1:06 canquan.shen [this message]
2011-09-15 2:56 ` [PATCH v4] acpi: Fix CPU hot removal problem Bjorn Helgaas
2011-09-22 16:53 ` Bjorn Helgaas
2011-09-22 17:18 ` Khalid Aziz
2011-09-23 7:49 ` canquan.shen
2011-09-23 14:16 ` Bjorn Helgaas
2011-09-24 0:20 ` canquan.shen
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=4E714FAA.8060708@huawei.com \
--to=shencanquan@huawei.com \
--cc=bhelgaas@google.com \
--cc=hanweidong@huawei.com \
--cc=len.brown@intel.com \
--cc=linqiangmin@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=xiaowei.yang@huawei.com \
--cc=yakui.zhao@intel.com \
/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