All of lore.kernel.org
 help / color / mirror / Atom feed
* using @releaseDomain to subscribe for domain destruction
@ 2013-02-14 13:18 Vasiliy Tolstov
  2013-02-14 13:36 ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Vasiliy Tolstov @ 2013-02-14 13:18 UTC (permalink / raw)
  To: xen-devel

Hello!. How can i use @releaseDomain from dom0 to subscribe for domain
destruction?
I'm try to add watch for @releaseDomain path with token equal of
needed domain id. But when another domain dies, i get domain that i
provide via token to xs_watch.
Is that possible to get id of domain what released from xenstore?

-- 
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: using @releaseDomain to subscribe for domain destruction
  2013-02-14 13:18 using @releaseDomain to subscribe for domain destruction Vasiliy Tolstov
@ 2013-02-14 13:36 ` Ian Campbell
  2013-02-14 13:55   ` Vasiliy Tolstov
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2013-02-14 13:36 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel@lists.xen.org

On Thu, 2013-02-14 at 13:18 +0000, Vasiliy Tolstov wrote:
> Hello!. How can i use @releaseDomain from dom0 to subscribe for domain
> destruction?
> I'm try to add watch for @releaseDomain path with token equal of
> needed domain id. But when another domain dies, i get domain that i
> provide via token to xs_watch.

The token is an opaque cookie which xenstore simply echoes back at you
so you can identify which of your watches is firing if you have more
than one. It doesn't have any meaning other than that.

> Is that possible to get id of domain what released from xenstore?

Not directly, @releaseDomain just tells you that *a* domain died, you
need to check if it was the one which interested you.

libxl has some infrastructure for maintaining this state and firing
events on specific domain death. depending on your use case this may or
may not be overkill for your application.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: using @releaseDomain to subscribe for domain destruction
  2013-02-14 13:36 ` Ian Campbell
@ 2013-02-14 13:55   ` Vasiliy Tolstov
  2013-02-14 14:13     ` Ian Campbell
  0 siblings, 1 reply; 6+ messages in thread
From: Vasiliy Tolstov @ 2013-02-14 13:55 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel@lists.xen.org

Thanks! But why release domain not returns domid ?=)
As i understand if i want to know what domains dies i need after fired
watch enumerate all domains and check its status. May be in case of
special watches watch returns not provided token or something more
useful?
in any case thanks for answers.

2013/2/14 Ian Campbell <Ian.Campbell@citrix.com>:
> On Thu, 2013-02-14 at 13:18 +0000, Vasiliy Tolstov wrote:
>> Hello!. How can i use @releaseDomain from dom0 to subscribe for domain
>> destruction?
>> I'm try to add watch for @releaseDomain path with token equal of
>> needed domain id. But when another domain dies, i get domain that i
>> provide via token to xs_watch.
>
> The token is an opaque cookie which xenstore simply echoes back at you
> so you can identify which of your watches is firing if you have more
> than one. It doesn't have any meaning other than that.
>
>> Is that possible to get id of domain what released from xenstore?
>
> Not directly, @releaseDomain just tells you that *a* domain died, you
> need to check if it was the one which interested you.
>
> libxl has some infrastructure for maintaining this state and firing
> events on specific domain death. depending on your use case this may or
> may not be overkill for your application.
>
> Ian.
>
>
>



--
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: using @releaseDomain to subscribe for domain destruction
  2013-02-14 13:55   ` Vasiliy Tolstov
@ 2013-02-14 14:13     ` Ian Campbell
  2013-02-14 14:19       ` Razvan Cojocaru
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Campbell @ 2013-02-14 14:13 UTC (permalink / raw)
  To: Vasiliy Tolstov; +Cc: xen-devel@lists.xen.org

Please don't top post

On Thu, 2013-02-14 at 13:55 +0000, Vasiliy Tolstov wrote:
> Thanks! But why release domain not returns domid ?=)

The hypervisor only has a single bit (an event channel) to signal the
event to the tools, so there is no space for the domid.

Sure, you could probably invent up some shared memory data structure or
something, but why bother.

> As i understand if i want to know what domains dies i need after fired
> watch enumerate all domains and check its status.

Well, if you only care about one domain you just need to check that one
domain.

Otherwise you should look at the libxl functionality I mentioned before.

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: using @releaseDomain to subscribe for domain destruction
  2013-02-14 14:13     ` Ian Campbell
@ 2013-02-14 14:19       ` Razvan Cojocaru
  2013-02-15 10:15         ` Vasiliy Tolstov
  0 siblings, 1 reply; 6+ messages in thread
From: Razvan Cojocaru @ 2013-02-14 14:19 UTC (permalink / raw)
  To: xen-devel

>> As i understand if i want to know what domains dies i need after fired
>> watch enumerate all domains and check its status.
>
> Well, if you only care about one domain you just need to check that one
> domain.
>
> Otherwise you should look at the libxl functionality I mentioned before.

There's also tools/xenpaging/xenpaging.c that can be used as an example.

Cheers,
Razvan Cojocaru

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: using @releaseDomain to subscribe for domain destruction
  2013-02-14 14:19       ` Razvan Cojocaru
@ 2013-02-15 10:15         ` Vasiliy Tolstov
  0 siblings, 0 replies; 6+ messages in thread
From: Vasiliy Tolstov @ 2013-02-15 10:15 UTC (permalink / raw)
  To: Razvan Cojocaru; +Cc: xen-devel

Thanks. Now after fired watch on @releaseDomain i'm check all domains
for my own domain id and get it status.

2013/2/14 Razvan Cojocaru <rzvncj@gmail.com>:
>>> As i understand if i want to know what domains dies i need after fired
>>> watch enumerate all domains and check its status.
>>
>>
>> Well, if you only care about one domain you just need to check that one
>> domain.
>>
>> Otherwise you should look at the libxl functionality I mentioned before.
>
>
> There's also tools/xenpaging/xenpaging.c that can be used as an example.
>
> Cheers,
> Razvan Cojocaru
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel



--
Vasiliy Tolstov,
Clodo.ru
e-mail: v.tolstov@selfip.ru
jabber: vase@selfip.ru

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-15 10:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-14 13:18 using @releaseDomain to subscribe for domain destruction Vasiliy Tolstov
2013-02-14 13:36 ` Ian Campbell
2013-02-14 13:55   ` Vasiliy Tolstov
2013-02-14 14:13     ` Ian Campbell
2013-02-14 14:19       ` Razvan Cojocaru
2013-02-15 10:15         ` Vasiliy Tolstov

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.