From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E1C3C433E0 for ; Tue, 11 Aug 2020 04:07:34 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D37642075F for ; Tue, 11 Aug 2020 04:07:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OpxaIU9d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D37642075F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 335476B0003; Tue, 11 Aug 2020 00:07:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2E50B6B0005; Tue, 11 Aug 2020 00:07:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1D4456B0006; Tue, 11 Aug 2020 00:07:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0144.hostedemail.com [216.40.44.144]) by kanga.kvack.org (Postfix) with ESMTP id 051C96B0003 for ; Tue, 11 Aug 2020 00:07:33 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 915F38248D51 for ; Tue, 11 Aug 2020 04:07:32 +0000 (UTC) X-FDA: 77136953544.07.tiger14_40071ee26fdf Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 61F0B1803F9B3 for ; Tue, 11 Aug 2020 04:07:32 +0000 (UTC) X-HE-Tag: tiger14_40071ee26fdf X-Filterd-Recvd-Size: 4732 Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Aug 2020 04:07:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597118850; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=klC1GrZvOS/NiVEm8eqMh4quoWOvRaX6eFLRNP83grE=; b=OpxaIU9dqNHs0fpUtBlvQWqFj0gOQFDWiDYlLdhgejq4ztYXQ1vzzxHf2FkwgKXypUwuJ1 KQZeuV056cfgchrUB3u72LbovqrAKIbIqgW+M9CPeS+Yr3Zb/u1J+bD5/mDngW7JVfc3u3 Dl+oR9uQRvPz9f9MingaBO/jQ8LGDsw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-538-OUB5ZWJQP62H4fAC8S8Cmg-1; Tue, 11 Aug 2020 00:07:26 -0400 X-MC-Unique: OUB5ZWJQP62H4fAC8S8Cmg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C99BA1DE1; Tue, 11 Aug 2020 04:07:24 +0000 (UTC) Received: from localhost (ovpn-13-96.pek2.redhat.com [10.72.13.96]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A69010013C4; Tue, 11 Aug 2020 04:07:23 +0000 (UTC) Date: Tue, 11 Aug 2020 12:07:21 +0800 From: Baoquan He To: Andrew Morton Cc: Sonny Rao , Yu Zhao , linux-mm@kvack.org, David Rientjes Subject: Re: ABI compatibility for /proc/zoneinfo Message-ID: <20200811040721.GC10792@MiWiFi-R3L-srv> References: <20200810214614.GA1679980@google.com> <20200811023712.GB10792@MiWiFi-R3L-srv> <20200810210159.eff53435c407fc8afc23e4d9@linux-foundation.org> MIME-Version: 1.0 In-Reply-To: <20200810210159.eff53435c407fc8afc23e4d9@linux-foundation.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=bhe@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 61F0B1803F9B3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 08/10/20 at 09:01pm, Andrew Morton wrote: > On Mon, 10 Aug 2020 20:18:11 -0700 Sonny Rao wrote: > > > On Mon, Aug 10, 2020 at 7:37 PM Baoquan He 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.