LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Michal Hocko <mhocko@kernel.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
cgroups@vger.kernel.org,
Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
Subject: Re: [PATCH] memcg: make it work on sparse non-0-node systems
Date: Mon, 29 Apr 2019 13:55:26 +0200 [thread overview]
Message-ID: <465a4b50-490c-7978-ecb8-d122b655f868@suse.cz> (raw)
In-Reply-To: <20190429112916.GI21837@dhcp22.suse.cz>
On 29. 04. 19, 13:30, Michal Hocko wrote:
> On Mon 29-04-19 12:59:39, Jiri Slaby wrote:
> [...]
>> 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;
>> + return !!lru->node[first_online_node].memcg_lrus;
>> }
>>
>> static inline struct list_lru_one *
>
> How come this doesn't blow up later - e.g. in memcg_destroy_list_lru
> path which does iterate over all existing nodes thus including the
> node 0.
If the node is not disabled (i.e. is N_POSSIBLE), lru->node is allocated
for that node too. It will also have memcg_lrus properly set.
If it is disabled, it will never be iterated.
Well, I could have used first_node. But I am not sure, if the first
POSSIBLE node is also ONLINE during boot?
thanks,
--
js
suse labs
next prev parent reply other threads:[~2019-04-29 11:55 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-29 8:16 memcg causes crashes in list_lru_add Jiri Slaby
2019-04-29 9:25 ` Jiri Slaby
2019-04-29 10:09 ` Jiri Slaby
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 [this message]
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-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=465a4b50-490c-7978-ecb8-d122b655f868@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=raghavendra.kt@linux.vnet.ibm.com \
--cc=vdavydov.dev@gmail.com \
--subject='Re: [PATCH] memcg: make it work on sparse non-0-node systems' \
/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
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).