+ mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: memcontrol: let v2 cgroups follow changes in system swappiness
has been added to the -mm tree.  Its filename is
     mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Johannes Weiner <hannes@xxxxxxxxxxx>
Subject: mm: memcontrol: let v2 cgroups follow changes in system swappiness

Cgroup2 currently doesn't have a per-cgroup swappiness setting.  We might
want to add one later - that's a different discussion - but until we do,
the cgroups should always follow the system setting.  Otherwise it will be
unchangeably set to whatever the ancestor inherited from the system
setting at the time of cgroup creation.

Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxx>
Cc: Vladimir Davydov <vdavydov@xxxxxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>	[4.5]
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/swap.h |    4 ++++
 1 file changed, 4 insertions(+)

diff -puN include/linux/swap.h~mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness include/linux/swap.h
--- a/include/linux/swap.h~mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness
+++ a/include/linux/swap.h
@@ -533,6 +533,10 @@ static inline swp_entry_t get_swap_page(
 #ifdef CONFIG_MEMCG
 static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg)
 {
+	/* Cgroup2 doesn't have per-cgroup swappiness */
+	if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
+		return vm_swappiness;
+
 	/* root ? */
 	if (mem_cgroup_disabled() || !memcg->css.parent)
 		return vm_swappiness;
_

Patches currently in -mm which might be from hannes@xxxxxxxxxxx are

mm-memcontrol-let-v2-cgroups-follow-changes-in-system-swappiness.patch
mm-filemap-only-do-access-activations-on-reads.patch

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]