All of lore.kernel.org
 help / color / mirror / Atom feed
From: "M. Warner Losh" <imp@bsdimp.com>
To: qemu-devel@nongnu.org, anthony@codemonkey.ws
Cc: uril@redhat.com
Subject: Re: [Qemu-devel] migration: adding migration to/from a file (v2)
Date: Thu, 19 Feb 2009 17:36:55 -0700 (MST)	[thread overview]
Message-ID: <20090219.173655.107742401.imp@bsdimp.com> (raw)
In-Reply-To: <499DF276.4080305@codemonkey.ws>

In message: <499DF276.4080305@codemonkey.ws>
            Anthony Liguori <anthony@codemonkey.ws> writes:
: M. Warner Losh wrote:
: > In message: <20090219202849.GE22319@shareable.org>
: >             Jamie Lokier <jamie@shareable.org> writes:
: > : Anthony Liguori wrote:
: > : > >Sure looks like a bug.
: > : > I wish!  It's Unix suckiness.
: > : 
: > : Windows is the same.
: > : It's a more of a conceptual problem than it looks, not merely an API bug.
: > : 
: > : It comes down to "what would 'readable' and 'writable' mean on a file?".
: >
: > "Would a read or write operation block?" is a better way to look at
: > the interface that select() or poll() provides.  For a regular file,
: > the answer is "no" since the writes are so fast and often
: > asynchronous...
: >   
: 
: Except when they aren't..

Right.  That bit was added later, I think...  My note was more of an
explanation of how we got here, not that it was perfect and a good
thing..

: The real issue is that read/write offers streaming semantics, not random 
: access.  You cannot guarantee that a read is going to complete unless 
: you do read ahead.  So the semantics would be something like pread(fd, 
: buf, X) = EAGAIN (kernel starts the operation for X), later, pread(fd, 
: buf, X) = OK.  Sort of a weird interface.
: 
: For write, it's even more bizarre because you can't "write-ahead".  If 
: you're dealing with O_SYNC or O_DIRECT, there's simply no semantic that 
: makes sense.
: 
: So fundamentally, read/write is a bad interface for random IO.

Also agreed.

: Regards,
: 
: Anthony Liguori
: 
: > Warner
: >
: >
: >   
: 
: 
: 
: 

  reply	other threads:[~2009-02-20  0:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-19 11:45 [Qemu-devel] migration: adding migration to/from a file (v2) Uri Lublin
2009-02-19 13:57 ` Anthony Liguori
2009-02-19 16:14   ` Uri Lublin
2009-02-19 16:51     ` Anthony Liguori
2009-02-19 19:06       ` Uri Lublin
2009-02-19 20:05         ` Anthony Liguori
2009-02-19 20:28           ` Jamie Lokier
2009-02-19 23:36             ` M. Warner Losh
2009-02-19 23:59               ` Anthony Liguori
2009-02-20  0:36                 ` M. Warner Losh [this message]
2009-02-19 20:45           ` Uri Lublin
2009-02-19 19:37       ` Jamie Lokier
2009-02-19 20:06         ` Anthony Liguori
2009-02-19 19:33     ` Jamie Lokier

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=20090219.173655.107742401.imp@bsdimp.com \
    --to=imp@bsdimp.com \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=uril@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.