|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] VCPU hotplug problem
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
|
|
|
|
|