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

Re: [Xen-devel] [PATCH] libxl: wait for the ack when issuing power control requests



On Tue, Oct 01, 2019 at 12:44:38PM +0100, Anthony PERARD wrote:
> On Tue, Oct 01, 2019 at 12:12:59PM +0200, Roger Pau Monne wrote:
> > -    return libxl__xs_printf(gc, t, shutdown_path, "%s", cmd);
> > +    rc = libxl__xs_printf(gc, XBT_NULL, shutdown_path, "%s", cmd);
> > +    if (rc)
> > +        return rc;
> > +
> > +    pvcontrol->path = shutdown_path;
> > +    pvcontrol->what = GCSPRINTF("guest acknowledgement of %s request", 
> > cmd);
> > +    pvcontrol->timeout_ms = 60 * 1000;
> > +    libxl__xswait_start(gc, pvcontrol);
> 
> Shouldn't we watch shutdown_path before we write to it? Otherwise, we
> might never see the acknowledgement by the guest.
> But I don't know if xswait to a read the first time it is setup.

AFAIK you always get an event after the watch is registered.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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