From: Weiping Zhang <zhangweiping@didiglobal.com>
To: <axboe@kernel.dk>, <ming.lei@redhat.com>, <snitzer@redhat.com>,
<mpatocka@redhat.com>
Cc: <linux-block@vger.kernel.org>
Subject: [PATCH v4 0/2] fix inaccurate io_ticks
Date: Mon, 26 Oct 2020 14:15:09 +0800 [thread overview]
Message-ID: <20201026061509.GA22573@192.168.3.9> (raw)
Hi,
This patchset include two patches,
01. block: fix inaccurate io_ticks
fix the io_ticks if start a new IO and there is no inflight IO before.
Please see the commit message of patch1 for more detail.
02. blk-mq: break more earlier when interate hctx
An optimization for blk_mq_queue_inflight and blk_mq_queue_inflight,
these two function only want to know if there is IO inflight and do
not care how many inflight IOs are there.
After this patch blk_mq_queue_inflight will stop interate other hctx
when find a inflight IO, blk_mq_part_is_in_inflight stop interate
other setbit/hctx when find a inflight IO.
Changes since v3:
* add a parameter for blk_mq_queue_tag_busy_iter to break earlier
when interate hctx of a queue, since blk_mq_part_is_in_inflight
and blk_mq_queue_inflight do not care how many inflight IOs.
Changes since v2:
* use blk_mq_queue_tag_busy_iter framework instead of open-code.
* update_io_ticks before update inflight for __part_start_io_acct
Changes since v1:
* avoid iterate all tagset, return directly if find a set bit.
* fix some typo in commit message
Weiping Zhang (2):
block: fix inaccurate io_ticks
blk-mq: break more earlier when interate hctx
block/blk-core.c | 19 ++++++++++----
block/blk-mq-tag.c | 11 ++++++--
block/blk-mq-tag.h | 2 +-
block/blk-mq.c | 58 +++++++++++++++++++++++++++++++++++++++---
block/blk-mq.h | 1 +
block/blk.h | 1 +
block/genhd.c | 13 ++++++++++
include/linux/blk-mq.h | 1 +
8 files changed, 94 insertions(+), 12 deletions(-)
--
2.18.4
reply other threads:[~2020-10-26 6:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201026061509.GA22573@192.168.3.9 \
--to=zhangweiping@didiglobal.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=mpatocka@redhat.com \
--cc=snitzer@redhat.com \
/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).