From: Ming Lei <ming.lei@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org, ming.lei@redhat.com
Subject: Re: [PATCH] block: do not reverse request order when flushing plug list
Date: Tue, 14 Mar 2023 18:18:20 +0800 [thread overview]
Message-ID: <ZBBJ7CLOurvOO3OQ@ovpn-8-18.pek2.redhat.com> (raw)
In-Reply-To: <20230313093002.11756-1-jack@suse.cz>
On Mon, Mar 13, 2023 at 10:30:02AM +0100, Jan Kara wrote:
> Commit 26fed4ac4eab ("block: flush plug based on hardware and software
> queue order") changed flushing of plug list to submit requests one
> device at a time. However while doing that it also started using
> list_add_tail() instead of list_add() used previously thus effectively
> submitting requests in reverse order. Also when forming a rq_list with
> remaining requests (in case two or more devices are used), we
> effectively reverse the ordering of the plug list for each device we
> process. Submitting requests in reverse order has negative impact on
> performance for rotational disks (when BFQ is not in use). We observe
> 10-25% regression in random 4k write throughput, as well as ~20%
> regression in MariaDB OLTP benchmark on rotational storage on btrfs
> filesystem.
>
> Fix the problem by preserving ordering of the plug list when inserting
> requests into the queuelist as well as by appending to requeue_list
> instead of prepending to it.
Also in case of !plug->multiple_queues && !plug->has_elevator, requests
are still sent to device in reverse order, do we need to cover that case?
Thanks,
Ming
next prev parent reply other threads:[~2023-03-14 10:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 9:30 [PATCH] block: do not reverse request order when flushing plug list Jan Kara
2023-03-14 7:57 ` Christoph Hellwig
2023-03-14 10:18 ` Ming Lei [this message]
2023-03-14 12:09 ` Jan Kara
2023-03-14 12:22 ` Damien Le Moal
2023-03-14 15:26 ` Jens Axboe
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=ZBBJ7CLOurvOO3OQ@ovpn-8-18.pek2.redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=jack@suse.cz \
--cc=linux-block@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