[Devel] [PATCH vz9 04/16] mm, cgroup, writeback: Enable per-cgroup writeback for v1 cgroup.
Nikita Yushchenko
nikita.yushchenko at virtuozzo.com
Wed Sep 29 10:00:05 MSK 2021
From: Andrey Ryabinin <aryabinin at virtuozzo.com>
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
Cherry-picked from vz8 commit 9dd7b6eebb0d ("mm, cgroup, writeback:
Enable per-cgroup writeback for v1 cgroup.")).
Updated to follow upstream commits ed7b6b4f6e91 ("bdi: remove
BDI_CAP_CGROUP_WRITEBACK")) and f56753ac2a90 ("bdi: replace
BDI_CAP_NO_{WRITEBACK,ACCT_DIRTY} with a single flag")).
Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
include/linux/backing-dev.h | 4 +---
mm/memcontrol.c | 2 +-
mm/vmscan.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index 44df4fcef65c..6eb5b52cf105 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -193,9 +193,7 @@ static inline bool inode_cgwb_enabled(struct inode *inode)
{
struct backing_dev_info *bdi = inode_to_bdi(inode);
- return 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/mm/memcontrol.c b/mm/memcontrol.c
index 492e4b4e7574..d51f09a70bcd 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -418,7 +418,7 @@ struct cgroup_subsys_state *mem_cgroup_css_from_page(struct page *page)
memcg = page_memcg(page);
- if (!memcg || !cgroup_subsys_on_dfl(memory_cgrp_subsys))
+ if (!memcg || 0 /*!cgroup_subsys_on_dfl(memory_cgrp_subsys))*/)
memcg = root_mem_cgroup;
return &memcg->css;
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 41f05cf20599..f55e24e18874 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -447,7 +447,7 @@ static bool writeback_throttling_sane(struct scan_control *sc)
if (!cgroup_reclaim(sc))
return true;
#ifdef CONFIG_CGROUP_WRITEBACK
- if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
+ if (1/*cgroup_subsys_on_dfl(memory_cgrp_subsys)*/)
return true;
#endif
return false;
--
2.30.2
More information about the Devel
mailing list