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

Re: [Xen-devel] [PATCH 0/7] Optionally add libvchan to stubdom



Marek Marczykowski, le Mon 29 Apr 2013 01:08:52 +0200, a écrit :
> > It does since recently, see the app_shutdown() hook.
> 
> Nice.
> Any chances to call it for ioemu stubdomains by libxl (even if main domain
> crashes)?

I'm not sure what you mean. app_shutdown is called whenever the domain
is shut down (not destroyed).

> Currently I see no users of app_shutdown(), right?

Indeed.

> So one solution is to require all libvchan users register libxenvchan_close
> with atexit.

I'd say libvchan should do it by itself. In a Linux system it would be
the kernel which would clean that for the user. It's better to make
libvchan behave the same in mini-os.

Gow, atexit can't be undone, so libvchan could rather call atexit just
once, and record a list of chans to be libxenchan_close()-d in the
registered atexit hook.

> Or perhaps the better idea is implement properly xc_gntshr_share_page_notify
> with some callback from shutdown_thread?

I'd say both are needed, since termination of the domain can happen
either from the inside (exit()), or from the outside (shutdown).

For the shutdown part, I'm not sure how to translate that into a
posixish interface. I'd tend to say add an atshutdown() call similar
to atexit(), so libvchan can just register what it needs to be done at
shutdown.

> > We could implement an atexit.

BTW, by "We", I mean including you :) (I don't really have much time for
this ATM)

Samuel

_______________________________________________
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®.