From: Anthony Liguori <anthony@codemonkey.ws>
To: Christoph Hellwig <hch@lst.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>, kvm@vger.kernel.org
Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command
Date: Mon, 11 May 2009 11:38:09 -0500 [thread overview]
Message-ID: <4A085471.40809@codemonkey.ws> (raw)
In-Reply-To: <20090511154046.GA4226@lst.de>
Christoph Hellwig wrote:
> On Mon, May 11, 2009 at 09:51:40AM -0500, Anthony Liguori wrote:
>
>> What typically triggers a flush operation?
>>
>
> fsync.
>
>
>> I would assume an fsync would, but would a flush happen after every
>> O_DIRECT write?
>>
>
> Right now it doesn't, but it probably should.
>
So then with cache=writeback, fsync behaves itself but O_DIRECT writes
do not.
This seems like a really undesirable combination of behavior from a
guest integrity point of view. It makes me wonder if it's really
useful. I think that any serious user would have to continue using
cache=writethrough. Is there a path that would ever allow someone who
cares about their data to use cache=writeback instead of cache=writethrough?
>> If the backend implementation of T_FLUSH is fsync, I would think that
>> this would result in rather poor performance for O_DIRECT operations in
>> the guest.
>>
>
> Right now it's fsync. By the time I'll submit the backend change it
> will still be fsync, but at least called from the posix-aio-compat
> thread pool.
>
fsync is pretty crappy on ext3 default configs. I'm concerned that this
could be considered a DoS by a malicious guest. If it sat in a T_FLUSH
loop, it would potentially bring your system to a crawl, no?
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-05-11 16:38 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 [this message]
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
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=4A085471.40809@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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.