Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f238ebef authored by Kishore Srivenkata Ganesh Bolisetty's avatar Kishore Srivenkata Ganesh Bolisetty Committed by Gerrit - the friendly Code Review server
Browse files

mm: memcontrol: allow swappiness above 100



Allow swappiness > 100, to prefer swapping over file reclaim.
This is beneficial for use cases with fast swap devices like zram.
Limit the swappiness to <= 200 to avoid an unsigned underflow in
shrink_lruvec, and restrict to non-root cgroups.

CRs-Fixed: 988758
Change-Id: I4212590a6fad6fdbeb6664e42aa10f7ec1ce961d
Signed-off-by: default avatarKishore Srivenkata Ganesh Bolisetty <bsrivenk@codeaurora.org>
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 9d7c1ba0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4483,7 +4483,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) || ((val > 100) && !css->parent))
		return -EINVAL;

	if (css->parent)