From: Roman Gushchin <roman.gushchin@linux.dev>
To: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>, Tejun Heo <tj@kernel.org>,
Dan Schatzberg <schatzberg.dan@gmail.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: memcontrol: don't throttle dying tasks on memory.high
Date: Fri, 12 Jan 2024 09:10:33 -0800 [thread overview]
Message-ID: <ZaFyiTFC-ped0IdA@P9FQF9L96D.corp.robot.car> (raw)
In-Reply-To: <ZaFxn7JC8FeR-Si0@tiehlicka>
On Fri, Jan 12, 2024 at 06:06:39PM +0100, Michal Hocko wrote:
> On Thu 11-01-24 14:28:07, Johannes Weiner wrote:
> [...]
> > @@ -2867,11 +2882,17 @@ static int try_charge_memcg(struct mem_cgroup *memcg, gfp_t gfp_mask,
> > }
> > } while ((memcg = parent_mem_cgroup(memcg)));
> >
> > + /*
> > + * Reclaim is set up above to be called from the userland
> > + * return path. But also attempt synchronous reclaim to avoid
> > + * excessive overrun while the task is still inside the
> > + * kernel. If this is successful, the return path will see it
> > + * when it rechecks the overage and simply bail out.
> > + */
> > if (current->memcg_nr_pages_over_high > MEMCG_CHARGE_BATCH &&
> > !(current->flags & PF_MEMALLOC) &&
> > - gfpflags_allow_blocking(gfp_mask)) {
> > + gfpflags_allow_blocking(gfp_mask))
> > mem_cgroup_handle_over_high(gfp_mask);
>
> Have you lost the check for the dying task here?
It was moved into mem_cgroup_handle_over_high()'s body.
next prev parent reply other threads:[~2024-01-12 17:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 13:29 Johannes Weiner
2024-01-11 13:55 ` Yosry Ahmed
2024-01-11 16:50 ` Shakeel Butt
2024-01-11 17:59 ` Roman Gushchin
2024-01-11 19:28 ` Johannes Weiner
2024-01-11 19:38 ` Roman Gushchin
2024-01-11 19:49 ` Johannes Weiner
2024-01-12 17:06 ` Michal Hocko
2024-01-12 17:10 ` Roman Gushchin [this message]
2024-01-12 17:23 ` Michal Hocko
2024-01-12 19:04 ` Shakeel Butt
2024-01-12 20:59 ` Roman Gushchin
2024-01-12 21:27 ` Shakeel Butt
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=ZaFyiTFC-ped0IdA@P9FQF9L96D.corp.robot.car \
--to=roman.gushchin@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=schatzberg.dan@gmail.com \
--cc=shakeelb@google.com \
--cc=tj@kernel.org \
/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