From: Shakeel Butt <shakeelb@google.com>
To: Roman Gushchin <guro@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.com>,
Chris Down <chris@chrisdown.name>,
Andrew Morton <akpm@linux-foundation.org>,
Cgroups <cgroups@vger.kernel.org>, Linux MM <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] memcg: unify force charging conditions
Date: Thu, 10 Feb 2022 14:25:01 -0800 [thread overview]
Message-ID: <CALvZod5FBEHzNcXD-Wo5BPmMxu+Kf-ZA8s6N9EmD6TeFocs3_w@mail.gmail.com> (raw)
In-Reply-To: <YgVvgCbbTrDPb5tT@carbon.dhcp.thefacebook.com>
On Thu, Feb 10, 2022 at 12:03 PM Roman Gushchin <guro@fb.com> wrote:
>
> On Thu, Feb 10, 2022 at 12:14:35AM -0800, Shakeel Butt wrote:
> > Currently the kernel force charges the allocations which have __GFP_HIGH
> > flag without triggering the memory reclaim. __GFP_HIGH indicates that
> > the caller is high priority and since commit 869712fd3de5 ("mm:
> > memcontrol: fix network errors from failing __GFP_ATOMIC charges") the
> > kernel let such allocations do force charging. Please note that
> > __GFP_ATOMIC has been replaced by __GFP_HIGH.
> >
> > __GFP_HIGH does not tell if the caller can block or can trigger reclaim.
> > There are separate checks to determine that. So, there is no need to
> > skip reclaim for __GFP_HIGH allocations. So, handle __GFP_HIGH together
> > with __GFP_NOFAIL which also does force charging.
>
> This sounds very reasonable. But shouldn't we check if __GFP_DIRECT_RECLAIM
> is set and bail out otherwise?
>
We already have a gfpflags_allow_blocking() check which checks for
__GFP_DIRECT_RECLAIM.
next prev parent reply other threads:[~2022-02-10 22:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 8:14 [PATCH 0/4] memcg: robust enforcement of memory.high Shakeel Butt
2022-02-10 8:14 ` [PATCH 1/4] memcg: refactor mem_cgroup_oom Shakeel Butt
2022-02-10 19:52 ` Roman Gushchin
2022-02-10 22:23 ` Shakeel Butt
2022-02-10 8:14 ` [PATCH 2/4] memcg: unify force charging conditions Shakeel Butt
2022-02-10 20:03 ` Roman Gushchin
2022-02-10 22:25 ` Shakeel Butt [this message]
2022-02-10 23:15 ` Roman Gushchin
2022-02-10 8:14 ` [PATCH 3/4] selftests: memcg: test high limit for single entry allocation Shakeel Butt
2022-02-10 8:14 ` [PATCH 4/4] memcg: synchronously enforce memory.high Shakeel Butt
2022-02-10 20:15 ` Roman Gushchin
2022-02-10 22:22 ` Shakeel Butt
2022-02-10 23:29 ` Roman Gushchin
2022-02-10 23:53 ` Shakeel Butt
2022-02-11 2:44 ` Roman Gushchin
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=CALvZod5FBEHzNcXD-Wo5BPmMxu+Kf-ZA8s6N9EmD6TeFocs3_w@mail.gmail.com \
--to=shakeelb@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.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).