From: Keir Fraser Subject: Re: /proc/xen/xenbus supports watch? Date: Fri, 23 Sep 2005 10:17:12 +0100 Message-ID: <785f15905bfe17d87d6bd0eb878cc166@cl.cam.ac.uk> References: <5d7aca9505090801025f3d5771@mail.gmail.com> <3d8eece205090803381b818f18@mail.gmail.com> <1126226609.25110.3.camel@localhost.localdomain> <3d8eece205091302422ac74f77@mail.gmail.com> <1126657264.7896.20.camel@localhost.localdomain> <1126689530.4415.10.camel@localhost.localdomain> <3d8eece205091405555a2871fc@mail.gmail.com> <1126748390.12119.33.camel@localhost.localdomain> <1126945564.29203.116.camel@localhost.localdomain> <1127088661.23870.47.camel@localhost.localdomain> <1127214064.2656.45.camel@localhost.localdomain> <152436486e4a36af94a87ad6d40a768e@cl.cam.ac.uk> <1127354853.7567.6.camel@localhost.localdomain> <1127429689.2722.2.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1127429689.2722.2.camel@localhost.localdomain> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Rusty Russell Cc: xen-devel List , Christian Limpach List-Id: xen-devel@lists.xenproject.org > But but but... it doesn't *help*. That's the entire point! > > OK, please describe, in simple terms, why you think save/restore is > different if we multiplex across a single transport? Well, maybe there's not so much in it after all. I'll assume here we go for the 'xenstored forgets all state, and clients get EAGAIN at the first available opportunity' approach. If we mux on a single transport: 1. The shared transport page is set up automatically in xenstored when the domain is restored. Xenstored has forgotten about any in-progress transactions. 2. The xenbus driver marks all file handles (or transaction structures, or whatever it uses to track local state for each local transaction) as doomed. Any further activity on those transactions returns EAGAIN rather than passing thru to xenstored. 3. That's it! Clients detect failure and retry. If we have page per transaction: 1. Same as (1) above. 2. Same as (2) above, but free the per-transaction transport page. 3. Same as (3) above. However, I'm not clear yet what each separate transport page represents. Is it a single transaction, or a connection that stores multiple watches and one transaction at a time? If the latter, save/restore gets a bit harder as the transport pages must be automatically re-registered and watches re-registered... -- Keir