From: Keir Fraser Subject: Re: VCPU hotplug problem Date: Tue, 12 Feb 2008 07:59:18 +0000 Message-ID: References: <47B11593.3010103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <47B11593.3010103@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Chris Lalancette , Gabriel Southern Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> 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 1 updates both /proc/cpuinfo and > /proc/stat, and xm vcpu-set 2 updates both again. 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