stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, David Rientjes <rientjes@google.com>,
	Michal Hocko <mhocko@suse.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Vladimir Davydov <vdavydov.dev@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 4.4 23/23] mm, memcg: do not retry precharge charges
Date: Tue, 31 Jan 2017 06:37:25 +0100	[thread overview]
Message-ID: <20170131053625.941595801@linuxfoundation.org> (raw)
In-Reply-To: <20170131053624.926643555@linuxfoundation.org>

4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

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
@@ -4496,9 +4496,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++;



  parent reply	other threads:[~2017-01-31  5:43 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31  5:37 [PATCH 4.4 00/23] 4.4.46-stable review Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 01/23] fbdev: color map copying bounds checking Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 02/23] tile/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 04/23] mm/mempolicy.c: do not put mempolicy before using its nodemask Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 05/23] sysctl: fix proc_doulongvec_ms_jiffies_minmax() Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 06/23] ISDN: eicon: silence misleading array-bounds warning Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 07/23] RDMA/cma: Fix unknown symbol when CONFIG_IPV6 is not enabled Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 08/23] s390/ptrace: Preserve previous registers for short regset write Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 10/23] can: ti_hecc: add missing prepare and unprepare of the clock Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 11/23] ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 12/23] ARC: [arcompact] handle unaligned access delay slot corner case Greg Kroah-Hartman
2017-02-10 12:51   ` Ben Hutchings
2017-02-10 13:19     ` Greg Kroah-Hartman
2017-02-10 13:26       ` Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 13/23] parisc: Dont use BITS_PER_LONG in userspace-exported swab.h header Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 14/23] nfs: Dont increment lock sequence ID after NFS4ERR_MOVED Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 15/23] NFSv4.0: always send mode in SETATTR after EXCLUSIVE4 Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 16/23] SUNRPC: cleanup ida information when removing sunrpc module Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 18/23] IB/ipoib: move back IB LL address into the hard header Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 19/23] IB/umem: Release pid in error and ODP flow Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 20/23] [media] s5k4ecgx: select CRC32 helper Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 21/23] pinctrl: broxton: Use correct PADCFGLOCK offset Greg Kroah-Hartman
2017-01-31  5:37 ` [PATCH 4.4 22/23] platform/x86: intel_mid_powerbtn: Set IRQ_ONESHOT Greg Kroah-Hartman
2017-01-31  5:37 ` Greg Kroah-Hartman [this message]
2017-01-31 17:23 ` [PATCH 4.4 00/23] 4.4.46-stable review Guenter Roeck
2017-01-31 22:06 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170131053625.941595801@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=rientjes@google.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vdavydov.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).