[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/4] Add tools/tests/offline_module



On 12/12/13 09:24, Don Slutz wrote:
On 12/12/13 06:09, David Vrabel wrote:
On 12/12/13 10:01, Ian Campbell wrote:
> On Wed, 2013-12-11 at 19:56 -0500, Don Slutz wrote:
>> From: Don Slutz <dslutz@xxxxxxxxxxx>
>>
>> This is a quick and dirty linux kernel module to offline some cpus
>> as far as Xen knows.
>>
>> This can be used to re-create the bug in hvm_save_one about
>> returning the wrong data.
Opps, I should have added "No need to accept or apply this patch." here and in the cover letter.
   -Don Slutz
> 
> Can this not be done via /sys/devices/system/cpu/cpu1/online etc?
> Documentation/cpu-hotplug.txt seems to suggest it can.
Yes it can.

echo 0 > /sys/devices/system/cpu/cpuN/online

And onlined again with 1.

David
I had forgotten about that when I was testing.  At least on 2.6.18-128.el5, cpu 0 does not work:

[root@P-8-0 ~]# echo 0 > /sys/devices/system/cpu/cpu0/online
-bash: /sys/devices/system/cpu/cpu0/online: Permission denied
[root@P-8-0 ~]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t:SystemLow-SystemHigh
[root@P-8-0 ~]# echo 0 > /sys/devices/system/cpu/cpu1/online
[root@P-8-0 ~]# echo 0 > /sys/devices/system/cpu/cpu3/online
[root@P-8-0 ~]# echo 0 > /sys/devices/system/cpu/cpu5/online
[root@P-8-0 ~]# echo 0 > /sys/devices/system/cpu/cpu7/online

And making cpu 0 offline was something I wanted to test.
   -Don Slutz

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.