All of lore.kernel.org
 help / color / mirror / Atom feed
* + memcg-do-not-call-reclaim-if-__gfp_wait.patch added to -mm tree
@ 2015-05-28 19:56 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2015-05-28 19:56 UTC (permalink / raw)
  To: vdavydov, hannes, mhocko, mm-commits


The patch titled
     Subject: memcg: do not call reclaim if !__GFP_WAIT
has been added to the -mm tree.  Its filename is
     memcg-do-not-call-reclaim-if-__gfp_wait.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/memcg-do-not-call-reclaim-if-__gfp_wait.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/memcg-do-not-call-reclaim-if-__gfp_wait.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: Vladimir Davydov <vdavydov@parallels.com>
Subject: memcg: do not call reclaim if !__GFP_WAIT

When trimming memcg consumption excess (see memory.high), we call
try_to_free_mem_cgroup_pages without checking if we are allowed to sleep
in the current context, which can result in a deadlock.  Fix this.

Fixes: 241994ed8649 ("mm: memcontrol: default hierarchy interface for memory")
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

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

diff -puN mm/memcontrol.c~memcg-do-not-call-reclaim-if-__gfp_wait mm/memcontrol.c
--- a/mm/memcontrol.c~memcg-do-not-call-reclaim-if-__gfp_wait
+++ a/mm/memcontrol.c
@@ -2323,6 +2323,8 @@ done_restock:
 	css_get_many(&memcg->css, batch);
 	if (batch > nr_pages)
 		refill_stock(memcg, batch - nr_pages);
+	if (!(gfp_mask & __GFP_WAIT))
+		goto done;
 	/*
 	 * If the hierarchy is above the normal consumption range,
 	 * make the charging task trim their excess contribution.
_

Patches currently in -mm which might be from vdavydov@parallels.com are

memcg-do-not-call-reclaim-if-__gfp_wait.patch
rmap-fix-theoretical-race-between-do_wp_page-and-shrink_active_list.patch
rmap-fix-theoretical-race-between-do_wp_page-and-shrink_active_list-fix.patch
rmap-fix-theoretical-race-between-do_wp_page-and-shrink_active_list-fix-fix.patch
mm-vmscan-fix-the-page-state-calculation-in-too_many_isolated.patch
linux-next.patch


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

only message in thread, other threads:[~2015-05-28 19:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-28 19:56 + memcg-do-not-call-reclaim-if-__gfp_wait.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.