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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19FA7C77B7E for ; Tue, 2 May 2023 10:08:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 61A41900004; Tue, 2 May 2023 06:08:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A36F900002; Tue, 2 May 2023 06:08:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 46B3E900004; Tue, 2 May 2023 06:08:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 333D1900002 for ; Tue, 2 May 2023 06:08:35 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A6E5C160C8C for ; Tue, 2 May 2023 10:08:18 +0000 (UTC) X-FDA: 80744889918.16.8CAE0B6 Received: from out-32.mta0.migadu.com (out-32.mta0.migadu.com [91.218.175.32]) by imf19.hostedemail.com (Postfix) with ESMTP id D193A1A01E2 for ; Tue, 2 May 2023 04:03:49 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=lW6pMkkI; spf=pass (imf19.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.32 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683000362; a=rsa-sha256; cv=none; b=wSPFICoOEFZCrWCvQkklfhhvbTZnTWIqNAgFflPGafugaHwOHMBpBLm1rIz7H1JNttGA3W Du367x9BTpqKrsdp+GMi/nOqn2OSxnreGtcqP2aDdRNGz1wL7DibusdkGS7ysxo1p8Yvtm 8FF1E9IJSHXWlbqN4mI5NQw40YaqkG8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=lW6pMkkI; spf=pass (imf19.hostedemail.com: domain of kent.overstreet@linux.dev designates 91.218.175.32 as permitted sender) smtp.mailfrom=kent.overstreet@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683000362; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WS5IfKwTPa1bKv8dROPMPn7bpsB6bxr/+mMUnulbyXo=; b=zS6Vm0eNq+LVuWZA4+DNmE12ffeDFxv+cALV6pbz485VGiJmy2pEY75EP54Wju4PcmiF2a 4c304YZGTC72UC0aKClau1H6NjaXZtO1iH6wO9goz/qawCA0xKzSky9X4M3k66+9chLhNF f4nI6gXfJ/Qv8pZ5w8LXTSZDdX1/tjU= Date: Mon, 1 May 2023 17:16:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1682975831; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WS5IfKwTPa1bKv8dROPMPn7bpsB6bxr/+mMUnulbyXo=; b=lW6pMkkITA3yRW/sjDAKtYtv7Nl+AYeAS5qW1/WcLz5hQIZOXhmptquOd9Uo4YjlLQagEj l8KwsV9hdfnmKeThBO+Hem6g0VYZI6AYnyFLRYZNX5+S78AIIBPNkxPLEdu52Lb7u0ovlq VCSzQAFEVndS+FYqBuYKLLIDbnpmrsU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Andy Shevchenko Cc: Suren Baghdasaryan , akpm@linux-foundation.org, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, willy@infradead.org, liam.howlett@oracle.com, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, ldufour@linux.ibm.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org, Andy Shevchenko , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , "Michael S. Tsirkin" , Jason Wang , Noralf =?utf-8?B?VHLDr8K/wr1ubmVz?= Subject: Re: [PATCH 01/40] lib/string_helpers: Drop space in string_get_size's output Message-ID: References: <20230501165450.15352-1-surenb@google.com> <20230501165450.15352-2-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Stat-Signature: oygd4hsaj6zywsedgk8qb9uwwiifmxk5 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: D193A1A01E2 X-Rspam-User: X-HE-Tag: 1683000229-943993 X-HE-Meta: U2FsdGVkX199V3dlddlCBYVboObzaqb2DuTMcfctdFpamw7AKlYW+UBGrikaNj3f6vtE4B7ouNJVHcHf8wvkEeE+rJvSBDa36Vi7kyN5iDSB0ok8v5I59stkgNiLt6uJ976VjBhVk6sIf0Rj4X4j/qyUDVliTgOmpw/9EEc84+NrlsUYaX2WpDQjLl//QqhQ+K2jFBs0yS06c4tC0gzh9uWycLFJjMK6tJTjWOazAcV6VErYKMg05974XZo6AOoo3tSxrFWkKvntw1nrHP2KZAeuSBatLhbb1cR+VXy3vbziBhEi2zyKmsAvvbUAlhdymekONWQZbHqRCWPBuW5etDZ7Fe6ZAUl7IYMRD0aqNtPF6SG0ytudjpxG4emmNSGZKlaceZjV8cINUGZhF0Yv7pjB1BnztuMGS21rPBdHvwwg3FxDBX6oGR4bZUqt4ouzZhZUQvpefds7paDltrnBBf1TeDsXdM02SZ550HBaUE3tEUbRCg6vYtX3OVjvDUsjU2udJbYn+cD/9Lg5O64kfjSznxqCzopA4I6T/RWUjgb/IqQCzdYFumHgpxSs+zAbkEi9jTyxjLi3QJXMc+6TPV//3+VLSXVIWcqe9khZaD2+0EYnjqK3Jnz5MgcgASZPYjqw68xhUu/4r7oDSnDYq0b8buJcnzFGu1V8wTMvhtgUSf8BZFiMfpZYvOoY9q1XyMwrILxnfEJ7pqHm4sCHo/Cuj1Pxhaeb2f78IATy73wpEpapQwZcqZSDPPdX/2oaE0FO0xreNoA9mzUgmiGWOSDlPF7SwqRjUBQpdFAaU7NV2n2L5Ty8lh6llNrMsAp7d/Y9hvxm/UZKNUlcetmN7VBT3IH2teGXkGrYdQLrKwac7TPGqcawvibMzh4tTnK+ 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, May 01, 2023 at 10:57:07PM +0300, Andy Shevchenko wrote: > On Mon, May 1, 2023 at 10:36 PM Kent Overstreet > wrote: > > > > On Mon, May 01, 2023 at 11:13:15AM -0700, Davidlohr Bueso wrote: > > > On Mon, 01 May 2023, Suren Baghdasaryan wrote: > > > > > > > From: Kent Overstreet > > > > > > > > Previously, string_get_size() outputted a space between the number and > > > > the units, i.e. > > > > 9.88 MiB > > > > > > > > This changes it to > > > > 9.88MiB > > > > > > > > which allows it to be parsed correctly by the 'sort -h' command. > > But why do we need that? What's the use case? As was in the commit message: to produce output that sort -h knows how to parse. > > > Wouldn't this break users that already parse it the current way? > > > > It's not impossible - but it's not used in very many places and we > > wouldn't be printing in human-readable units if it was meant to be > > parsed - it's mainly used for debug output currently. > > > > If someone raises a specific objection we'll do something different, > > otherwise I think standardizing on what userspace tooling already parses > > is a good idea. > > Yes, I NAK this on the basis of > https://english.stackexchange.com/a/2911/153144 Not sure I find a style guide on stackexchange more compelling than interop with a tool everyone already has installed :)