From patchwork Tue Oct 30 17:48:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gushchin X-Patchwork-Id: 10661353 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C204313BF for ; Tue, 30 Oct 2018 17:49:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABEDF293CA for ; Tue, 30 Oct 2018 17:49:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C18E2A648; Tue, 30 Oct 2018 17:49:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11A6E293CA for ; Tue, 30 Oct 2018 17:49:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44D376B02AF; Tue, 30 Oct 2018 13:49:52 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 422F66B02B1; Tue, 30 Oct 2018 13:49:52 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E9CD6B02FB; Tue, 30 Oct 2018 13:49:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-yw1-f70.google.com (mail-yw1-f70.google.com [209.85.161.70]) by kanga.kvack.org (Postfix) with ESMTP id F0D936B02AF for ; Tue, 30 Oct 2018 13:49:51 -0400 (EDT) Received: by mail-yw1-f70.google.com with SMTP id c123-v6so9372464ywf.9 for ; Tue, 30 Oct 2018 10:49:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:dkim-signature:from:to:cc:subject :thread-topic:thread-index:date:message-id:accept-language :content-language:spamdiagnosticoutput:spamdiagnosticmetadata :content-transfer-encoding:mime-version; bh=98Hm8EWnpSumYGr9eAANGqQtfjgjJdPSFRLNI0aCMmE=; b=qYc3piZJeAIPr9UXItQ4z8b108NlFXnty1swV/rrmx4oTfM4BW4Vby8dsHAR6zckaF KCqHeL8dwBEwREKmig56HNKIPMORYxQfT0uaqGvgWkwHNZxfbhrrfkvX8O0etCHaX9Jv SFWDZ/+c1RVR44Y9QWl50fvcDYa+NbGYZ7k4RJ8tgRf+M5KoV/2eVVEcn3PZQF52NRI+ aa48nn3IA9puAey2uepXcUfB7uM+HC8pvO2T0NblyL2dMWh0a1hVBAlOnMMxarm8TI4G ZqCzGQODZLiDf3Q08hNumt3+ebse4TMZtuotxSFtwdsS7ekyiJHC66JtXVLB47jqpnLO vy0w== X-Gm-Message-State: AGRZ1gKAOAepFWd2BCeH8+Kbj3lsdNnHI76SDIonFc/4OKavMI55Ei5P M3P9fx9TgPRcCFkPnHSUgbyurdF+EeFd8bJlH72wGum2Qi5AsORpKXxVGNlk44Mn/tvzV6NEwTi z/KKxjxBu9QLdZisk2gaaN6jWIv5TQfwi85mS4wMdacq+x65eC3RWmZ1bA+ngE4W74Q== X-Received: by 2002:a25:8410:: with SMTP id u16-v6mr19701279ybk.182.1540921791588; Tue, 30 Oct 2018 10:49:51 -0700 (PDT) X-Google-Smtp-Source: AJdET5ds3AEPk8YyrVbUHVTU7XFihlUnAOxyu+mPvJRnFGcQ9anPllt9Q4gTYXx4LlviWtvkbDnp X-Received: by 2002:a25:8410:: with SMTP id u16-v6mr19701222ybk.182.1540921790764; Tue, 30 Oct 2018 10:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540921790; cv=none; d=google.com; s=arc-20160816; b=N5PCu3Gvok4qi6CHnkAxKz/YuhZtCbZ41UNKWCXtXRlkggo/k9hrFNxP1WPg8QAqo/ 9c1vIVPKKx7LBRF4R4gUh6SQTg0/RQBg+yAwjbpagjOh4SwMjqQIcXgHtT6SoDTq0cdC xI+Clv93d638/W/AwwCdOIBBVWBGvCfFQkiHD5aw6iqf5lVHwYxh4HmpmdhqiwatNxvC 42T0bgDGJ3cDfp6IxUR4Ut90G5aGPJNZyiUp4nNYaz9hZtQY10G2bQvQU9zUVGi4e37e yzrJ7V81TpedxDigaQo42EPUA/ZuNhojEnqvrFJX7s/L5UXaBLeNyj0XI+LN+bTZW92Y TvbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:accept-language:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=98Hm8EWnpSumYGr9eAANGqQtfjgjJdPSFRLNI0aCMmE=; b=Cbg7YgAbCXFOchIvg0pRKvlIDQdorKqDYh1F7GtARUtJRB7XgN3Rz6DpxXQn3pAov2 qesnBFI8DCKNHHELk06DLMMHm70eLno7MQP8dTKu7oGQrUyyoXMRYajJx08GHS4h29fc b4HrzK0frzAAownotB0hRgwT10s8G93VMR+TWu1ec3i5GyIvPlqU/6bnkmc39avSuZMq Cz0qXGFCZvdsfjZn5fQ4rMaPoEf9uB6CxaFNdpGPbCdNz8IZZX0A/oTZUUcG/g5pf470 +B0Awo1NnS9xHTIYb341jfYPebzL1NhT6RR0eetrQnuWPFx57QszBNaJ1iGWxnYXtbuk +i/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=Jp4nBzgO; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=EI3D++4Y; spf=pass (google.com: domain of prvs=4841ba4225=guro@fb.com designates 67.231.145.42 as permitted sender) smtp.mailfrom="prvs=4841ba4225=guro@fb.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com. [67.231.145.42]) by mx.google.com with ESMTPS id 1-v6si14154228ywk.98.2018.10.30.10.49.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Oct 2018 10:49:50 -0700 (PDT) Received-SPF: pass (google.com: domain of prvs=4841ba4225=guro@fb.com designates 67.231.145.42 as permitted sender) client-ip=67.231.145.42; Authentication-Results: mx.google.com; dkim=pass header.i=@fb.com header.s=facebook header.b=Jp4nBzgO; dkim=pass header.i=@fb.onmicrosoft.com header.s=selector1-fb-com header.b=EI3D++4Y; spf=pass (google.com: domain of prvs=4841ba4225=guro@fb.com designates 67.231.145.42 as permitted sender) smtp.mailfrom="prvs=4841ba4225=guro@fb.com"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=fb.com Received: from pps.filterd (m0044008.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9UHeb0d028481; Tue, 30 Oct 2018 10:49:47 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=facebook; bh=98Hm8EWnpSumYGr9eAANGqQtfjgjJdPSFRLNI0aCMmE=; b=Jp4nBzgOdklEowSR19dECg9T68rF6NKlVK+0D5bhQHDk9t4/x1SIuSTkmoG5+zZRUMHb cfpL/GnFEjI8xvmbfVOT8E3uHkobNj2NYNF8NGcGgOLvHJ3UQDaRXJwL6Pdps/ph20SE fEsIxEb9uCN2pSKVLrRrvR2K38TwPr/W4OU= Received: from maileast.thefacebook.com ([199.201.65.23]) by mx0a-00082601.pphosted.com with ESMTP id 2nerr40qr5-16 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 30 Oct 2018 10:49:47 -0700 Received: from frc-hub05.TheFacebook.com (2620:10d:c021:18::175) by frc-hub05.TheFacebook.com (2620:10d:c021:18::175) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.1.1531.3; Tue, 30 Oct 2018 10:48:28 -0700 Received: from FRC-CHUB06.TheFacebook.com (2620:10d:c021:18::25) by frc-hub05.TheFacebook.com (2620:10d:c021:18::175) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.1.1531.3 via Frontend Transport; Tue, 30 Oct 2018 10:48:28 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (192.168.183.28) by o365-in.thefacebook.com (192.168.177.26) with Microsoft SMTP Server (TLS) id 14.3.361.1; Tue, 30 Oct 2018 13:48:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=98Hm8EWnpSumYGr9eAANGqQtfjgjJdPSFRLNI0aCMmE=; b=EI3D++4YDlSts1VEIvsqOfG9+nOSRnX+4A92t4YjfPxLTDzZYmCokCGg1lp4r5BAxHkgBZarVk/nCpWQYvGpAmw/dt1cOURQ+ztj2150OroVAi1wiL9l4JpdnBsELfFJquPf8GPzqtr2CO4NJfGMKM3Xlz/EdkjTmC6Yvz/WKjA= Received: from BY2PR15MB0167.namprd15.prod.outlook.com (10.163.64.141) by BY2PR15MB0424.namprd15.prod.outlook.com (10.163.109.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1273.20; Tue, 30 Oct 2018 17:48:25 +0000 Received: from BY2PR15MB0167.namprd15.prod.outlook.com ([fe80::8e8:753:f746:ed14]) by BY2PR15MB0167.namprd15.prod.outlook.com ([fe80::8e8:753:f746:ed14%2]) with mapi id 15.20.1273.027; Tue, 30 Oct 2018 17:48:25 +0000 From: Roman Gushchin To: "stable@vger.kernel.org" CC: Yongqin Liu , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Kernel Team , "Roman Gushchin" , Vlastimil Babka , Andrew Morton Subject: [PATCH] mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo Thread-Topic: [PATCH] mm: hide incomplete nr_indirectly_reclaimable in /proc/zoneinfo Thread-Index: AQHUcHjBGiUxS89Jr0ajcl/UiAVc0g== Date: Tue, 30 Oct 2018 17:48:25 +0000 Message-ID: <20181030174649.16778-1-guro@fb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: MWHPR08CA0005.namprd08.prod.outlook.com (2603:10b6:301:5f::18) To BY2PR15MB0167.namprd15.prod.outlook.com (2a01:111:e400:58e0::13) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [2620:10d:c090:200::4:6ec5] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY2PR15MB0424;20:YEYJoxqWMtiAm7Jsuyta/K6Grv0CEDu0keckvOQN/2TwRsRjhJuNxnCA6lxlVXG71YDvRySDKaHOx9/2W6jciM8ClC6b02izh4N3j8zpXQz9q0yShEyimG1qo5wjQOTdJnd4eJ0/sLongrFS/rGtDwxTaQrNdeyt4JgyfzaACPc= x-ms-office365-filtering-correlation-id: 18788bc5-62ac-44e7-22ca-08d63e8fe3f0 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY2PR15MB0424; x-ms-traffictypediagnostic: BY2PR15MB0424: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(67672495146484); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(823302103)(3231382)(11241501184)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY2PR15MB0424;BCL:0;PCL:0;RULEID:;SRVR:BY2PR15MB0424; x-forefront-prvs: 08417837C5 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(366004)(346002)(376002)(136003)(39860400002)(396003)(199004)(189003)(71200400001)(2616005)(52116002)(478600001)(5660300001)(53936002)(71190400001)(68736007)(4326008)(105586002)(1857600001)(6436002)(316002)(386003)(106356001)(2900100001)(1076002)(2906002)(5640700003)(6116002)(305945005)(476003)(86362001)(102836004)(6916009)(1730700003)(54906003)(8936002)(81156014)(81166006)(97736004)(46003)(8676002)(6486002)(2501003)(486006)(36756003)(6512007)(186003)(2351001)(256004)(99286004)(7736002)(5250100002)(6506007)(14454004)(25786009)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR15MB0424;H:BY2PR15MB0167.namprd15.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: fb.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 7KKk2V2euTmaTRHsyfZwOmTAE/WgmMuWUm3+9eLVGWHzFvD46ekV4ilvIK6Q+O3vBYya9d5/4fB/RnsAEgPMnge+ivXwA7ksGCABAFf+6SQNJEOdgQ1yzxF2KuCrSXtAX+qVm0tFvb0I5H4k6hn7rRpYKDZFGLdjlwZAx9pKJpFdp7Y6LAC/9nFiozv1RgsGtdFIP0yc7miYFJloaPf2CIlbzQ6sWa4ATyKgzTJaHDXAslPdQrESuv0YaII5nL+wfk1e7zC1BbGus3YHLMCJJRAYQ/n/AyuNDQi1SAX123cBFlYLAHMAj0hfVoBbvFqJyO2mEh/sBBzPggf9rMnXfg4zsnjK06r6slfRkyLPNN4= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 18788bc5-62ac-44e7-22ca-08d63e8fe3f0 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Oct 2018 17:48:25.0599 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR15MB0424 X-OriginatorOrg: fb.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-10-30_11:,, signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe 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: X-Virus-Scanned: ClamAV using ClamSMTP Yongqin reported that /proc/zoneinfo format is broken in 4.14 due to commit 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat") Node 0, zone DMA per-node stats nr_inactive_anon 403 nr_active_anon 89123 nr_inactive_file 128887 nr_active_file 47377 nr_unevictable 2053 nr_slab_reclaimable 7510 nr_slab_unreclaimable 10775 nr_isolated_anon 0 nr_isolated_file 0 <...> nr_vmscan_write 0 nr_vmscan_immediate_reclaim 0 nr_dirtied 6022 nr_written 5985 74240 ^^^^^^^^^^ pages free 131656 The problem is caused by the nr_indirectly_reclaimable counter, which is hidden from the /proc/vmstat, but not from the /proc/zoneinfo. Let's fix this inconsistency and hide the counter from /proc/zoneinfo exactly as from /proc/vmstat. BTW, in 4.19+ the counter has been renamed and exported by the commit b29940c1abd7 ("mm: rename and change semantics of nr_indirectly_reclaimable_bytes"), so there is no such a problem anymore. Cc: # 4.14.x-4.18.x Fixes: 7aaf77272358 ("mm: don't show nr_indirectly_reclaimable in /proc/vmstat") Reported-by: Yongqin Liu Signed-off-by: Roman Gushchin Cc: Vlastimil Babka Cc: Andrew Morton Acked-by: Vlastimil Babka --- mm/vmstat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mm/vmstat.c b/mm/vmstat.c index 527ae727d547..6389e876c7a7 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1500,6 +1500,10 @@ static void zoneinfo_show_print(struct seq_file *m, pg_data_t *pgdat, if (is_zone_first_populated(pgdat, zone)) { seq_printf(m, "\n per-node stats"); for (i = 0; i < NR_VM_NODE_STAT_ITEMS; i++) { + /* Skip hidden vmstat items. */ + if (*vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + + NR_VM_NUMA_STAT_ITEMS] == '\0') + continue; seq_printf(m, "\n %-12s %lu", vmstat_text[i + NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS],