diff options
author | Baolin Wang <baolin.wang@linux.alibaba.com> | 2021-09-02 14:55:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-09-03 09:58:13 -0700 |
commit | 37bc3cb9bbef86d1ddbbc789e55b588c8a2cac26 (patch) | |
tree | fb84926d1f7ae1b6f6297b71e923e9cab0c6dfca /mm/memcontrol.c | |
parent | 55a68c823951855f3ec313fdb85100db84284505 (diff) | |
download | linux-stable-37bc3cb9bbef86d1ddbbc789e55b588c8a2cac26.tar.gz linux-stable-37bc3cb9bbef86d1ddbbc789e55b588c8a2cac26.tar.bz2 linux-stable-37bc3cb9bbef86d1ddbbc789e55b588c8a2cac26.zip |
mm: memcontrol: set the correct memcg swappiness restriction
Since commit c843966c556d ("mm: allow swappiness that prefers reclaiming
anon over the file workingset") has expended the swappiness value to make
swap to be preferred in some systems. We should also change the memcg
swappiness restriction to allow memcg swap-preferred.
Link: https://lkml.kernel.org/r/d77469b90c45c49953ccbc51e54a1d465bc18f70.1627626255.git.baolin.wang@linux.alibaba.com
Fixes: c843966c556d ("mm: allow swappiness that prefers reclaiming anon over the file workingset")
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index b09f2639f28b..80840e026c2f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -4062,7 +4062,7 @@ static int mem_cgroup_swappiness_write(struct cgroup_subsys_state *css, { struct mem_cgroup *memcg = mem_cgroup_from_css(css); - if (val > 100) + if (val > 200) return -EINVAL; if (!mem_cgroup_is_root(memcg)) |