From: Michal Hocko <mhocko@suse.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Roman Gushchin <roman.gushchin@linux.dev>,
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 18:06:39 +0100 [thread overview]
Message-ID: <ZaFxn7JC8FeR-Si0@tiehlicka> (raw)
In-Reply-To: <20240111192807.GA424308@cmpxchg.org>
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?
Other than that looks good to me.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2024-01-12 17:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 13:29 [PATCH] mm: memcontrol: don't throttle dying tasks on memory.high 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 [this message]
2024-01-12 17:10 ` Roman Gushchin
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=ZaFxn7JC8FeR-Si0@tiehlicka \
--to=mhocko@suse.com \
--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=muchun.song@linux.dev \
--cc=roman.gushchin@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 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.