+ mm-proportional-memorylowmin-reclaim-fix.patch added to -mm tree

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

 



The patch titled
     Subject: mm, memcg: Handle cgroup_disable=memory when getting memcg protection
has been added to the -mm tree.  Its filename is
     mm-proportional-memorylowmin-reclaim-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-proportional-memorylowmin-reclaim-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-proportional-memorylowmin-reclaim-fix.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/process/submit-checklist.rst when testing your code ***

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

------------------------------------------------------
From: Chris Down <chris@xxxxxxxxxxxxxx>
Subject: mm, memcg: Handle cgroup_disable=memory when getting memcg protection

memcg is NULL if we have CONFIG_MEMCG set, but cgroup_disable=memory on
the kernel command line.

Link: http://lkml.kernel.org/r/20190201045711.GA18302@xxxxxxxxxxxxxx
Fixes: 8a907cdf0177ab40 ("mm, memcg: proportional memory.{low,min} reclaim")
Reported-by: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Chris Down <chris@xxxxxxxxxxxxxx>
Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/memcontrol.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/include/linux/memcontrol.h~mm-proportional-memorylowmin-reclaim-fix
+++ a/include/linux/memcontrol.h
@@ -335,6 +335,9 @@ static inline bool mem_cgroup_disabled(v
 
 static inline unsigned long mem_cgroup_protection(struct mem_cgroup *memcg)
 {
+	if (mem_cgroup_disabled())
+		return 0;
+
 	return max(READ_ONCE(memcg->memory.emin), READ_ONCE(memcg->memory.elow));
 }
 
_

Patches currently in -mm which might be from chris@xxxxxxxxxxxxxx are

mm-create-mem_cgroup_from_seq.patch
mm-extract-memcg-maxable-seq_file-logic-to-seq_show_memcg_tunable.patch
mm-proportional-memorylowmin-reclaim.patch
mm-proportional-memorylowmin-reclaim-fix.patch
mm-memcontrol-expose-thp-events-on-a-per-memcg-basis.patch
mm-memcontrol-expose-thp-events-on-a-per-memcg-basis-fix-2.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux