From: Asias He <asias@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>,
kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Tejun Heo <tj@kernel.org>, Shaohua Li <shli@kernel.org>
Subject: Re: [PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path
Date: Thu, 02 Aug 2012 14:43:04 +0800 [thread overview]
Message-ID: <501A2178.3000906@redhat.com> (raw)
In-Reply-To: <20120802062742.GA23573@lst.de>
On 08/02/2012 02:27 PM, Christoph Hellwig wrote:
> On Thu, Aug 02, 2012 at 02:25:56PM +0800, Asias He wrote:
>> We need to support both REQ_FLUSH and REQ_FUA for bio based path since
>> it does not get the sequencing of REQ_FUA into REQ_FLUSH that request
>> based drivers can request.
>>
>> REQ_FLUSH is emulated by:
>> 1. Send VIRTIO_BLK_T_FLUSH to device
>> 2. Wait until the flush is finished
>
> There is no need to wait for the flush to finish if the REQ_FLUSH
> request has no data payload.
>
> Even if it has a payload waiting is highly suboptimal and it should
> use a non-blocking sequencing like it is done in the request layer.
So, for REQ_FLUSH, what we need is that send out the VIRTIO_BLK_T_FLUSH
and not to wait.
>>
>> REQ_FUA is emulated by:
>> 1. Send the actual write
>> 2. Wait until the actual write is finished
>> 3. Send VIRTIO_BLK_T_FLUSH to device
>> 4. Wait until the flush is finished
>> 5. Signal the end of the write to upper layer
>
> The same comment about not blocking applies here as well.
We still need to wait until the actual write is finished here?
Like,
REQ_FUA is emulated by:
1. Send the actual write
2. Wait until the actual write is finished
3. Send VIRTIO_BLK_T_FLUSH to device
4. Signal the end of the write to upper layer
--
Asias
WARNING: multiple messages have this Message-ID (diff)
From: Asias He <asias@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
Shaohua Li <shli@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path
Date: Thu, 02 Aug 2012 14:43:04 +0800 [thread overview]
Message-ID: <501A2178.3000906@redhat.com> (raw)
In-Reply-To: <20120802062742.GA23573@lst.de>
On 08/02/2012 02:27 PM, Christoph Hellwig wrote:
> On Thu, Aug 02, 2012 at 02:25:56PM +0800, Asias He wrote:
>> We need to support both REQ_FLUSH and REQ_FUA for bio based path since
>> it does not get the sequencing of REQ_FUA into REQ_FLUSH that request
>> based drivers can request.
>>
>> REQ_FLUSH is emulated by:
>> 1. Send VIRTIO_BLK_T_FLUSH to device
>> 2. Wait until the flush is finished
>
> There is no need to wait for the flush to finish if the REQ_FLUSH
> request has no data payload.
>
> Even if it has a payload waiting is highly suboptimal and it should
> use a non-blocking sequencing like it is done in the request layer.
So, for REQ_FLUSH, what we need is that send out the VIRTIO_BLK_T_FLUSH
and not to wait.
>>
>> REQ_FUA is emulated by:
>> 1. Send the actual write
>> 2. Wait until the actual write is finished
>> 3. Send VIRTIO_BLK_T_FLUSH to device
>> 4. Wait until the flush is finished
>> 5. Signal the end of the write to upper layer
>
> The same comment about not blocking applies here as well.
We still need to wait until the actual write is finished here?
Like,
REQ_FUA is emulated by:
1. Send the actual write
2. Wait until the actual write is finished
3. Send VIRTIO_BLK_T_FLUSH to device
4. Signal the end of the write to upper layer
--
Asias
next prev parent reply other threads:[~2012-08-02 6:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 6:25 [PATCH V5 0/4] Improve virtio-blk performance Asias He
2012-08-02 6:25 ` Asias He
2012-08-02 6:25 ` [PATCH V5 1/4] block: Introduce __blk_segment_map_sg() helper Asias He
2012-08-02 6:25 ` Asias He
2012-08-02 6:25 ` [PATCH V5 2/4] block: Add blk_bio_map_sg() helper Asias He
2012-08-02 6:25 ` Asias He
2012-08-02 6:25 ` [PATCH V5 3/4] virtio-blk: Add bio-based IO path for virtio-blk Asias He
2012-08-02 6:25 ` Asias He
2012-08-02 22:28 ` Michael S. Tsirkin
2012-08-02 22:28 ` Michael S. Tsirkin
2012-08-03 7:11 ` Asias He
2012-08-03 7:11 ` Asias He
2012-08-02 6:25 ` [PATCH V5 4/4] virtio-blk: Add REQ_FLUSH and REQ_FUA support to bio path Asias He
2012-08-02 6:25 ` Asias He
2012-08-02 6:27 ` Christoph Hellwig
2012-08-02 6:27 ` Christoph Hellwig
2012-08-02 6:43 ` Asias He [this message]
2012-08-02 6:43 ` Asias He
2012-08-06 15:17 ` Christoph Hellwig
2012-08-06 15:17 ` Christoph Hellwig
2012-08-07 8:50 ` Asias He
2012-08-07 8:50 ` Asias He
2012-08-02 21:40 ` [PATCH V5 0/4] Improve virtio-blk performance Jens Axboe
2012-08-02 21:40 ` Jens Axboe
2012-08-03 7:08 ` Asias He
2012-08-03 7:08 ` Asias He
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=501A2178.3000906@redhat.com \
--to=asias@redhat.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=shli@kernel.org \
--cc=tj@kernel.org \
--cc=virtualization@lists.linux-foundation.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 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.