xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: kwolf@redhat.com, xen-devel@lists.xensource.com,
	qemu-devel@nongnu.org, konrad.wilk@oracle.com
Subject: Re: [PATCH] xen_disk: implement	BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER
Date: Wed, 25 Apr 2012 10:45:24 +0200	[thread overview]
Message-ID: <20120425084524.GA17537@lst.de> (raw)
In-Reply-To: <1334595957-12552-1-git-send-email-stefano.stabellini@eu.citrix.com>

> -    case BLKIF_OP_WRITE_BARRIER:
> +    case BLKIF_OP_FLUSH_DISKCACHE:
>          if (!ioreq->req.nr_segments) {
>              ioreq->presync = 1;
>              return 0;
>          }
> -        ioreq->presync = ioreq->postsync = 1;
> +        ioreq->postsync = 1;
>          /* fall through */

It might be worth documenting the semantics of BLKIF_OP_FLUSH_DISKCACHE
in a comment here.  I haven't found any spec for the xen_disk protocol,
but from looking at the Linux frontend it seems like the semantics
of REQ_FLUSH and REQ_FUA in the Linux block driver are overloaded into
BLKIF_OP_FLUSH_DISKCACHE, which is fairly confusing given that REQ_FLUSH
already overload functionality.

Even worse REQ_FLUSH with a payload implies a preflush, while REQ_FUA
implies a post flush, and it seems like Xen has no way to distinguish
the two, making thing like log writes very inefficient.

Independent of that the implementation should really use a state machine
around bdrv_aio_flush instead of doing guest-sychronous bdrv_flush calls.

  parent reply	other threads:[~2012-04-25  8:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 17:05 [PATCH] xen_disk: implement BLKIF_OP_FLUSH_DISKCACHE, remove BLKIF_OP_WRITE_BARRIER Stefano Stabellini
2012-04-16 17:10 ` Konrad Rzeszutek Wilk
2012-04-25  8:45 ` Christoph Hellwig [this message]
2012-04-25  9:02   ` [Xen-devel] " Ian Campbell
2012-04-25 10:20     ` Christoph Hellwig
2012-04-25 11:21       ` Stefano Stabellini
2012-04-25 11:17         ` Ian Campbell
2012-04-25 11:23         ` Christoph Hellwig
2012-04-26 15:41           ` Konrad Rzeszutek Wilk
2012-05-09 12:42             ` Stefano Stabellini
2012-12-19 18:46               ` Konrad Rzeszutek Wilk
2013-01-09 18:44                 ` Stefano Stabellini

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=20120425084524.GA17537@lst.de \
    --to=hch@lst.de \
    --cc=konrad.wilk@oracle.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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 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).