stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mm, memcg: do not retry precharge charges" has been added to the 4.9-stable tree
@ 2017-01-30 13:52 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-30 13:52 UTC (permalink / raw)
  To: rientjes, akpm, gregkh, hannes, mhocko, torvalds, vdavydov.dev
  Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mm, memcg: do not retry precharge charges

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-memcg-do-not-retry-precharge-charges.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 3674534b775354516e5c148ea48f51d4d1909a78 Mon Sep 17 00:00:00 2001
From: David Rientjes <rientjes@google.com>
Date: Tue, 24 Jan 2017 15:18:10 -0800
Subject: mm, memcg: do not retry precharge charges

From: David Rientjes <rientjes@google.com>

commit 3674534b775354516e5c148ea48f51d4d1909a78 upstream.

When memory.move_charge_at_immigrate is enabled and precharges are
depleted during move, mem_cgroup_move_charge_pte_range() will attempt to
increase the size of the precharge.

Prevent precharges from ever looping by setting __GFP_NORETRY.  This was
probably the intention of the GFP_KERNEL & ~__GFP_NORETRY, which is
pointless as written.

Fixes: 0029e19ebf84 ("mm: memcontrol: remove explicit OOM parameter in charge path")
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1701130208510.69402@chino.kir.corp.google.com
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memcontrol.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -4360,9 +4360,9 @@ static int mem_cgroup_do_precharge(unsig
 		return ret;
 	}
 
-	/* Try charges one by one with reclaim */
+	/* Try charges one by one with reclaim, but do not retry */
 	while (count--) {
-		ret = try_charge(mc.to, GFP_KERNEL & ~__GFP_NORETRY, 1);
+		ret = try_charge(mc.to, GFP_KERNEL | __GFP_NORETRY, 1);
 		if (ret)
 			return ret;
 		mc.precharge++;


Patches currently in stable-queue which might be from rientjes@google.com are

queue-4.9/mm-memcg-do-not-retry-precharge-charges.patch
queue-4.9/mm-mempolicy.c-do-not-put-mempolicy-before-using-its-nodemask.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-30 13:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-30 13:52 Patch "mm, memcg: do not retry precharge charges" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).