From: Jiri Slaby <jslaby@suse.cz>
To: Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
cgroups@vger.kernel.org, mm <linux-mm@kvack.org>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: memcg causes crashes in list_lru_add
Date: Mon, 29 Apr 2019 12:09:53 +0200 [thread overview]
Message-ID: <359d98e6-044a-7686-8522-bdd2489e9456@suse.cz> (raw)
In-Reply-To: <2cbfb8dc-31f0-7b95-8a93-954edb859cd8@suse.cz>
On 29. 04. 19, 11:25, Jiri Slaby wrote:> memcg_update_all_list_lrus
should take care about resizing the array.
It should, but:
[ 0.058362] Number of physical nodes 2
[ 0.058366] Skipping disabled node 0
So this should be the real fix:
--- linux-5.0-stable1.orig/mm/list_lru.c
+++ linux-5.0-stable1/mm/list_lru.c
@@ -37,11 +37,12 @@ static int lru_shrinker_id(struct list_l
static inline bool list_lru_memcg_aware(struct list_lru *lru)
{
- /*
- * This needs node 0 to be always present, even
- * in the systems supporting sparse numa ids.
- */
- return !!lru->node[0].memcg_lrus;
+ int i;
+
+ for_each_online_node(i)
+ return !!lru->node[i].memcg_lrus;
+
+ return false;
}
static inline struct list_lru_one *
Opinions?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2019-04-29 10:09 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 8:16 Jiri Slaby
2019-04-29 9:25 ` Jiri Slaby
2019-04-29 10:09 ` Jiri Slaby [this message]
2019-04-29 10:40 ` Michal Hocko
2019-04-29 10:43 ` Michal Hocko
2019-04-29 10:59 ` [PATCH] memcg: make it work on sparse non-0-node systems Jiri Slaby
2019-04-29 11:30 ` Michal Hocko
2019-04-29 11:55 ` Jiri Slaby
2019-04-29 12:11 ` Jiri Slaby
2019-04-29 13:15 ` Michal Hocko
2019-05-09 7:21 ` Jiri Slaby
2019-05-09 12:25 ` Vladimir Davydov
2019-05-09 16:05 ` Shakeel Butt
2019-05-16 13:59 ` Michal Hocko
2019-05-17 4:48 ` Jiri Slaby
2019-05-17 8:00 ` Vladimir Davydov
2019-05-17 8:16 ` Jiri Slaby
2019-05-17 11:42 ` [PATCH v2] " Jiri Slaby
2019-05-17 12:13 ` Shakeel Butt
2019-05-17 12:27 ` Michal Hocko
2019-05-22 9:19 ` [PATCH -resend " Jiri Slaby
2019-05-29 13:14 ` Sasha Levin
2019-04-29 10:17 ` memcg causes crashes in list_lru_add Michal Hocko
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=359d98e6-044a-7686-8522-bdd2489e9456@suse.cz \
--to=jslaby@suse.cz \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=vdavydov.dev@gmail.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