From: Chris Down <chris-6Bi1550iOqEnzZ6mRAm98g@public.gmane.org>
To: Naresh Kamboju <naresh.kamboju-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: Yafang Shao <laoar.shao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Andrew Morton
<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
Roman Gushchin <guro-b10kYP2dOMg@public.gmane.org>,
linux-mm <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
lkft-triage-cunTk1MwBs8s++Sfvej+rw@public.gmane.org
Subject: Re: [PATCH v3 2/2] mm, memcg: Decouple e{low,min} state mutations from protection checks
Date: Fri, 22 May 2020 12:45:44 +0100 [thread overview]
Message-ID: <20200522114544.GA1112005@chrisdown.name> (raw)
In-Reply-To: <CA+G9fYseWc_7yq0M5Onju_HxbFid6DbuuaEFf-KUpqfxdF-QTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Naresh Kamboju writes:
>This patch is causing oom-killer while running mkfs -t ext4 on i386 kernel
>running on x86_64 machine version linux-next 5.7.0-rc6-next-20200521.
I think I see what's wrong here -- if we bail out early, memory.e{min,low}
might be uninitialised.
Does this patch fix it, by any chance?
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d3b23c57bed4..aa902b9cbb79 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5046,6 +5046,9 @@ mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
memory_cgrp_subsys.broken_hierarchy = true;
}
+ memcg->memory.emin = 0;
+ memcg->memory.elow = 0;
+
/* The following stuff does not apply to the root */
if (!parent) {
#ifdef CONFIG_MEMCG_KMEM
--
2.26.2
next prev parent reply other threads:[~2020-05-22 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-05 8:41 [PATCH v3 0/2] mm: memcontrol: memory.{low,min} reclaim fix & cleanup Yafang Shao
2020-05-05 8:41 ` [PATCH v3 1/2] mm, memcg: Avoid stale protection values when cgroup is above protection Yafang Shao
[not found] ` <20200505084127.12923-1-laoar.shao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-05-05 8:41 ` [PATCH v3 2/2] mm, memcg: Decouple e{low,min} state mutations from protection checks Yafang Shao
[not found] ` <20200505084127.12923-3-laoar.shao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-05-22 11:01 ` Naresh Kamboju
[not found] ` <CA+G9fYseWc_7yq0M5Onju_HxbFid6DbuuaEFf-KUpqfxdF-QTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-05-22 11:45 ` Chris Down [this message]
2020-05-22 15:41 ` Naresh Kamboju
2020-05-22 12:18 ` Yafang Shao
2020-05-22 15:52 ` Naresh Kamboju
[not found] ` <CA+G9fYtmpjunUetTmf2yquB1rwZA+nnWOiueWbAMx483c0wUvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-05-22 15:59 ` Yafang Shao
[not found] ` <CALOAHbCdXrU1AeLd4pWubutuG6HP4xKvxRkXeOv=sd_MMW58rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-05-22 16:06 ` Chris Down
[not found] ` <20200522160626.GB1112005-6Bi1550iOqEnzZ6mRAm98g@public.gmane.org>
2020-05-22 16:07 ` Chris Down
[not found] ` <20200522160709.GC1112005-6Bi1550iOqEnzZ6mRAm98g@public.gmane.org>
2020-05-22 16:27 ` Yafang Shao
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=20200522114544.GA1112005@chrisdown.name \
--to=chris-6bi1550ioqenzz6mram98g@public.gmane.org \
--cc=akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=guro-b10kYP2dOMg@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=laoar.shao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org \
--cc=lkft-triage-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
--cc=mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=naresh.kamboju-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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