From: chengming.zhou@linux.dev
To: axboe@kernel.dk, ming.lei@redhat.com, hch@lst.de, bvanassche@acm.org
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
zhouchengming@bytedance.com
Subject: [PATCH v4 0/4] blk-mq: optimize flush and request size
Date: Mon, 17 Jul 2023 12:00:54 +0800 [thread overview]
Message-ID: <20230717040058.3993930-1-chengming.zhou@linux.dev> (raw)
From: Chengming Zhou <zhouchengming@bytedance.com>
v4:
- Rebase on the updated block/master branch, which include a flush bugfix
from Christoph. Please help to check patch 04. Thanks!
- Add a bugfix patch 02 for post-flush requests, put before other flush optimizations.
- Collect Reviewed-by tags from Ming and Christoph. Thanks!
- [v3] https://lore.kernel.org/lkml/20230707093722.1338589-1-chengming.zhou@linux.dev/
v3:
- Collect Reviewed-by tags from Ming and Christoph. Thanks!
- Remove the list and csd variables which are only used once.
- Fix a bug report of blktests nvme/012 by re-initialization of
rq->queuelist, which maybe corrupted by rq->rq_next reuse.
- [v2] https://lore.kernel.org/all/20230629110359.1111832-1-chengming.zhou@linux.dev/
v2:
- Change to use call_single_data_t, which use __aligned() to avoid
to use 2 cache lines for 1 csd. Thanks Ming Lei.
- [v1] https://lore.kernel.org/all/20230627120854.971475-1-chengming.zhou@linux.dev/
Hello,
After the commit be4c427809b0 ("blk-mq: use the I/O scheduler for
writes from the flush state machine"), rq->flush can't reuse rq->elv
anymore, since flush_data requests can go into io scheduler now.
That increased the size of struct request by 24 bytes, but this
patchset can decrease the size by 40 bytes, which is good I think.
patch 1 use percpu csd to do remote complete instead of per-rq csd,
decrease the size by 24 bytes.
patch 2 fixes a bug in blk-flush for post-flush requests.
patch 3-4 reuse rq->queuelist in flush state machine pending list,
and maintain unsigned long counter of inflight flush_data requests,
decrease the size by 16 bytes.
Thanks for comments!
Chengming Zhou (4):
blk-mq: use percpu csd to remote complete instead of per-rq csd
blk-flush: fix rq->flush.seq for post-flush requests
blk-flush: count inflight flush_data requests
blk-flush: reuse rq queuelist in flush state machine
block/blk-flush.c | 26 +++++++++++++++-----------
block/blk-mq.c | 12 ++++++------
block/blk.h | 5 ++---
include/linux/blk-mq.h | 6 +-----
4 files changed, 24 insertions(+), 25 deletions(-)
--
2.41.0
next reply other threads:[~2023-07-17 4:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 4:00 chengming.zhou [this message]
2023-07-17 4:00 ` [PATCH v4 1/4] blk-mq: use percpu csd to remote complete instead of per-rq csd chengming.zhou
2023-07-17 4:00 ` [PATCH v4 2/4] blk-flush: fix rq->flush.seq for post-flush requests chengming.zhou
2023-07-17 4:00 ` [PATCH v4 3/4] blk-flush: count inflight flush_data requests chengming.zhou
2023-07-17 4:00 ` [PATCH v4 4/4] blk-flush: reuse rq queuelist in flush state machine chengming.zhou
2024-05-24 16:07 ` Friedrich Weber
2024-05-27 5:09 ` Chengming Zhou
2024-05-27 16:04 ` Friedrich Weber
2024-05-27 23:34 ` Chengming Zhou
2024-05-27 23:50 ` Chengming Zhou
2024-05-28 0:12 ` Chengming Zhou
2024-05-28 8:42 ` Friedrich Weber
2024-05-28 9:09 ` Chengming Zhou
2024-05-28 14:40 ` Friedrich Weber
2024-05-29 8:50 ` Chengming Zhou
2024-05-31 6:17 ` Christoph Hellwig
2024-05-31 8:16 ` Chengming Zhou
2023-07-17 14:18 ` [PATCH v4 0/4] blk-mq: optimize flush and request size 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=20230717040058.3993930-1-chengming.zhou@linux.dev \
--to=chengming.zhou@linux.dev \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=zhouchengming@bytedance.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).