linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wang Jianchao <jianchao.wan9@gmail.com>
To: axboe@kernel.dk
Cc: jbacik@fb.com, tj@kernel.org, bvanassche@acm.org,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 07/13] blk: use standalone macro to control bio.bi_iocost_cost
Date: Mon, 10 Jan 2022 17:10:40 +0800	[thread overview]
Message-ID: <20220110091046.17010-8-jianchao.wan9@gmail.com> (raw)
In-Reply-To: <20220110091046.17010-1-jianchao.wan9@gmail.com>

From: Wang Jianchao <wangjianchao@kuaishou.com>

This is a preparation to make iocost modular

Signed-off-by: Wang Jianchao <wangjianchao@kuaishou.com>
---
 block/Kconfig             | 4 ++++
 block/bio.c               | 2 +-
 include/linux/blk_types.h | 2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/block/Kconfig b/block/Kconfig
index 50cc1b56852c..e1b1bff5c1e9 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -26,6 +26,9 @@ menuconfig BLOCK
 
 if BLOCK
 
+config BLK_BIO_IOCOST
+	bool
+
 config BLK_RQ_ALLOC_TIME
 	bool
 
@@ -134,6 +137,7 @@ config BLK_CGROUP_IOCOST
 	bool "Enable support for cost model based cgroup IO controller"
 	depends on BLK_CGROUP
 	select BLK_RQ_ALLOC_TIME
+	select BLK_BIO_IOCOST
 	help
 	Enabling this option enables the .weight interface for cost
 	model based proportional IO control.  The IO controller
diff --git a/block/bio.c b/block/bio.c
index 15ab0d6d1c06..a9e2347b0021 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -268,7 +268,7 @@ void bio_init(struct bio *bio, struct bio_vec *table,
 #ifdef CONFIG_BLK_CGROUP
 	bio->bi_blkg = NULL;
 	bio->bi_issue.value = 0;
-#ifdef CONFIG_BLK_CGROUP_IOCOST
+#ifdef CONFIG_BLK_BIO_IOCOST
 	bio->bi_iocost_cost = 0;
 #endif
 #endif
diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index fe065c394fff..495ffc29bab0 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -261,7 +261,7 @@ struct bio {
 	 */
 	struct blkcg_gq		*bi_blkg;
 	struct bio_issue	bi_issue;
-#ifdef CONFIG_BLK_CGROUP_IOCOST
+#ifdef CONFIG_BLK_BIO_IOCOST
 	u64			bi_iocost_cost;
 #endif
 #endif
-- 
2.17.1


  parent reply	other threads:[~2022-01-10  9:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10  9:10 [PATCH 0/13] blk: make blk-rq-qos policies pluggable and modular Wang Jianchao
2022-01-10  9:10 ` [PATCH 01/13] blk: make blk-rq-qos support pluggable and modular policy Wang Jianchao
2022-01-13  1:49   ` kernel test robot
2022-01-13  3:52     ` Wang Jianchao
2022-01-10  9:10 ` [PATCH 02/13] blk-wbt: make wbt pluggable Wang Jianchao
2022-01-10  9:10 ` [PATCH 03/13] blk: export following interfaces Wang Jianchao
2022-01-10  9:10 ` [PATCH 04/13] cgroup: export following two interfaces Wang Jianchao
2022-01-10  9:10 ` [PATCH 05/13] blk-iolatency: make iolatency pluggable and modular Wang Jianchao
2022-01-10  9:10 ` [PATCH 06/13] blk: remove unused BLK_RQ_IO_DATA_LEN Wang Jianchao
2022-01-10  9:10 ` Wang Jianchao [this message]
2022-01-10  9:10 ` [PATCH 08/13] blk-iocost: make iocost pluggable and modular Wang Jianchao
2022-01-10  9:10 ` [PATCH 09/13] blk: rename ioprio.c to ioprio-common.c Wang Jianchao
2022-01-10  9:10 ` [PATCH 10/13] blk-ioprio: make ioprio pluggable and modular Wang Jianchao
2022-01-10  9:10 ` [PATCH 11/13] blk: remove unused interfaces of blk-rq-qos Wang Jianchao
2022-01-10  9:10 ` [PATCH 12/13] blk: make request able to carry blkcg_gq Wang Jianchao
2022-01-10  9:10 ` [PATCH 13/13] blk: introduce iostat per cgroup module Wang Jianchao
2022-01-12 20:13   ` Tejun Heo
2022-01-13  2:40     ` Wang Jianchao
2022-01-13 17:01       ` Tejun Heo
2022-01-14  2:01         ` Wang Jianchao
2022-01-10 17:36 ` [PATCH 0/13] blk: make blk-rq-qos policies pluggable and modular Christoph Hellwig
2022-01-11  1:53   ` Wang Jianchao
2022-01-11  3:25   ` Bart Van Assche

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=20220110091046.17010-8-jianchao.wan9@gmail.com \
    --to=jianchao.wan9@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=jbacik@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).