From: Michal Hocko <mhocko@suse.cz>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Vladimir Davydov <vdavydov@parallels.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] memcg: do not call reclaim if !__GFP_WAIT
Date: Fri, 29 May 2015 08:55:04 +0200 [thread overview]
Message-ID: <20150529065504.GA22728@dhcp22.suse.cz> (raw)
In-Reply-To: <20150528125934.198f57db4c5daf19dd15b184@linux-foundation.org>
On Thu 28-05-15 12:59:34, Andrew Morton wrote:
> On Thu, 28 May 2015 20:26:06 +0300 Vladimir Davydov <vdavydov@parallels.com> wrote:
>
> > 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.
>
> Why does it deadlock? try_to_free_mem_cgroup_pages() is passed the
> gfp_mask and should honour its __GFP_WAIT setting?
The only instance of __GFP_WAIT check in vmscan code is in zone_reclaim.
Page allocations and memcg reclaim avoids calling reclaim if __GFP_WAIT
is not set. Maybe we can move the check to do_try_to_free_pages?
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-05-29 6:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 17:26 [PATCH] memcg: do not call reclaim if !__GFP_WAIT Vladimir Davydov
2015-05-28 18:13 ` Michal Hocko
2015-05-28 19:59 ` Andrew Morton
2015-05-29 6:55 ` Michal Hocko [this message]
2015-06-01 16:42 ` Vlastimil Babka
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=20150529065504.GA22728@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@parallels.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).