From: Anthony PERARD <anthony.perard@vates.tech>
To: Amneesh Singh <a-singh21@ti.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] tools/helpers/init-dom0less: fix vcpu availability
Date: Wed, 21 Aug 2024 12:36:26 +0000 [thread overview]
Message-ID: <ZsXfSdnbx2qhbuXp@l14> (raw)
In-Reply-To: <y46y7zqfepuvbw3tniqkr5yepcqbvkbyj6mfj3tj4p3ylo7pg3@23plq2f3jboj>
On Wed, Aug 21, 2024 at 11:08:59AM +0530, Amneesh Singh wrote:
> On 16:24-20240820, Anthony PERARD wrote:
> > On Tue, Aug 20, 2024 at 01:34:17PM +0530, Amneesh Singh wrote:
> > > @@ -330,14 +336,24 @@ int main(int argc, char **argv)
> > >
> > > for (i = 0; i < nb_vm; i++) {
> > > domid_t domid = info[i].domid;
> > > + libxl_vcpuinfo *vcpuinfo;
> > > + int nb_vcpu = 0, nr_cpus = 0;
> > > +
> > >
> > > /* Don't need to check for Dom0 */
> > > if (!domid)
> > > continue;
> > >
> > > + vcpuinfo = libxl_list_vcpu(ctx, domid, &nb_vcpu, &nr_cpus);
> > > +
> > > + if (!vcpuinfo) {
> > > + fprintf(stderr, "libxl_list_vcpu failed.\n");
> > > + nb_vcpu = 0;
> >
> > Is there any value to keep going if libxl_list_vcpu() fails?
> > Or is the reasoning is that cpu/*/availability was broken before, so
> > it's not important enough to stop init-dom0less?
> Yes, so missing cpu/*/availability nodes would mean we cannot
> pin/remove/add vcpus using xenlight I believe. However, we can still
> hotplug other stuff like net or block devices. In fact, I was doing
> exactly this when cpu/*/availability was broken.
Without the "availability" nodes, it probably mean that guest (probably
PV ones) will just use all available CPUs, it seems that Linux is doing
that, and only disable CPUs that are explicitly marked as "offline" via
that node.
But I guess it's ok.
Thanks,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
prev parent reply other threads:[~2024-08-21 12:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 8:04 [PATCH v2] tools/helpers/init-dom0less: fix vcpu availability Amneesh Singh
2024-08-20 16:24 ` Anthony PERARD
2024-08-21 5:38 ` Amneesh Singh
2024-08-21 12:36 ` Anthony PERARD [this message]
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=ZsXfSdnbx2qhbuXp@l14 \
--to=anthony.perard@vates.tech \
--cc=a-singh21@ti.com \
--cc=xen-devel@lists.xenproject.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.