[linux] 02/07: memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Apr 28 14:36:23 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch sid
in repository linux.

commit d251b99807aa112fa3e5b38f747cfe34fb97b82f
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Apr 28 15:27:24 2016 +0200

    memcg: remove lru_add_drain_all() invocation from mem_cgroup_move_charge()
    
    Closes: #822084
---
 debian/changelog                                   |  2 ++
 ...ll-invocation-from-mem_cgroup_move_charge.patch | 42 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 45 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 3e5e22f..0e6613d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
diff --git a/debian/patches/bugfix/all/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch b/debian/patches/bugfix/all/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch
new file mode 100644
index 0000000..c0b8946
--- /dev/null
+++ b/debian/patches/bugfix/all/memcg-remove-lru_add_drain_all-invocation-from-mem_cgroup_move_charge.patch
@@ -0,0 +1,42 @@
+From: Tejun Heo <tj at 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 at kernel.org>
+Debugged-and-tested-by: Petr Mladek <pmladek at suse.com>
+Reported-by: Cyril Hrubis <chrubis at suse.cz>
+Reported-by: Johannes Weiner <hannes at cmpxchg.org>
+Suggested-by: Michal Hocko <mhocko at kernel.org>
+Acked-by: Michal Hocko <mhocko at suse.com>
+Fixes: 1ed1328792ff ("sched, cgroup: replace signal_struct->group_rwsem with a global percpu_rwsem")
+Cc: stable at 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.
diff --git a/debian/patches/series b/debian/patches/series
index ab10005..5bd00ef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list