From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQpcH-000682-5V for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:00:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQpcF-00067a-MJ for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:00:32 -0500 Received: from [199.232.76.173] (port=34879 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQpcF-00067X-Jv for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:00:31 -0500 Received: from mail2.shareable.org ([80.68.89.115]:54228) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LQpcF-0001h9-3L for qemu-devel@nongnu.org; Sat, 24 Jan 2009 16:00:31 -0500 Date: Sat, 24 Jan 2009 21:00:26 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: A new direction for vmchannel? Message-ID: <20090124210026.GA22932@shareable.org> References: <4979D80D.307@us.ibm.com> <20090124171928.GA30108@redhat.com> <497B5546.5060000@codemonkey.ws> <20090124183912.GA7900@redhat.com> <497B6C4F.1040803@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <497B6C4F.1040803@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eric Van Hensbergen , Chris Wright , Gleb Natapov , kvm-devel , Dor Laor , Avi Kivity Anthony Liguori wrote: > Thinking more about this, the difficulty is that poll() only has useful > semantics when you're dealing with a buffered stream of some sort. That > is, poll() is only really capable of asking whether there is data > pending in your read buffer. > > With 9P, you have to explicitly send a read request. You can implement > buffered IO by simply sending constant read requests such that there is > always one read request pending. I don't think it's useful to do this > in the kernel. In linux/Documentation/fs/9p.txt: nodevmap do not map special files - represent them as normal files. This can be used to share devices/named pipes/sockets between hosts. This functionality will be expanded in later versions. Does this mean it can provide the semantics of a named pipe or unix domain socket over 9p? Both would provide suitable poll() behaviour. A unix domain socket sounds especially useful, practically a drop in replacement for the current network vmchannel, without configuration downsides. But what about non-Linux guests? > Unfortunately, there's no way to do async IO in userspace that doesn't > suck so that would make this pretty difficult. We could use a thread > pool, but that's somewhat soul crushing and doesn't scale well. I think > that puts a requirement on v9fs to support linux-aio. It sounds like a weird mashup of unix regular file behaviour and unix socket behaviour. Poll doesn't work, aio might, but you can read/write like a stream? Very un-unix. Even if it can be made to work, that's sufficiently un-unix to reduce its general utility with existing scripting languages, existing monitoring programs etc. -- Jamie