From: Rusty Russell <rusty@rustcorp.com.au>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>, kvm@vger.kernel.org
Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command
Date: Wed, 13 May 2009 11:22:17 +0930 [thread overview]
Message-ID: <200905131122.18221.rusty@rustcorp.com.au> (raw)
In-Reply-To: <200905121618.36104.borntraeger@de.ibm.com>
On Tue, 12 May 2009 11:48:36 pm Christian Borntraeger wrote:
> Am Tuesday 12 May 2009 15:54:14 schrieb Rusty Russell:
> > On Mon, 11 May 2009 06:09:08 pm Christoph Hellwig wrote:
> > > Do we need a new feature flag for this command or can we expect that
> > > all previous barrier support was buggy enough anyway?
> >
> > You mean reuse the VIRTIO_BLK_F_BARRIER for this as well? Seems fine.
>
> It is also used by kuli
> (http://www.ibm.com/developerworks/linux/linux390/kuli.html) and kuli used
> fdatasync.
OK, that's sufficient for me. It's not like block is going to catch up with net
for feature flags any time soon.
Christoph, please make a new feature flag.
Oh and FYI Christian, you might not have seen this patch:
lguest: barrier me harder
Impact: barrier correctness in example launcher
I doubt either lguest user will complain about performance.
Reported-by: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
Documentation/lguest/lguest.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c
--- a/Documentation/lguest/lguest.c
+++ b/Documentation/lguest/lguest.c
@@ -1630,6 +1630,13 @@ static bool service_io(struct device *de
}
}
+ /* OK, so we noted that it was pretty poor to use an fdatasync as a
+ * barrier. But Christoph Hellwig points out that we need a sync
+ * *afterwards* as well: "Barriers specify no reordering to the front
+ * or the back." And Jens Axboe confirmed it, so here we are: */
+ if (out->type & VIRTIO_BLK_T_BARRIER)
+ fdatasync(vblk->fd);
+
/* We can't trigger an IRQ, because we're not the Launcher. It does
* that when we tell it we're done. */
add_used(dev->vq, head, wlen);
next prev parent reply other threads:[~2009-05-13 1:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-11 8:39 [PATCH, RFC] virtio_blk: add cache flush command Christoph Hellwig
2009-05-11 14:51 ` Anthony Liguori
2009-05-11 15:40 ` Christoph Hellwig
2009-05-11 15:45 ` Avi Kivity
2009-05-11 16:28 ` Christoph Hellwig
2009-05-11 16:49 ` Avi Kivity
2009-05-11 17:47 ` Anthony Liguori
2009-05-11 18:00 ` Avi Kivity
2009-05-11 18:29 ` Anthony Liguori
2009-05-11 18:40 ` Avi Kivity
2009-05-18 12:03 ` Christoph Hellwig
2009-05-12 7:23 ` Christoph Hellwig
2009-05-12 7:19 ` Christoph Hellwig
2009-05-12 8:35 ` Avi Kivity
2009-05-18 12:06 ` Christoph Hellwig
2009-05-11 16:38 ` Anthony Liguori
2009-05-12 7:26 ` Christoph Hellwig
2009-05-12 13:54 ` Rusty Russell
2009-05-12 14:18 ` Christian Borntraeger
2009-05-13 1:52 ` Rusty Russell [this message]
2009-05-18 12:07 ` Christoph Hellwig
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=200905131122.18221.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=borntraeger@de.ibm.com \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.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