public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re : [PATCH] acpi: Fix hot cpu remove problem on acpi subsystem
@ 2011-09-05  6:22 Shen Canquan
  2011-09-06  4:19 ` Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: Shen Canquan @ 2011-09-05  6:22 UTC (permalink / raw)
  To: lenb@kernel.org, rui.zhao@intel.com, shemminger@vyatta.com,
	yakui.zhao@intel.com
  Cc: xiaowei.yang@huawei.com, hanweidong, linux-kernel@vger.kernel.org,
	linux-acpi@vger.kernel.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb2312, Size: 2441 bytes --]

Hi Len,
    I have tested more than 10000 times of cpu remove and  add function in the latest kernel. The result of test is ok. The flow of  my test program is bellow:
    (1)  get random number of cpu .
    (2)  call xm vcpu-set <n> . depend on current cpu number. it simulate the function of add or remove cpu at random.
    (3) get the random number between 1 and 10.  
    (4) sleep random seconds which get from step 3.
    (5) repeat from step 1 to step 4.

   what's your opinion of this patch?

--
shencanquan
________________________________________
·¢¼þÈË: linux-kernel-owner@vger.kernel.org [linux-kernel-owner@vger.kernel.org] ´ú±í Shen Canquan [shencanquan@huawei.com]
·¢ËÍʱ¼ä: 2011Äê8ÔÂ30ÈÕ 14:35
µ½: lenb@kernel.org; rui.zhao@intel.com; shemminger@vyatta.com; yakui.zhao@intel.com
Cc: xiaowei.yang@huawei.com; hanweidong; linux-kernel@vger.kernel.org; i@vger.kernel.org
Ö÷Ìâ: [PATCH] acpi: Fix hot cpu remove problem on acpi subsystem

In Xen virtualization environment, When I used xen tools (xm vcpu-set vcpu_number ) to test the vcpu add and remove, I found it is failure on vcpu remove, I found the reason is that nothing to do when cpu remove in acpi_processor_hotplug_notify function, so I add the code of send the OFFLINE message to udev and add the rule of udev. it is ok on vcpu remove.
Signed-off-by: Shen canquan <shencanquan@huawei.com>
---
 drivers/acpi/processor_driver.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index a4e0f1b..a1c564f 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -677,6 +677,8 @@ static void acpi_processor_hotplug_notify(acpi_handle handle,
                                     "Driver data is NULL, dropping EJECT\n");
                         return;
                 }
+
+               kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
                 break;
         default:
                 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
--
1.7.6.msysgit.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-08  0:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05  6:22 Re : [PATCH] acpi: Fix hot cpu remove problem on acpi subsystem Shen Canquan
2011-09-06  4:19 ` Bjorn Helgaas
2011-09-06  6:48   ` canquan.shen
2011-09-06 18:38     ` Bjorn Helgaas
2011-09-07  2:40       ` canquan.shen
2011-09-07  6:57         ` Bjorn Helgaas
2011-09-08  0:21           ` canquan.shen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox