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

[Xen-users] Pin CPU of dom0

To: "Xen users mailing list" <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Pin CPU of dom0
From: weiming <zephyr.zhao@xxxxxxxxx>
Date: Fri, 15 Feb 2008 11:57:55 -0500
Delivery-date: Fri, 15 Feb 2008 08:58:33 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=LmUE3kzSQXGiSksKZVXJUqd+2QqNkcBir+0uc/7GQS0=; b=QF5d1c6qEPY6ZHIpLLqxyGqd2U8XHRW92nsMQJJuWtlwpbVFNoD5JQq5fx/8ijfvJ8r5izXrDfQTgSUk15eRS0FSMMAdoqfqmgJOaKF6hOFerVc9VaQsj4TIc/fJz1jbwL4ICKcXaeoBgK6GKVovdj14D7sCESrPohdj+u/hCYw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=jceNbVv5ImfNoAmKt44Y7DcKPNi5qHtzoE13HkiFYHahnxm8G9cRYhn17F962MuLBX6wzCSIaIbxmjyKCfMkclH5c3ceIrQiPbtHR9eSXuhJ/MrEQM+dTm0111HsZr8jX0gDnKH9a4cRL3e+ADO4HIx3hXVIa+goQ0R55Uhc4KU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello,

I searched the mail list, but can't find a solution.

I have a machine with 8 cores. I want to set the CPU affinity for dom0. For example, let Dom0 use processor 0-3, let guests use 4-7

For guest domains, I can do this by setting the "cpus"
For dom0. there's no such option. The only one I know is in /etc/xen-config.sxp, which has "dom0-cpus" setting. Someone suggests that "
by setting (com0-cpus n), where n is the 
> number of CPU's
> > you want to use. It picks from the low to high numbers, so
> you if you
> > set it to 1, it will pick CPU0, if you set it to 3, it will
> pick CPU0,
> > CPU1, CPU2, and so on.

However, it seems not working for me. I set (dom0-cpus 4), pin cpu 4 to dom1, cpu 6 to dom2:
sudo xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
Domain-0 0 0 1 r-- 10.3 any cpu
Domain-0 0 1 5 -b- 2.6 any cpu
Domain-0 0 2 2 -b- 1.1 any cpu
Domain-0 0 3 4 -b- 1.6 any cpu
Domain-0 0 4 - --p 0.6 any cpu
Domain-0 0 5 - --p 0.6 any cpu
Domain-0 0 6 - --p 0.4 any cpu
Domain-0 0 7 - --p 0.6 any cpu
dom1 1 0 4 -b- 7.7 4
dom2 2 0 6 -b- 7.6 6

So, dom0 is actually using CPU 1,2,4,5 instead of 0,1,2,3

Then I added "maxcpus=4" in the grub file
kernel /boot/xen.gz console=vga maxcpus=4

After reboot,
sudo xm vcpu-list
Name ID VCPU CPU State Time(s) CPU Affinity
Domain-0 0 0 0 r-- 8.0 any cpu
Domain-0 0 1 3 -b- 2.3 any cpu
Domain-0 0 2 1 -b- 1.4 any cpu
Domain-0 0 3 2 -b- 1.1 any cpu

It looks good. but when I tried to startup the guests, I got error:
sudo xm create xm1
Using config file "./xm1".
Error: (22, 'Invalid argument')

Any ideas?

Thanks,
Weiming

 
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>