From: Baoquan He <bhe@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Sonny Rao <sonnyrao@chromium.org>, Yu Zhao <yuzhao@google.com>,
linux-mm@kvack.org, David Rientjes <rientjes@google.com>
Subject: Re: ABI compatibility for /proc/zoneinfo
Date: Tue, 11 Aug 2020 12:07:21 +0800 [thread overview]
Message-ID: <20200811040721.GC10792@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20200810210159.eff53435c407fc8afc23e4d9@linux-foundation.org>
On 08/10/20 at 09:01pm, Andrew Morton wrote:
> On Mon, 10 Aug 2020 20:18:11 -0700 Sonny Rao <sonnyrao@chromium.org> wrote:
>
> > On Mon, Aug 10, 2020 at 7:37 PM Baoquan He <bhe@redhat.com> wrote:
> > >
> > > On 08/10/20 at 03:46pm, Yu Zhao wrote:
> > > > On Mon, Aug 10, 2020 at 02:24:03PM -0700, Sonny Rao wrote:
> > > > > We (Chrome OS) noticed recently one of our tests started failing on
> > > > > upstream kernels while parsing /proc/zoneinfo
> > > > > I think this patch is the cause:
> > > > >
> > > > > 26e7deadaae17 mm/vmstat.c: do not show lowmem reserve protection
> > > > > information of empty zone
> > > > >
> > > > > Maybe our parser was being overly strict by looking for the protection
> > > > > line, and it's not hard to fix but raised the question of whether there's
> > > > > any ABI compatibility guarantees about these files?
> > > >
> > > > According to Documentation/admin-guide/sysctl/vm.rst, "Each zone has
> > > > an array of protection pages". I'm not sure if this is the guarantee,
> > > > but the doc should reflect the actual format.
> > >
> > > The current code will list all zones in one memory node, even though
> > > that node only has one existing zone. E.g in below node 1,
> > > it only has NORMAL zone, but we will list zone DMA, DMA32, MOVABLE,
> > > DEVICE which are all empty zone, namely doesn't exist. So, each zone
> > > has an array of protection pages, it should not include the nonexistent
> > > zone. I thought nobody would check the protection line of an empty zone,
> > > seems I was wrong.
> >
> >
> > This particular parser was written as a state machine and that line
> > was a convenient thing to look for to mark the end of each zone.
> > AFAICT, there's no explicit documentation on the layout of that file
> > though.
>
> This only affects 5.8 and later, yes?
>
> 26e7deadaae17 didn't gain us much at all and we shouldn't break
> userspace unless it's super important. So I think it's best to revert,
> and to backport the revert to 5.8.x.
>
> Could someone (Baoquan He?) please send a patch with a suitable
> changelog, cc:stable, reported-by:, etc?
OK, I will post a patch to revert this.
prev parent reply other threads:[~2020-08-11 4:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 21:24 ABI compatibility for /proc/zoneinfo Sonny Rao
2020-08-10 21:46 ` Yu Zhao
2020-08-11 2:37 ` Baoquan He
2020-08-11 3:18 ` Sonny Rao
2020-08-11 3:58 ` Baoquan He
2020-08-11 4:01 ` Andrew Morton
2020-08-11 4:07 ` Baoquan He [this message]
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=20200811040721.GC10792@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=rientjes@google.com \
--cc=sonnyrao@chromium.org \
--cc=yuzhao@google.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 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.