From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH 2/4] Add tools/tests/offline_module Date: Thu, 12 Dec 2013 09:32:36 -0500 Message-ID: <52A9C904.9080104@terremark.com> References: <1386809777-12898-1-git-send-email-dslutz@terremark.com> <1386809777-12898-3-git-send-email-dslutz@terremark.com> <1386842469.12610.38.camel@kazak.uk.xensource.com> <52A99976.2020505@citrix.com> <52A9C717.30604@terremark.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1596561933070096716==" Return-path: In-Reply-To: <52A9C717.30604@terremark.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel , Ian Campbell Cc: Ian Jackson , xen-devel@lists.xen.org, Keir Fraser , Don Slutz , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org --===============1596561933070096716== Content-Type: multipart/alternative; boundary="------------090709060308020501000604" --------------090709060308020501000604 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit 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 >>>> >> >>>> >>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 --------------090709060308020501000604 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit
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@verizon.com>
>>
>> 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

--------------090709060308020501000604-- --===============1596561933070096716== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1596561933070096716==--