memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()
Closes: #822084
This commit is contained in:
parent
9fa5f38a40
commit
d251b99807
|
@ -126,6 +126,8 @@ linux (4.5.2-1) UNRELEASED; urgency=medium
|
|||
Adrian Glaubitz (Closes: #815977)
|
||||
* linux-headers: Avoid mixed implicit and normal rules in Makefile, thanks to
|
||||
Thierry Herbelot (Closes: #822666)
|
||||
* memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()
|
||||
(Closes: #822084)
|
||||
|
||||
[ Aurelien Jarno ]
|
||||
* [mips*] Emulate unaligned LDXC1 and SDXC1 instructions.
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
From: Tejun Heo <tj@kernel.org>
|
||||
Subject: memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()
|
||||
Date: Thu, 21 Apr 2016 11:56:52 -0400
|
||||
Origin: http://permalink.gmane.org/gmane.linux.kernel.cgroups/15918
|
||||
Bug-Debian: https://bugs.debian.org/822084
|
||||
|
||||
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.
|
||||
|
||||
Signed-off-by: Tejun Heo <tj@kernel.org>
|
||||
Debugged-and-tested-by: Petr Mladek <pmladek@suse.com>
|
||||
Reported-by: Cyril Hrubis <chrubis@suse.cz>
|
||||
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
|
||||
Suggested-by: Michal Hocko <mhocko@kernel.org>
|
||||
Acked-by: Michal Hocko <mhocko@suse.com>
|
||||
Fixes: 1ed1328792ff ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem")
|
||||
Cc: stable@vger.kernel.org # v4.4+
|
||||
---
|
||||
mm/memcontrol.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
--- a/mm/memcontrol.c
|
||||
+++ b/mm/memcontrol.c
|
||||
@@ -4922,7 +4922,6 @@ static void mem_cgroup_move_charge(struc
|
||||
.mm = mm,
|
||||
};
|
||||
|
||||
- lru_add_drain_all();
|
||||
/*
|
||||
* Signal mem_cgroup_begin_page_stat() to take the memcg's
|
||||
* move_lock while we're moving its pages to another memcg.
|
|
@ -152,3 +152,4 @@ bugfix/all/atl2-disable-unimplemented-scatter-gather-feature.patch
|
|||
bugfix/all/module-invalidate-signatures-on-force-loaded-modules.patch
|
||||
bugfix/sparc/sparc-implement-and-wire-up-modalias_show-for-vio.patch
|
||||
bugfix/sparc/sparc-implement-and-wire-up-vio_hotplug-for-vio.patch
|
||||
bugfix/all/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch
|
||||
|
|
Loading…
Reference in New Issue