From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE47C4363A for ; Tue, 27 Oct 2020 06:14:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 52ADF20B1F for ; Tue, 27 Oct 2020 06:14:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="pFQh9AFz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52ADF20B1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 352116B005C; Tue, 27 Oct 2020 02:14:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DB796B005D; Tue, 27 Oct 2020 02:14:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1CA566B0062; Tue, 27 Oct 2020 02:14:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id E18F46B005C for ; Tue, 27 Oct 2020 02:14:44 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 843CF8249980 for ; Tue, 27 Oct 2020 06:14:44 +0000 (UTC) X-FDA: 77416691688.11.magic34_091398827279 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 67589180F8B80 for ; Tue, 27 Oct 2020 06:14:44 +0000 (UTC) X-HE-Tag: magic34_091398827279 X-Filterd-Recvd-Size: 3215 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Tue, 27 Oct 2020 06:14:43 +0000 (UTC) Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 24B6D207C3; Tue, 27 Oct 2020 06:14:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603779282; bh=XC6lIUJAS7He2j6C5xHkSyH+j5s9PGRJjwy1abKG4QQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pFQh9AFzoK3oLzRuL3gGxYVWbJkUhUOc5XrjgGXy5vZ0eBvp078SO0YsT1JSOSX2P /DLUc8ner4GROw3STlQ9Wa4+oElHG4Iq16hSXU8dppi6pbh/WzIqbfJ/n2GbT4LJsJ Hbe7KHDgUcnHRmaDg7RIIzaPgE1E6ljlEIIQatZU= Date: Tue, 27 Oct 2020 07:14:38 +0100 From: Greg KH To: Mike Kravetz Cc: Hui Su , rafael@kernel.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm/hugetable.c: align some prints Message-ID: <20201027061438.GA206502@kroah.com> References: <20201009162359.GA19686@rlk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: On Mon, Oct 26, 2020 at 05:23:43PM -0700, Mike Kravetz wrote: > On 10/9/20 9:23 AM, Hui Su wrote: > > in old code, it shows like: > > Node 0 ShmemHugePages: 0 kB > > Node 0 ShmemPmdMapped: 0 kB > > Node 0 FileHugePages: 0 kB > > Node 0 FilePmdMapped: 0 kB > > Node 0 HugePages_Total: 0 > > Node 0 HugePages_Free: 0 > > Node 0 HugePages_Surp: 0 > > > > which is not align. So we align it. > > > > Signed-off-by: Hui Su > > Apologies for the late reply. > > I assume you you just want to make the output look better. Correct? > > To be honest, I am not sure about the policy for changing the output > of sysfs files. My preference would be to not change the output. Why? > When the output is changed there is always the possibility that someone > may have written code that depends on the current format. It looks like > the output has been misaligned since the day the code was first written. > > This code was recently changed to use sysfs_emit_at() instead of > sprintf(). At that time Greg noted that this also violates the sysfs > rule of one value per file. So, it appears there may be a bigger issue > than alignment. > > Greg, > Is it OK to break up these sysfs files to be one value per file if they > contained multiple values from day 1 of their existence? I would prefer > not to touch them in case some is depending on current format. You should create multiple files, with a different name, and then remove this file. Any tool that uses sysfs should be able to handle a file going away, don't change the format of the data in the file, otherwise there's no way for anyone to know what is happening. thanks, greg k-h