qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Jamie Lokier <jamie@shareable.org>
Cc: Eric Van Hensbergen <ericvanhensbergen@us.ibm.com>,
	Chris Wright <chrisw@redhat.com>, kvm-devel <kvm@vger.kernel.org>,
	Gleb Natapov <gleb@redhat.com>, Dor Laor <dlaor@redhat.com>,
	qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] Re: A new direction for vmchannel?
Date: Sat, 24 Jan 2009 15:22:07 -0600	[thread overview]
Message-ID: <497B867F.7020207@codemonkey.ws> (raw)
In-Reply-To: <20090124210026.GA22932@shareable.org>

Jamie Lokier wrote:
> 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?
>   

Eric will have to correct me if I'm wrong, but I believe that that bit 
of functionality is not yet implemented (although it's been discussed).

> But what about non-Linux guests?
>   

The plan for non-Linux guests is to expose the 9P protocol stream down 
to userspace and provide a library with posix-like file system 
semantics.  For instance kvmfs_open(), kvmfs_read(), kvmfs_write(), 
etc.  Applications that care about portability can use this library on 
Linux and non-Linux.

For non-Linux guests where we can get a kernel driver in, the driver 
will feed the 9P stream directly to userspace.  For guests that we 
cannot get a kernel driver in, we can stream 9P to the guest via TCP, 
serial port, etc.  This requires some config in the guest's userspace 
and may require some admin intervention but that's the price you pay for 
avoiding a kernel module.

>> 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.
>   

Right.  We can certainly modify v9fs to make poll() behave more naturally.

Regards,

Anthony Liguori

> 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
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   

  reply	other threads:[~2009-01-24 21:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23 14:45 [Qemu-devel] A new direction for vmchannel? Anthony Liguori
2009-01-23 17:12 ` [Qemu-devel] " Chris Wright
2009-01-23 17:37   ` Anthony Liguori
2009-01-23 20:43 ` Gleb Natapov
2009-01-23 20:58   ` Anthony Liguori
2009-01-24  0:02     ` Dor Laor
2009-01-24 10:22       ` Alexander Graf
2009-01-24 22:28         ` Dor Laor
2009-01-24 17:19 ` Daniel P. Berrange
2009-01-24 17:52   ` Anthony Liguori
2009-01-24 18:39     ` Gleb Natapov
2009-01-24 18:47       ` Anthony Liguori
2009-01-24 19:30       ` Anthony Liguori
2009-01-24 21:00         ` Jamie Lokier
2009-01-24 21:22           ` Anthony Liguori [this message]
2009-01-25 14:16     ` Daniel P. Berrange
2009-01-25 17:58       ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497B867F.7020207@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=chrisw@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=ericvanhensbergen@us.ibm.com \
    --cc=gleb@redhat.com \
    --cc=jamie@shareable.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).