From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: cpu hotplug Date: Sun, 19 Sep 2010 17:19:16 +0200 Message-ID: <20100919151916.GX3008@redhat.com> References: <20100919132617.GA9143@morn.localdomain> <1284902975.9521.199.camel@frechmops.schnuffi.conrad.localdomain> <20100919133134.GT3008@redhat.com> <1284903347.9521.202.camel@frechmops.schnuffi.conrad.localdomain> <20100919134045.GU3008@redhat.com> <20100919134620.GB9740@morn.localdomain> <20100919135008.GV3008@redhat.com> <1284905270.9521.221.camel@frechmops.schnuffi.conrad.localdomain> <20100919143611.GW3008@redhat.com> <1284909384.9521.228.camel@frechmops.schnuffi.conrad.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Kevin O'Connor" , kvm@vger.kernel.org To: Conrad Wood Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5662 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752241Ab0ISPTV (ORCPT ); Sun, 19 Sep 2010 11:19:21 -0400 Content-Disposition: inline In-Reply-To: <1284909384.9521.228.camel@frechmops.schnuffi.conrad.localdomain> Sender: kvm-owner@vger.kernel.org List-ID: On Sun, Sep 19, 2010 at 05:16:24PM +0200, Conrad Wood wrote: > [..] > > > Lets establish some terminology to understand each other better: > > Lets use CPU inserted/ejected to refer to cpu being available/not > > available to a guest. > > Lest use CPU online/offline to refer to cpu been used by a guest OS. > > > > CPU hot-plug works like this: > > cpu is inserted (plugged into cpu socket on MB) > > guest OS is notifies through ACPI > > guest OS starts to use newly added CPU (makes it online) > > > > CPU hot-unplug works like this: > > guest OS is notifies through ACPI that cpu is going to be removed > > guest OS stops to use cpu (makes it offline) > > cpu is ejected (removed from a socket on MB) (kvm never does that part) > > > > So which part do you want to know about from a host? > > > > You can't really know from a host if cpu is used by guest OS (if it is > > online/offline in s guest in our terminology) > > > > inserted/ejected is management action (it can't be initiated by a > > guest), so you can keep track of it by yourself. KVM doesn't do it > > for you right now. More precisely it does, but doesn't have a way to > > quire it. > > I need to know if a cpu is currently inserted or ejected. > The only way to do that currently is to track it in your management app. > I gather a cpu which is currently "inserted", may potentially be used by > a guest os. (Wether he actually uses a cpu, puts it online or offline, > isn't my concern). > > The amount of time and number of cpus available to a guest is what I > like to keep track of. > > Conrad > -- Gleb.