Re: cpu hotplug

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

 



On Sun, 2010-09-19 at 15:50 +0200, Gleb Natapov wrote:
> On Sun, Sep 19, 2010 at 09:46:21AM -0400, Kevin O'Connor wrote:
> > On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote:
> > > halted state is not the way to check for whether cpu is online or
> > > offline. cpu may be online but executing hlt instruction so 
> > > its state will be halted, but cpu itself is online. Actually with kvm
> > > today you are not able to check that cpu is offline if it was ever
> > > online. Query a guest for cpu status.
> > 
> > In that regard, "info cpus" does seem to work - as it only shows me
> > the cpus that have ever been online.  Ejecting a cpu in the guest does
> > not remove it from "info cpus", but then, I don't think kvm does
> > remove it from being available after an eject.
> > 
> Exactly. That what I meant by "Actually with kvm today you are not able
> to check that cpu is offline if it was ever online". So if cpu was never
> online it is easy to check that it is offline (it will not be reported
> by "info cpus"). But if it was inserted and then ejected it will still
> be present in "info cpus", but not used by a guest OS.
> 
> --
> 			Gleb.
> 

1) Thanks for clarifying "online" vs "halted" - that makes sense and is
probably part of what confused me. I need to get the "online/offline"
status of cpus, not if they are halted or not. I understand this is
currently not possible with kvm. As I have no direct control over the
guest OS, I do however need a solution on the host. Any clues how this
could be implemented would be much appreciated.
This is important to me.

2) In my case, the cpus are ALWAYS reported as halted, regardless of the
current state in the guest. 
After the guest booted, The "cpu infos" displays precisely the amount of
cpus as initially set by the -smp parameter of kvm. (as halted).
any additional cpus added later will be displayed, also as halted -
again regardless whether or not the guest switches or had switched them
to online. It is reported as "halted" even whilst the guest is running a
cpu-hogger which would stop the cpu from halting.
I don't mind so much about this cosmetic display problem ;) 


Conrad




--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux