All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] memcg: Add swappiness to cgroup2
@ 2019-12-25  5:36 Hui Zhu
  2019-12-25 14:05 ` Chris Down
  2019-12-31 23:16 ` Andrew Morton
  0 siblings, 2 replies; 8+ messages in thread
From: Hui Zhu @ 2019-12-25  5:36 UTC (permalink / raw)
  To: hannes, mhocko, vdavydov.dev, akpm, linux-kernel, cgroups, linux-mm
  Cc: Hui Zhu, Hui Zhu

Even if cgroup2 has swap.max, swappiness is still a very useful config.
This commit add swappiness to cgroup2.

Signed-off-by: Hui Zhu <teawaterz@linux.alibaba.com>
---
 mm/memcontrol.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c5b5f74..e966396 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -7143,6 +7143,11 @@ static struct cftype swap_files[] = {
 		.file_offset = offsetof(struct mem_cgroup, swap_events_file),
 		.seq_show = swap_events_show,
 	},
+	{
+		.name = "swappiness",
+		.read_u64 = mem_cgroup_swappiness_read,
+		.write_u64 = mem_cgroup_swappiness_write,
+	},
 	{ }	/* terminate */
 };
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-01-06 13:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25  5:36 [RFC] memcg: Add swappiness to cgroup2 Hui Zhu
2019-12-25 14:05 ` Chris Down
2019-12-26  6:56   ` teawater
2020-01-03  9:48     ` Michal Koutný
2020-01-06 13:10   ` Michal Hocko
2020-01-06 13:24     ` Chris Down
2019-12-31 23:16 ` Andrew Morton
2020-01-02  1:44   ` teawater

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.