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

Re: [Xen-devel] FW: Cancelling asynchronous operations in libxl



Ian Campbell writes ("Re: [Xen-devel] FW: Cancelling asynchronous operations in 
libxl"):
> On Wed, 2013-10-23 at 13:23 -0400, Konrad Rzeszutek Wilk wrote:
> > Are there specific operations that you are focusing on to cancel?
> 
> Yes, this would be good to know. Ian J would know better than I but AIUI
> there is currently no generic support for cancelling an asynchronous op
> in libxl. I'm sure we could find a way to add this, for example as an
> abort after the current "step" succeeds/times out/fails.

That's right.

I think the right approach would be to provide a new kind of ao_how
value which returns a reference to the caller which can be used for
cancellation.

Cancellation would itself be asynchronous, in the sense that you sould
request cancellation but then still have to wait for the operation to
end.

So initially you could implement cancellation for only a subset of
operations and have the infrastructure disregard cancellation requests
for operations which don't support it.  I think the most obvious
operation that should be cancellable is domain migration.

Ideally there would be some kind of automatic plumbing which would
arrange (for example) that callers to the libxl xs watch functions, or
timeout functions, would get a "cancellation" notice instead.

> For killing libxl_domain_destroy should be fine to call even if there is
> an async op pending on that domain, the async op will naturally fail,
> it'll probably log a lot but should do so gracefully. If there are cases
> which do not we should fix them, since they would represent a bug
> irrespective of any killing of the domain from under the op's feet.

Yes.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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