WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] xen cpu affinity, ie; pinning cpus

On Oct 22, 2009, at 1:13 PM, Tait Clarridge wrote:

On Thu, 2009-10-22 at 12:24 -0700, Brian Krusic wrote:
On Oct 22, 2009, at 12:13 PM, Tait Clarridge wrote:

On Thu, 2009-10-22 at 10:25 -0700, Brian Krusic wrote:
Hi,


Yes, i read several article about having dom0 pinned to 1 cpu.


Funny thing is that I do this via xend-config-sxp and grub-conf but
xm
vcpu-list still shows dom0 as "any" under affinity column.


When I run xm vcpu-pin Domain-0 0 0, xm vcpu-list then shows "0"
under
the affinity column until I reboot.


Any ideas?


After setting (dom0-cpus 1) in /etc/xen/xend-config.sxp did you
restart
the xend service?

If I remember correctly, it should be safe to do when domU's are
running.

This should pin Domain-0 to cpu0.

eg.

[root@xxxxxx ]# xm vcpu-list
Name                              ID VCPUs   CPU State   Time(s) CPU
Affinity
Domain-0                           0     0     0   r--  1648038.3 0
Domain-0                           0     1     -   --p       3.1 1
Domain-0                           0     2     -   --p       3.9 2
Domain-0                           0     3     -   --p       3.8 3
Domain-0                           0     4     -   --p       3.7 4
Domain-0                           0     5     -   --p       3.1 5
Domain-0                           0     6     -   --p       3.2 6
Domain-0                           0     7     -   --p       3.6 7
xendomainhere                      1     0     4   -b-  300000.1 any cpu

That shows that my vm host has 8 cores, but is only using one for
Domain-0.. the rest are in a paused state, so now what I can do is pin them from the config files to use a core from cpus 1-7 or pin the domU
to a specific one as well.

Tait

Hi,

Heres my grub.conf;

kernel /boot/xen.gz-3.4.1 dom0_max_vcpus=1 dom0_mem=1024M

xend-config.sxp;

(dom0-cpus 1)

Heres my xm vcpu-list after a reboot of the system;

Name            ID      VCPU    CPU     State   Time(s)         CPU Affinity
Domain-0        0       0               0               r--             216.6   
        any cpu


Heres my xm vcpu-list after xm vcpu-pin;

Name            ID      VCPU    CPU     State   Time(s)         CPU Affinity
Domain-0        0       0               0               r--             12585.6 
        0

I tired to format this nice for you so please excuse if it come out
like crap.

Notice the the CPU Affinity column.

Any ideas?


Well it looks like it is still grabbing cpu0 for Domain-0 to use. Does
it ever use any other CPU for dom0 before pinning it manually?

Yes, it moves around from proc to proc.

Mostly 0, sometimes, 3,4,6, etc...

Kinda weird.

Just wondering how to interpret this.


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users