Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1327989ybb; Wed, 25 Mar 2020 21:25:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvtrhXCeHXUO3HI5V5LVBv6KxmIqKUYs8lquLeqgMtSjbWgjQucw3SpRQJCF5St6C4UHGG5 X-Received: by 2002:aca:adc7:: with SMTP id w190mr608959oie.42.1585196744684; Wed, 25 Mar 2020 21:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585196744; cv=none; d=google.com; s=arc-20160816; b=qNa5faiFxq4JtQCK5LrvdYihpFbHmffVezdP2t7w0Ulbz4iLmfWu2jMyP3F0IetIWT GH4JJpLcSYO6AcqEmwRESpbWpSZe+Jip5EGW+yS+kfDt71bX2z+P3sBMTHadiJ/n/jRQ WhJrCruH3rBTO6BUWGZJ+2XXpGh3R6JMLv/mJiysMTjATNjzHA1unMIVaSTYXq4W0p1V bcH+7oS5humo0RKf7xNHomcMXQow3akApZ5jTOnFNc+KO54YZv8aIiY6Mk5+GBF5XnIu SeyXNsgMoUrzQhCgTtjAU+X5tjCzIx3HFeSfaq8G9kGCPu/ChY1K2kWaHM3/3GDPGqQq Yejw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vioVAj2SDDof3xcu8ILEexoPH5txbmXeAJS1vfwTwH8=; b=OZYuyACtnvrh0PJmnz6W3Tiov9GuIgEz0lSPye0Im2lEcBLw/u8OQpxP8rkRzDT9gd kQz4N53eBO2Ax4VllLTJDRiwrGznmi0+Vsxryu2TPqGiuKDQgYuwCbIXxUxCKywMsGtL L8hVwP3UQA9gww5nUV5cxCO6WRTlvzRiJVmxPpDThKq8qptpY02FBdEBadJEh9dFVrKj CUmlnlaZeG8avmW87F/QXsKdcYCrYtKdM6PP4sKYkrYgxFTHCBrZ6lcy5uti+hx0T5d1 Wta4WMrZQx30foLKREBrYkLCGxEhW8mTFMC7K+I+WbuHEXtHag62COP3kR1t7tJw2zqB UKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DRReHBWM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id u136si579390oif.197.2020.03.25.21.25.29; Wed, 25 Mar 2020 21:25:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DRReHBWM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726138AbgCZEZE (ORCPT + 99 others); Thu, 26 Mar 2020 00:25:04 -0400 Received: from us-smtp-delivery-74.mimecast.com ([63.128.21.74]:50294 "EHLO us-smtp-delivery-74.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725842AbgCZEZE (ORCPT ); Thu, 26 Mar 2020 00:25:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585196703; 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=vioVAj2SDDof3xcu8ILEexoPH5txbmXeAJS1vfwTwH8=; b=DRReHBWM1EC4LY1OqHujI5UC8K3nBBDURV071dl0Fx0kvz5+Atlf6nE9pXSRZGoNb+5V6z b2tdic2JPL8CMsOARYhr9HTSWyo4hGitLii0TD3n0i2akvzsYjRzTWjz3M4H27bbBL7hMp kToLLg0XO+HAoshtJ5bJLL7iT/D1e0I= 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-198-wR61I5RIPVC8kbUUnr1T7w-1; Thu, 26 Mar 2020 00:24:59 -0400 X-MC-Unique: wR61I5RIPVC8kbUUnr1T7w-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 AC3238017CC; Thu, 26 Mar 2020 04:24:57 +0000 (UTC) Received: from localhost (ovpn-12-117.pek2.redhat.com [10.72.12.117]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF1B85D9CD; Thu, 26 Mar 2020 04:24:56 +0000 (UTC) Date: Thu, 26 Mar 2020 12:24:54 +0800 From: Baoquan He To: David Rientjes Cc: Michal Hocko , linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, iamjoonsoo.kim@lge.com, hannes@cmpxchg.org, vbabka@suse.cz, mgorman@techsingularity.net Subject: Re: [PATCH 4/5] mm/vmstat.c: move the per-node stats to the front of /proc/zoneinfo Message-ID: <20200326042454.GD9942@MiWiFi-R3L-srv> References: <20200324142229.12028-1-bhe@redhat.com> <20200324142229.12028-5-bhe@redhat.com> <20200325055331.GB9942@MiWiFi-R3L-srv> <20200325085537.GZ19542@dhcp22.suse.cz> <20200325142315.GC9942@MiWiFi-R3L-srv> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 On 03/25/20 at 12:45pm, David Rientjes wrote: > On Wed, 25 Mar 2020, Baoquan He wrote: > > > > Even this can break existing parsers. Fixing that up is likely not hard > > > and existing parsers would be mostly debugging hacks here and there but > > > I do miss any actual justification except for you considering it more > > > sensible. I do not remember this would be a common pain point for people > > > parsing this file. If anything the overal structure of the file makes it > > > hard to parse and your patches do not really address that. We are likely > > > too late to make the output much more sensible TBH. > > > > > > That being said, I haven't looked more closely on your patches because I > > > do not have spare cycles for that. Your justification for touching the > > > code which seems to be working relatively well is quite weak IMHO, yet > > > it adds a non zero risk for breaking existing parsers. > > > > I would take the saying of non zero risk for breaking existing parsers. > > When considering this change, I thought about the possible risk. However, > > found out the per-node stats was added in 2016 which is not so late, and > > assume nobody will rely on the order of per-node stats embeded into a > > zone. But I have to admit any concern or worry of risk is worth being > > considerred carefully since /proc/zoneinfo is a classic interface. > > > > For context, we started parsing /proc/zoneinfo in initscripts to be able > to determine the order in which vm.lowmem_reserve_ratio needs to be set > and this required my kernel change from 2017: > > commit b2bd8598195f1b2a72130592125ac6b4218988a2 > Author: David Rientjes > Date: Wed May 3 14:52:59 2017 -0700 > > mm, vmstat: print non-populated zones in zoneinfo > > Otherwise, we found, it's much more difficult to determine how this array > should be structured. So at least we parse this file very carefully, I'm > not sure how much others do, but it seems like an unnecessary risk for > little reward. I'm happy to see it has been decided to drop this patch > and patch 5. OK, I see why it is in such a situation, the empty zones were not printed. I could still not get how vm.lowmem_reserve_ratio is set with /proc/zoneinfo in the old initscripts, do you see any risk if not filling and showing the ->lowmem_reserve[] of empty zone in patch 2 and 3? Thanks in advance.