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/
Home Products Support Community News


Re: [Xen-devel] VCPU hotplug problem

To: Gabriel Southern <gsouther@xxxxxxx>
Subject: Re: [Xen-devel] VCPU hotplug problem
From: Chris Lalancette <clalance@xxxxxxxxxx>
Date: Mon, 11 Feb 2008 22:42:11 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 11 Feb 2008 19:42:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7a88c6510802111926n346882cn4f6cfbe3afc06e90@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7a88c6510802111926n346882cn4f6cfbe3afc06e90@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird (X11/20071115)
Gabriel Southern wrote:
> Hello,
> I am working on a project using the VCPU hotplug feature in Xen, and I
> think that there is a problem with how Linux is processing CPU hotplug
> events.  The problem I have seen is that the /proc/stat file does not
> change the number of CPU entries in response to the: xm vcpu-set
> <domain> <num> command.  However, the /proc/cpuinfo file is updated
> correctly.
> The reason this is important is that some applications use the
> sysconf(_SC_NPROCESSORS_ONLN) to determine how many threads to run.
> In Linux this function parses the /proc/stat file to determine how
> many processors are available.  However, the /proc/stat file is not
> being updated correctly in response to the xm vcpu-set command.
> It would be a big help for me if anyone else could test to see if they
> experience the same problem.  I'm not sure if this would qualify as a
> problem with Linux or with Xen; however, any ideas for fixing it are
> appreciated as well.

Hm, it would be helpful if you told us what version of Xen you are
running and which kernel you are running.  For what it is worth, running
a RHEL-5.1 PV guest on a RHEL-5.1 dom0 (both x86_64) seems to do the
right thing for me; xm vcpu-set <dom> 1 updates both /proc/cpuinfo and
/proc/stat, and xm vcpu-set <dom> 2 updates both again.

Chris Lalancette

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>