From: Michal Hocko <mhocko@kernel.org>
To: Chris Down <chris@chrisdown.name>
Cc: Qian Cai <cai@lca.pw>,
akpm@linux-foundation.org, hannes@cmpxchg.org, guro@fb.com,
linux-mm@kvack.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] mm/vmscan: fix an undefined behavior for zone id
Date: Mon, 11 Nov 2019 14:28:12 +0100 [thread overview]
Message-ID: <20191111132812.GK1396@dhcp22.suse.cz> (raw)
In-Reply-To: <20191111131427.GB891635@chrisdown.name>
On Mon 11-11-19 13:14:27, Chris Down wrote:
> Chris Down writes:
> > Ah, I just saw this in my local checkout and thought it was from my
> > changes, until I saw it's also on clean mmots checkout. Thanks for the
> > fixup!
>
> Also, does this mean we should change callers that may pass through
> zone_idx=MAX_NR_ZONES to become MAX_NR_ZONES-1 in a separate commit, then
> remove this interim fixup? I'm worried otherwise we might paper over real
> issues in future.
Yes, removing this special casing is reasonable. I am not sure
MAX_NR_ZONES - 1 is a better choice though. It is error prone and
zone_idx is the highest zone we should consider and MAX_NR_ZONES - 1
be ZONE_DEVICE if it is configured. But ZONE_DEVICE is really standing
outside of MM reclaim code AFAIK. It would be probably better to have
MAX_LRU_ZONE (equal to MOVABLE) and use it instead.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2019-11-11 13:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 20:44 [PATCH -next] mm/vmscan: fix an undefined behavior for zone id Qian Cai
2019-11-08 21:26 ` Qian Cai
2019-11-11 10:12 ` Michal Hocko
2019-11-11 13:05 ` Chris Down
2019-11-11 13:14 ` Chris Down
2019-11-11 13:28 ` Michal Hocko [this message]
2019-11-12 14:59 ` Johannes Weiner
2019-11-12 15:27 ` Michal Hocko
2019-11-12 16:16 ` Johannes Weiner
2019-11-12 16:24 ` Qian Cai
2019-11-12 16:31 ` Michal Hocko
2019-11-12 18:20 ` Johannes Weiner
2019-11-12 18:30 ` 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=20191111132812.GK1396@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cai@lca.pw \
--cc=cgroups@vger.kernel.org \
--cc=chris@chrisdown.name \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).