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

Re: [PATCH v2] tools/helpers/init-dom0less: fix vcpu availability



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



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.