Skip to content

Commit bf20ab5

Browse files
YuKuai-huaweiaxboe
authored andcommitted
blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW
One the one hand, it's marked EXPERIMENTAL since 2017, and looks like there are no users since then, and no testers and no developers, it's just not active at all. On the other hand, even if the config is disabled, there are still many fields in throtl_grp and throtl_data and many functions that are only used for throtl low. At last, currently blk-throtl is initialized during disk initialization, and destroyed during disk removal, and it exposes many functions to be called directly from block layer. Remove throtl low to make code much more cleaner and follow up work much easier. Signed-off-by: Yu Kuai <[email protected]> Acked-by: Tejun Heo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 7be8356 commit bf20ab5

File tree

9 files changed

+42
-918
lines changed

9 files changed

+42
-918
lines changed

Documentation/ABI/stable/sysfs-block

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -594,18 +594,6 @@ Description:
594594
the data. If no such restriction exists, this file will contain
595595
'0'. This file is writable for testing purposes.
596596

597-
598-
What: /sys/block/<disk>/queue/throttle_sample_time
599-
Date: March 2017
600-
601-
Description:
602-
[RW] This is the time window that blk-throttle samples data, in
603-
millisecond. blk-throttle makes decision based on the
604-
samplings. Lower time means cgroups have more smooth throughput,
605-
but higher CPU overhead. This exists only when
606-
CONFIG_BLK_DEV_THROTTLING_LOW is enabled.
607-
608-
609597
What: /sys/block/<disk>/queue/virt_boundary_mask
610598
Date: April 2021
611599

arch/loongarch/configs/loongson3_defconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
7676
CONFIG_MODVERSIONS=y
7777
CONFIG_BLK_DEV_ZONED=y
7878
CONFIG_BLK_DEV_THROTTLING=y
79-
CONFIG_BLK_DEV_THROTTLING_LOW=y
8079
CONFIG_BLK_WBT=y
8180
CONFIG_BLK_CGROUP_IOLATENCY=y
8281
CONFIG_BLK_CGROUP_FC_APPID=y

block/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,6 @@ config BLK_DEV_THROTTLING
119119

120120
See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
121121

122-
config BLK_DEV_THROTTLING_LOW
123-
bool "Block throttling .low limit interface support (EXPERIMENTAL)"
124-
depends on BLK_DEV_THROTTLING
125-
help
126-
Add .low limit interface for block throttling. The low limit is a best
127-
effort limit to prioritize cgroups. Depending on the setting, the limit
128-
can be used to protect cgroups in terms of bandwidth/iops and better
129-
utilize disk resource.
130-
131-
Note, this is an experimental interface and could be changed someday.
132-
133122
config BLK_WBT
134123
bool "Enable support for block device writeback throttling"
135124
help

block/bio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,6 @@ void bio_endio(struct bio *bio)
16291629
goto again;
16301630
}
16311631

1632-
blk_throtl_bio_endio(bio);
16331632
/* release cgroup info */
16341633
bio_uninit(bio);
16351634
if (bio->bi_end_io)

block/blk-stat.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ void blk_stat_add(struct request *rq, u64 now)
5757

5858
value = (now >= rq->io_start_time_ns) ? now - rq->io_start_time_ns : 0;
5959

60-
if (req_op(rq) == REQ_OP_READ || req_op(rq) == REQ_OP_WRITE)
61-
blk_throtl_stat_add(rq, value);
62-
6360
rcu_read_lock();
6461
cpu = get_cpu();
6562
list_for_each_entry_rcu(cb, &q->stats->callbacks, list) {

block/blk-sysfs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,6 @@ QUEUE_RW_ENTRY(queue_io_timeout, "io_timeout");
516516
QUEUE_RO_ENTRY(queue_virt_boundary_mask, "virt_boundary_mask");
517517
QUEUE_RO_ENTRY(queue_dma_alignment, "dma_alignment");
518518

519-
#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
520-
QUEUE_RW_ENTRY(blk_throtl_sample_time, "throttle_sample_time");
521-
#endif
522-
523519
/* legacy alias for logical_block_size: */
524520
static struct queue_sysfs_entry queue_hw_sector_size_entry = {
525521
.attr = {.name = "hw_sector_size", .mode = 0444 },
@@ -640,9 +636,6 @@ static struct attribute *queue_attrs[] = {
640636
&queue_fua_entry.attr,
641637
&queue_dax_entry.attr,
642638
&queue_poll_delay_entry.attr,
643-
#ifdef CONFIG_BLK_DEV_THROTTLING_LOW
644-
&blk_throtl_sample_time_entry.attr,
645-
#endif
646639
&queue_virt_boundary_mask_entry.attr,
647640
&queue_dma_alignment_entry.attr,
648641
NULL,

0 commit comments

Comments
 (0)