From 3231efb9565fea7ffb4aa23881c142c7fabd63e1 Mon Sep 17 00:00:00 2001 From: Haisu Wang Date: Tue, 13 Aug 2024 16:21:40 +0800 Subject: [PATCH] Revert "io/tqos: add sysctl_buffer_io_limit switch for buffer io limit." This reverts commit 4d87de6bb421a3ea02bb30ca795049438124008a. Revert due to refactory the buffer IO function. In TK5, unnecessary to compatible kabi by using the "nodeinfo" in "struct mem_cgroup {}". Original tapd and MR: https://tapd.woa.com/tapd_fe/20422414/story/detail/1020422414117471502 https://git.woa.com/tlinux/tkernel5/-/merge_requests/117 Signed-off-by: Haisu Wang --- include/linux/backing-dev.h | 6 +----- kernel/sysctl.c | 10 ---------- mm/backing-dev.c | 3 --- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h index ff49a7cfaec0..b1f8b04f1b8f 100644 --- a/include/linux/backing-dev.h +++ b/include/linux/backing-dev.h @@ -46,7 +46,6 @@ extern spinlock_t bdi_lock; extern struct list_head bdi_list; extern struct workqueue_struct *bdi_wq; -extern unsigned int sysctl_buffer_io_limit; static inline bool wb_has_dirty_io(struct bdi_writeback *wb) { @@ -175,10 +174,7 @@ static inline bool inode_cgwb_enabled(struct inode *inode) { struct backing_dev_info *bdi = inode_to_bdi(inode); - return (sysctl_buffer_io_limit || - (cgroup_subsys_on_dfl(memory_cgrp_subsys) && - cgroup_subsys_on_dfl(io_cgrp_subsys))) && - (bdi->capabilities & BDI_CAP_WRITEBACK) && + return (bdi->capabilities & BDI_CAP_WRITEBACK) && (inode->i_sb->s_iflags & SB_I_CGROUPWB); } diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 630bb860d622..c967cbd4b004 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -64,7 +64,6 @@ #include #include -#include #include "../lib/kstrtox.h" #include @@ -2349,15 +2348,6 @@ static struct ctl_table kern_table[] = { .extra2 = SYSCTL_ONE, }, #endif - { - .procname = "buffer_io_limit", - .data = &sysctl_buffer_io_limit, - .maxlen = sizeof(unsigned int), - .mode = 0644, - .proc_handler = proc_dointvec_minmax, - .extra1 = SYSCTL_ZERO, - .extra2 = SYSCTL_ONE, - }, { } }; diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 8c32c02b64a8..b1c967c796dc 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -32,9 +32,6 @@ static u64 bdi_id_cursor; static struct rb_root bdi_tree = RB_ROOT; LIST_HEAD(bdi_list); -/* switch for buffer io limit */ -unsigned int sysctl_buffer_io_limit; - /* bdi_wq serves all asynchronous writeback tasks */ struct workqueue_struct *bdi_wq;