From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrey Korolyov <andrey@xdel.ru>
Cc: Sergey Fionov <fionov@gmail.com>, Jens Axboe <axboe@kernel.dk>,
Jeff Moyer <jmoyer@redhat.com>, Peter Lieven <pl@kamp.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] 4k seq read splitting for virtio-blk - possible workarounds?
Date: Mon, 26 Oct 2015 18:03:16 +0100 [thread overview]
Message-ID: <562E5CD4.8010902@redhat.com> (raw)
In-Reply-To: <CABYiri_2-fBnLfHDe96rW-1JFK47ZfQZqo9+XUs18qs3aKV+5A@mail.gmail.com>
On 26/10/2015 17:43, Andrey Korolyov wrote:
> On Mon, Oct 26, 2015 at 7:37 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> On 26/10/2015 17:31, Andrey Korolyov wrote:
>>>> the virtio block device is always splitting a single read
>>>> range request to 4k ones, bringing the overall performance of the
>>>> sequential reads far below virtio-scsi.
>>>>
>>>> How does the blktrace look like in the guest?
>>>
>>> Yep, thanks for suggestion. It looks now like a pure driver issue:
>>>
>>> Reads Queued: 11008, 44032KiB Writes Queued: 0, 0KiB
>>> Read Dispatches: 11008, 44032KiB Write Dispatches: 0, 0KiB
>>>
>>> vs
>>>
>>> Reads Queued: 185728, 742912KiB Writes Queued: 0, 0KiB
>>> Read Dispatches: 2902, 742912KiB Write Dispatches: 0, 0KiB
>>>
>>> Because guest virtio-blk driver lacks *any* blk scheduler management,
>>> this is kinda logical. Requests for scsi backend are dispatched in
>> ^^^^^^^^^^
>>
>> queued you mean?
>>
>>> single block-sized chunks as well, but they are mostly merged by a
>>> scheduler before being passed to the device layer. Could be there any
>>> improvements over the situation except writing an underlay b/w virtio
>>> emulator backend and the real storage?
>>
>> This is probably the fall-out of converting the virtio-blk to use
>> blk-mq, which was premature to say the least. Jeff Moyer was working on
>> it, but I'm not sure if this has been merged. Andrey, what kernel are
>> you using?
>
> Queued, sorry for honest mistype, guest kernel is a 3.16.x from
> jessie, so regular blk-mq is there. Any point of interest for trying
> something newer? And of course I didn`t thought about something older,
> will try against 3.10 now.
Yes, it makes sense to try both something older and something newer. I
found this:
commit e6c4438ba7cb615448492849970aaf0aaa1cc973
Author: Jeff Moyer <jmoyer@redhat.com>
Date: Fri May 8 10:51:30 2015 -0700
blk-mq: fix plugging in blk_sq_make_request
Looking at the meat of the patch, we have:
const int is_sync = rw_is_sync(bio->bi_rw);
const int is_flush_fua = bio->bi_rw & (REQ_FLUSH | REQ_FUA);
- unsigned int use_plug, request_count = 0;
+ struct blk_plug *plug;
+ unsigned int request_count = 0;
struct blk_map_ctx data;
struct request *rq;
- /*
- * If we have multiple hardware queues, just go directly to
- * one of those for sync IO.
- */
- use_plug = !is_flush_fua && !is_sync;
For reads rw_is_sync returns true, hence use_plug is always false. So
4.2 kernels could fix this issue.
Paolo
next prev parent reply other threads:[~2015-10-26 17:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 11:50 [Qemu-devel] 4k seq read splitting for virtio-blk - possible workarounds? Andrey Korolyov
2015-10-26 15:37 ` Paolo Bonzini
2015-10-26 16:31 ` Andrey Korolyov
2015-10-26 16:37 ` Paolo Bonzini
2015-10-26 16:43 ` Andrey Korolyov
2015-10-26 17:03 ` Paolo Bonzini [this message]
2015-10-26 17:18 ` Andrey Korolyov
2015-10-26 17:32 ` Paolo Bonzini
2015-10-26 18:28 ` Andrey Korolyov
2015-10-27 2:04 ` Fam Zheng
2015-10-27 9:30 ` Paolo Bonzini
2015-10-30 20:04 ` Andrey Korolyov
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=562E5CD4.8010902@redhat.com \
--to=pbonzini@redhat.com \
--cc=andrey@xdel.ru \
--cc=axboe@kernel.dk \
--cc=fionov@gmail.com \
--cc=jmoyer@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).