Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp222510pxa; Tue, 11 Aug 2020 00:55:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/zmfWi0XDbTBCy/Ibm/pXLPtvCkBz6d0/CqhYKUbNrDvHkdVpLUtZTp5TlOd6cMRvT6DS X-Received: by 2002:a17:906:aad2:: with SMTP id kt18mr26024107ejb.537.1597132521998; Tue, 11 Aug 2020 00:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597132521; cv=none; d=google.com; s=arc-20160816; b=szT9p7oO/BWMWNDGzTqnqbaVdfNK71UIrex8j55X3FvCGFJBRq2y7mOIJa6YFdGsK1 V/H9ozwklmSTpRFwdU8SFXUM4VQ797fJPtHRNWLzBhGAkM1zpiC2inSumhx9B7qbVVdq eX77Gi66fB71zUAzv/PGfYs89MGscoHeVlEDs4yjAq8AJZV3OyffG6dWl17fQ6T+Zsmg beUf0qDpyAnwwLxJOlKD43MKhuZfA/QUqjmDl6QweUMCXtpVmU2S6TzIfVn6tPGENjnn Jxvk229vR3Fn+3eHOdJR+q4IF8JuFwTtmm12meh/f1cjcGeenH1V1T3yLdnyGLXqE/2O xdgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=2TA1qUQTA106lCApZkYqx4DJzgphPi5RyaFz/tNYgI8=; b=zZSn1F+/ltEesoIvk3yzBY3nFcdrGWLm7J5GiTsHlndBiXiI38QwVcHkTOj8CUw/Kp wWN/xlEpRgRTLVNvAdzNUmY61ZvogQVEH5f0aQ3jp5l23Ajg/pTzMvOK+wKZ/4pBVz/H oOOVHvb1aUw1jxCi0LwQ4MZywsuyCD1/8uczGFUSFMSG/9bnM6yhYezZz/JSsTOl7qhk Ajg1WUguRDV6wGw2vboJ2SKs6p37oIRMx+ZPwsGHjuJfe/1MJ02j3uZZW4r/q/AGk1Fc KdyMPiUqgU/VvNRiaxS5Pvrh4tw+f82JdLD4/i9FMvrmoe6PiU5C6U94EuS7/2fxQ9KJ 5HHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLa7yMoF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d11si12078788edr.595.2020.08.11.00.54.58; Tue, 11 Aug 2020 00:55:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=NLa7yMoF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728076AbgHKHyY (ORCPT + 99 others); Tue, 11 Aug 2020 03:54:24 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:58167 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726397AbgHKHyY (ORCPT ); Tue, 11 Aug 2020 03:54:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597132462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc; bh=2TA1qUQTA106lCApZkYqx4DJzgphPi5RyaFz/tNYgI8=; b=NLa7yMoF3GcVBE+sKncQaMdMq1rl2q89gJNdYyaWSh0neF5DdQhpn5jkxepe72DosSX5XU YmLoHVAJCzvdRORr1b9MrJ+T7vGSLe/jI+qYHjDtGIvXV+B5/+nqcZV/8B1PUkdubnk/Nn qeMtGzn2FnoywfHXxK/7Z2tLlxG9aUQ= 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-382-fTfFC_9GOue5LbbqOdFu8Q-1; Tue, 11 Aug 2020 03:54:21 -0400 X-MC-Unique: fTfFC_9GOue5LbbqOdFu8Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E62B7E919; Tue, 11 Aug 2020 07:54:19 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-13-96.pek2.redhat.com [10.72.13.96]) by smtp.corp.redhat.com (Postfix) with ESMTP id E34855D9DD; Tue, 11 Aug 2020 07:54:15 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, akpm@linux-foundation.org, sonnyrao@chromium.org, yuzhao@google.com, rientjes@google.com, bhe@redhat.com Subject: [PATCH] Revert "mm/vmstat.c: do not show lowmem reserve protection information of empty zone" Date: Tue, 11 Aug 2020 15:54:12 +0800 Message-Id: <20200811075412.12872-1-bhe@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This reverts commit 26e7deadaae1755faf1f6d1a68988c4b8348df59. Sonny reported that one of their tests started failing on the latest kernel on their Chrome OS platform. The root cause is that the above commit removed the protection line of empty zone, while the parser used in the test relies on the protection line to mark the end of each zone. Let's revert it to avoid breaking userspace testing or applications. Cc: # 5.8.x Reported-by: Sonny Rao Signed-off-by: Baoquan He --- mm/vmstat.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mm/vmstat.c b/mm/vmstat.c index 5b35c0eb8c57..62376dc66ec0 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1644,12 +1644,6 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, zone->present_pages, zone_managed_pages(zone)); - /* If unpopulated, no other information is useful */ - if (!populated_zone(zone)) { - seq_putc(m, '\n'); - return; - } - seq_printf(m, "\n protection: (%ld", zone->lowmem_reserve[0]); @@ -1657,6 +1651,12 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, seq_printf(m, ", %ld", zone->lowmem_reserve[i]); seq_putc(m, ')'); + /* If unpopulated, no other information is useful */ + if (!populated_zone(zone)) { + seq_putc(m, '\n'); + return; + } + for (i = 0; i < NR_VM_ZONE_STAT_ITEMS; i++) seq_printf(m, "\n %-12s %lu", zone_stat_name(i), zone_page_state(zone, i)); -- 2.17.2