All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Dario Faggioli <raistlin.df@gmail.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Jim@redhat.com, libvir-list@redhat.com,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Devel <xen-devel@lists.xen.org>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: Re: [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap?
Date: Wed, 25 Feb 2015 15:03:19 +0000	[thread overview]
Message-ID: <20150225150220.GM4263@redhat.com> (raw)
In-Reply-To: <1424856277.4742.179.camel@gmail.com>

On Wed, Feb 25, 2015 at 10:24:37AM +0100, Dario Faggioli wrote:
> On Tue, 2015-02-24 at 13:10 +0000, Ian Campbell wrote:
> > On Tue, 2015-02-24 at 12:41 +0000, Anthony PERARD wrote:
> 
> > > What libxl API those provide this information, if it exist?
> > > 
> > > I found libxl_get_online_cpus() but that not enough. They want a
> > > bitmap.
> > 
> > I think that is all which currently exists, at least at the libxl level,
> > you may need to add a new interface.
> > 
> > It'd be worth looking into the various host numa interfaces -- perhaps
> > one of them indirectly exposes what you want?
> > 
> Given Daniel's latest emails, I'm not sure this is useful but
> libxl_get_cpu_topology() should put LIBXL_CPUTOPOLOGY_INVALID_ENTRY in
> all the fields of the i-eth element of the array it returns, if the
> i-eth pcpu is offline (see the implementation of XEN_SYSCTL_topologyinfo
> in xen/common/sysctl.c).
> 
> So, scanning that array and constructing the bitmap according to whether
> or not we find that marker on the various elements would be the way to
> go, I would say.
> 
> I've actually never tested this, i.e., I've never tried offlining a pcpu
> on the host. I'll give it a go as soon as I find 5 minutes, and let know
> if it works.

FWIW, this code in openstack was only added for benefit of s390
architecture where apparently it is common to have hosts with
CPUs offlined. Presumably you have to pay IBM for each extra
CPU you turn online :)

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2015-02-25 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150224124101.GX1345@perard.uk.xensource.com>
2015-02-24 12:46 ` [libvirt] libvirt/libxl implemetation of get_online_cpu / virNodeGetCPUMap? Daniel P. Berrange
2015-02-24 13:10 ` Ian Campbell
     [not found] ` <20150224124644.GK21611@redhat.com>
2015-02-24 13:15   ` [libvirt] " Anthony PERARD
2015-02-24 13:22     ` Daniel P. Berrange
     [not found]     ` <20150224132219.GL21611@redhat.com>
2015-02-24 15:00       ` Anthony PERARD
2015-02-25 12:57         ` Daniel P. Berrange
2015-03-24  8:47         ` Manish Jaggi
     [not found] ` <1424783459.27930.337.camel@citrix.com>
2015-02-25  9:24   ` Dario Faggioli
2015-02-25  9:43     ` Ian Campbell
2015-02-25 15:03     ` Daniel P. Berrange [this message]
2015-02-25 15:13       ` [libvirt] " Ian Campbell
     [not found]       ` <1424877216.18290.9.camel@citrix.com>
2015-02-25 15:20         ` Daniel P. Berrange
     [not found]         ` <20150225152042.GN4263@redhat.com>
2015-02-25 15:30           ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150225150220.GM4263@redhat.com \
    --to=berrange@redhat.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Jim@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=libvir-list@redhat.com \
    --cc=raistlin.df@gmail.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.