Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp307238pjb; Tue, 28 Jul 2020 01:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaAJljvFtV5JZRb7agA0UuXstOmQFLADgJffupa4D1HrsX2rNEYU7Ak1KZaDbMe55KScIu X-Received: by 2002:a05:6402:128c:: with SMTP id w12mr25978717edv.65.1595925183817; Tue, 28 Jul 2020 01:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595925183; cv=none; d=google.com; s=arc-20160816; b=KpIBf5AQ2SPizjLMzjUyFDNGYnP9+5plezssa2cpDnKzLqNHama58EtXb+hi6LWh6e xl/yXHsqtogZl80dOuqvwWbK/9cSoG9RQ0Q2OO5SZekIwPAQPqZCJE02PRz5c3XVZ7YS 8j5jUnmHAumKMtQJJWKEQQoCcvEyHRNc2e83qVF1TLHXhfqHRibAEpnHrR/xdLX4l/k6 7YCJXTj5kT0yXkFuSHWLxyeIauiDiPEp7qZ/srknitct0GHG4RmqBLfzG3lfvJMkSzDM OEgXcIvv5UdWy1hnno0d6hQnywlYMQ+S/j51Iaw+AndN7XVCStp5/ecuB3B3r7rPSE5n XkmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vo3uSqUNCw3EJV661uv/DPWVK5A308HCJDBuipsP3fU=; b=V16o0OmFZ6NgGoZFjSx/4+JSbMfr+FWSJcEJSF4HDtm+tlGhwvZhplm1Trlf1kacNH YaXDj4oNCr+YjEMRZ7JnZ36H5jCL6W9yQKxf+yA3BuHe7vKXoJbu2Ymb8hNhqm1taDpv ZoVdKYKQptPqlg544DHGEMX4EerJpTKtvBObVK9V1wI/uTzrAAOIMpXSQVdLIL6LBOID hNXPcIsIcBoElyjUGx7m79rudEJyh64x6C5orudqJe+SSWzyHE16LcLPqIe0IvBx+3Yr eLTtf9zlz60Z1lNp47/gdHM7UeHSCiHVTFNODt0THi7VfRdrCxbuul0ayNHtN5r3fU8c RBew== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si7357836edp.149.2020.07.28.01.32.42; Tue, 28 Jul 2020 01:33:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbgG1Icb (ORCPT + 99 others); Tue, 28 Jul 2020 04:32:31 -0400 Received: from mx2.suse.de ([195.135.220.15]:47724 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbgG1Icb (ORCPT ); Tue, 28 Jul 2020 04:32:31 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C31BDB1EF; Tue, 28 Jul 2020 08:32:40 +0000 (UTC) From: =?UTF-8?q?Michal=20Koutn=C3=BD?= To: Alexey Dobriyan , Andrew Morton Cc: Matthew Wilcox , Yang Shi , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, =?UTF-8?q?Michal=20Koutn=C3=BD?= Subject: [PATCH] /proc/PID/smaps: Consistent whitespace output format Date: Tue, 28 Jul 2020 10:32:07 +0200 Message-Id: <20200728083207.17531-1-mkoutny@suse.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The keys in smaps output are padded to fixed width with spaces. All except for THPeligible that uses tabs (only since commit c06306696f83 ("mm: thp: fix false negative of shmem vma's THP eligibility")). Unify the output formatting to save time debugging some naïve parsers. (Part of the unification is also aligning FilePmdMapped with others.) Signed-off-by: Michal Koutný --- fs/proc/task_mmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index dbda4499a859..5066b0251ed8 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -786,7 +786,7 @@ static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss, SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree); SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp); SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp); - SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp); + SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp); SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb); seq_put_decimal_ull_width(m, " kB\nPrivate_Hugetlb: ", mss->private_hugetlb >> 10, 7); @@ -816,7 +816,7 @@ static int show_smap(struct seq_file *m, void *v) __show_smap(m, &mss, false); - seq_printf(m, "THPeligible: %d\n", + seq_printf(m, "THPeligible: %d\n", transparent_hugepage_enabled(vma)); if (arch_pkeys_enabled()) -- 2.27.0