From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751574AbdBXRIx (ORCPT ); Fri, 24 Feb 2017 12:08:53 -0500 Received: from mga11.intel.com ([192.55.52.93]:18575 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbdBXRIg (ORCPT ); Fri, 24 Feb 2017 12:08:36 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,201,1484035200"; d="scan'208";a="1101930172" Subject: Re: [PATCH V4 6/6] proc: show MADV_FREE pages info in smaps To: Shaohua Li , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <7f22d33b2f388ce33448faa75be75f9a52d57052.1487788131.git.shli@fb.com> Cc: Kernel-team@fb.com, mhocko@suse.com, minchan@kernel.org, hughd@google.com, hannes@cmpxchg.org, riel@redhat.com, mgorman@techsingularity.net, akpm@linux-foundation.org From: Dave Hansen Message-ID: Date: Fri, 24 Feb 2017 09:08:30 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <7f22d33b2f388ce33448faa75be75f9a52d57052.1487788131.git.shli@fb.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/22/2017 10:50 AM, Shaohua Li wrote: > @@ -770,6 +774,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid) > "Private_Dirty: %8lu kB\n" > "Referenced: %8lu kB\n" > "Anonymous: %8lu kB\n" > + "LazyFree: %8lu kB\n" > "AnonHugePages: %8lu kB\n" > "ShmemPmdMapped: %8lu kB\n" > "Shared_Hugetlb: %8lu kB\n" I've been as guily of this in the past as anyone, but are we just going to keep adding fields to smaps forever? For the vast, vast, majority of folks, this will simply waste the 21 bytes * nr_vmas that it costs us to print "LazyFree: 0 kB\n" over and over. Should we maybe start a habit of not printing an entry when it's "0 kB"?