+ mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent.patch added to -mm tree

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

 



The patch titled
     Subject: mm: swap: use mem_cgroup_is_root() instead of deferencing css->parent
has been added to the -mm tree.  Its filename is
     mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent.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: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Subject: mm: swap: use mem_cgroup_is_root() instead of deferencing css->parent

mem_cgroup_is_root() is the preferred API to check if memcg is root or
not.  Use it instead of deferencing css->parent.

Link: http://lkml.kernel.org/r/1547232913-118148-1-git-send-email-yang.shi@xxxxxxxxxxxxxxxxx
Signed-off-by: Yang Shi <yang.shi@xxxxxxxxxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Cc: Huang Ying <ying.huang@xxxxxxxxx>
Cc: Tim Chen <tim.c.chen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 include/linux/swap.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/swap.h~mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent
+++ a/include/linux/swap.h
@@ -625,7 +625,7 @@ static inline int mem_cgroup_swappiness(
 		return vm_swappiness;
 
 	/* root ? */
-	if (mem_cgroup_disabled() || !memcg->css.parent)
+	if (mem_cgroup_disabled() || mem_cgroup_is_root(memcg))
 		return vm_swappiness;
 
 	return memcg->swappiness;
_

Patches currently in -mm which might be from yang.shi@xxxxxxxxxxxxxxxxx are

mm-swap-check-if-swap-backing-device-is-congested-or-not.patch
mm-swap-add-comment-for-swap_vma_readahead.patch
mm-swap-use-mem_cgroup_is_root-instead-of-deferencing-css-parent.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