From: Keir Fraser Subject: Re: /proc/xen/xenbus supports watch? Date: Mon, 19 Sep 2005 09:54:50 +0100 Message-ID: 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> 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: <1127088661.23870.47.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@lists.xensource.com, Christian.Limpach@cl.cam.ac.uk List-Id: xen-devel@lists.xenproject.org On 19 Sep 2005, at 01:11, Rusty Russell wrote: > That's quoting a little out of context. The current partial exposure > of > the kernel's channel is a hack, since the current model is a 1:1 > mapping > between the transport and the connection. The term hack is not a bad > thing in itself, but it does accurately reflect that it's limited, as > in > this case where we're asked to add watch support. Well, I can't disagree with this. :-) Whichever way we go we have to keep some per-handle state on users of the xenbus device, whether that's a transaction id or reference to a unique transport page. Either way we don't need to continuously hold the xenbus_lock (which is super gross). >> If we have multiple pages the client driver is complicated by >> reserving >> user pages and creating grant references for them, and cleanly tearing >> down and dealloc'ing grant references at the appropriate point(s). I >> agree the daemon doesn't really get any more complicated, but I think >> save/restore will need extra code, either in the domain0 tools or in >> the guest os, to reconnect pages through to xenstored. > > No, this is the beauty of it: save/restore should be exactly to > libxenstored as the restarting of store daemon; Christian and I have > been vigorously debating semantics to get them the same (and I think > we're close). Then on save, the device simply closes; on restore, the > library reconnects. I wholeheartedly agree that restore should be equivalent to xenstored restart from the p.o.v. of the xenbus driver. That's how the block qnde net drivers already work. But it's orthogonal to whether we mux connections onto a single transport page. -- Keir