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-devel

Re: [Xen-devel] VCPU hotplug problem

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] VCPU hotplug problem
From: "Gabriel Southern" <gsouther@xxxxxxx>
Date: Tue, 12 Feb 2008 21:20:18 -0500
Cc: Chris Lalancette <clalance@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 12 Feb 2008 18:20:44 -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:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=WAeTgP6idBQ6Jn3XtFaVZsLTRcvuUmaj++nnG15HnK0=; b=I+bT1GnNUsaWKYnlf/btpJ/cZLu9GDDWHliYZA1rAaebHv1K9ud/Y03nZ25NMt2aeEWjXCkWp2hcccFYlTDxVpcMCFy/lTYuRdoB8K3K06qBgXlhWlml9A9tl+rWom1RNR7j9ZIDBy4QKw5jgplIZMMBNO2tQ4YJGuQa3sjR2m0=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=lUxRms9gbCZvpIVPQtdunzIDbBSxxj/+vqnERaYcDU02YEv9LnXvK5lBTfMQCiDeerrxFyjOFaQ7rmrAwF8q6XCGxlRZHRmKSUHosLuIet/80qMkCIh69oISnjOTRV/pxy3tE0tXolvKqIkWvZCNbcvpv2fmTJAYA66jhCKmlmA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C3D70256.13C4F%Keir.Fraser@xxxxxxxxxxxx>
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: <47B11593.3010103@xxxxxxxxxx> <C3D70256.13C4F%Keir.Fraser@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for the explanation.  When I started looking at the problem, I
had not previously looked at the Xen source code, and I made the
mistake of looking at the Linux 2.6.18 kernel from kernel.org, without
the xen patches applied.  So when I was tracing through the code
everything looked fine because it had the for_each_online_cpu() macro
in place.  After reading your message, I checked the code that I was
actually compiling and it had the change you described.  Changing from
for_each_possible_cpu() back to for_each_online_cpu() fixed the
problem for me.

Incidentially in a Ubuntu 7.10 VM, after this change is made, top will
still crash if a CPU is hot-unplugged while top is running.  However,
in centos-5.1 the hot-unplug events are handled differently and top
does not crash.  Thanks again for the help.

-Gabriel

>
> The issue is the result of a deliberate change in some kernels (including
> our 2.6.18-xen tree) in which fs/proc/proc_misc.c:show_stat() iterates over
> each_possible_cpu() rather than each_online_cpu(). This of course means it
> prints info for all offline cpus as well as online cpus.
>
> The original reason for this is that some user-space tools, such as older
> versions of top, would get quite upset when CPUs are hot-unplugged while
> they run. This would cause top to crash! I don't know whether this was fixed
> by now in the user-space packages. The issue was originally seen years ago
> so I suppose it's fairly likely it has been, and the hack could be removed.
>
>  -- Keir
>

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

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