+ memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch added to -mm tree

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

 



The patch titled
     Subject: memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()
has been added to the -mm tree.  Its filename is
     memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.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: Tejun Heo <tj@xxxxxxxxxx>
Subject: memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()

mem_cgroup_move_charge() invokes lru_add_drain_all() so that the pvec
pages can be moved too.  lru_add_drain_all() schedules and flushes work
items on system_wq which depends on being able to create new kworkers to
make forward progress.  Since 1ed1328792ff ("sched, cgroup: replace
signal_struct->group_rwsem with a global percpu_rwsem"), a new task can't
be created while in the cgroup migration path and the described
lru_add_drain_all() invocation can easily lead to a deadlock.

Charge moving is best-effort and whether the pvec pages are migrated or
not doesn't really matter.  Don't call it during charge moving. 
Eventually, we want to move the actual charge moving outside the migration
path.

Fixes: 1ed1328792ff ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem")
Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
Debugged-by: Petr Mladek <pmladek@xxxxxxxx>
Tested-by: Petr Mladek <pmladek@xxxxxxxx>
Reported-by: Cyril Hrubis <chrubis@xxxxxxx>
Reported-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Suggested-by: Michal Hocko <mhocko@xxxxxxxxxx>
Acked-by: Michal Hocko <mhocko@xxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>	[4.4+]
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memcontrol.c |    1 -
 1 file changed, 1 deletion(-)

diff -puN mm/memcontrol.c~memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge mm/memcontrol.c
--- a/mm/memcontrol.c~memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge
+++ a/mm/memcontrol.c
@@ -4859,7 +4859,6 @@ static void mem_cgroup_move_charge(struc
 		.mm = mm,
 	};
 
-	lru_add_drain_all();
 	/*
 	 * Signal lock_page_memcg() to take the memcg's move_lock
 	 * while we're moving its pages to another memcg. Then wait
_

Patches currently in -mm which might be from tj@xxxxxxxxxx are

memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch

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



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

  Powered by Linux