WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 10 of 15] xenpaging: compare both token and path

To: Olaf Hering <olaf@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 10 of 15] xenpaging: compare both token and path when checking for @releaseDomain event
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 25 Oct 2011 19:13:16 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 25 Oct 2011 11:23:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111025180239.GA14805@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1319189494@xxxxxxxxxxxx> <0b7d7a2bd6673f358faf.1319189504@xxxxxxxxxxxx> <20134.62630.115259.632324@xxxxxxxxxxxxxxxxxxxxxxxx> <20111025180239.GA14805@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Olaf Hering writes ("Re: [Xen-devel] [PATCH 10 of 15] xenpaging: compare both 
token and path when checking for @releaseDomain event"):
> I was under the impression there could be identical tokens for different
> paths,

Yes, but you control the token.  The token you get back in your watch
event is whatever you gave to xs_watch.

> and that the actual value of the watched path is part of
> XS_WATCH_TOKEN.

"XS_WATCH_TOKEN" is just an array index into the return value of
xs_read_watch.  It has the value 1 which means that
  ret = xs_read_watch(...)
returns the token in ret[1].  The path comes back in ret[0].

(The use of "xs_watch_type" as the name for this enum is unfortunate.)

> But since the token seems to be unique (docs/misc/xenstore.txt has no
> further description of 'token'), only the DPRINTF part of my patch
> should be kept.

The token is whatever you specified when you set up the watch.  I
haven't checked in xenpagingd what that value is in this case.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel