[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] VCPU hotplug problem


  • To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
  • 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
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.