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 29507C433EF for ; Mon, 25 Apr 2022 05:56:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AE6588D0001; Mon, 25 Apr 2022 01:56:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A96D86B00C2; Mon, 25 Apr 2022 01:56:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 937FC8D0001; Mon, 25 Apr 2022 01:56:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 81DE66B00C1 for ; Mon, 25 Apr 2022 01:56:25 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6059727C77 for ; Mon, 25 Apr 2022 05:56:25 +0000 (UTC) X-FDA: 79394341530.16.2C8CFEA Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by imf20.hostedemail.com (Postfix) with ESMTP id 7E4061C004B for ; Mon, 25 Apr 2022 05:56:22 +0000 (UTC) Received: by mail-qv1-f53.google.com with SMTP id kd11so1302909qvb.2 for ; Sun, 24 Apr 2022 22:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=yEtpP0V8bXsR3hzvKMHsezmMX2/PHsvriv0+UQGZXkA=; b=qn2xWHxfsL/YflUV6AWs2jqwGqY0JddqzwNB+5uzZOzncVjZYAcn5WvcPXUp1tf1x5 JLRfjecTfxjeocC3JVUK/btbt/zYSx96hXaF6yZFILa/RgKhbdzXPLV+wvFkt3yhVOi9 WyjRVBmRcn6CaS8PxDTgMcwPiHqZVOjqX5eGw5FbkssBdKNGhV7G7DFTyzwXBUiy4Lrq PpuIIvAsGPaakypH45Jo62fUl/bSWck+Lbh4P94WC6kd/dAg96vRnaofuMpx4lxL5o7l VHKlraViEOzc6qtAjbz/iySaIaPnkyLg6cYcIJILYoGabdeDqBvN0dIS+40Nd62zk6w9 +e0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=yEtpP0V8bXsR3hzvKMHsezmMX2/PHsvriv0+UQGZXkA=; b=2paoDNCrwKOXHlRzIbBKPkFeId8lYOIXQ/aBmlBUhrcdEcRBbGqTA/Cp+C3LiTJSxz oG7TQ4qHKapP+slYx2q6uzBqaDuJXh/Of6xiQOHq8VG7Wt7u4mEGTc9kw1NEUfKtEMv4 8SevSpH2SPHfCkdTQKAp21JEcNK7ZKwc+yGK6aZFqBaxBHr43xoHoYpqbBZbsrXBztex ZrV9GqGKy090lwoYxmaueiSJSg9JxpYbRTfMqwV4oWolZSnFIi5YqaG/GHb2QE7x2Pl2 suTGDfH2WTiQIRH3RKmWYkWpukjV4pTpjVIs5EYuoxR0QYYKJEVzj+48wTbBA51KA0zZ ewWA== X-Gm-Message-State: AOAM533W3pHZWShjK4/IZ0iq/RBTHS3+iCr4ioa1aMk5O+pCalS5JBig 8zrOuG4SBmhEU97V6oUhuw== X-Google-Smtp-Source: ABdhPJzAxFXsVJ0WWB+a/uW3ENjomgA1MnU7dbP9wMly0PKxY+hDawYHFLH4F7OZHRJDaudnhEK29A== X-Received: by 2002:ad4:5d68:0:b0:446:64dc:79db with SMTP id fn8-20020ad45d68000000b0044664dc79dbmr11197375qvb.111.1650866184049; Sun, 24 Apr 2022 22:56:24 -0700 (PDT) Received: from moria.home.lan (c-73-219-103-14.hsd1.vt.comcast.net. [73.219.103.14]) by smtp.gmail.com with ESMTPSA id a28-20020a05620a02fc00b0069e8e766a0csm4610371qko.94.2022.04.24.22.56.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Apr 2022 22:56:23 -0700 (PDT) Date: Mon, 25 Apr 2022 01:56:21 -0400 From: Kent Overstreet To: Joe Perches Cc: Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, hch@lst.de, hannes@cmpxchg.org, akpm@linux-foundation.org, linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org, linux-input@vger.kernel.org, roman.gushchin@linux.dev Subject: Re: [PATCH v2 1/8] lib/printbuf: New data structure for heap-allocated strings Message-ID: <20220425055621.ffzp4lokgtsi72z2@moria.home.lan> References: <20220421234837.3629927-1-kent.overstreet@gmail.com> <20220421234837.3629927-7-kent.overstreet@gmail.com> <20220425041909.hcyirjphrkhxz6hx@moria.home.lan> <9ab6601364a16c782ca36ab22a2c67face0785a7.camel@perches.com> <20220425045909.rhot6b4xrd4tv6h6@moria.home.lan> <2df59c0f4763b81741b12894434ceeaee35c85a2.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2df59c0f4763b81741b12894434ceeaee35c85a2.camel@perches.com> Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qn2xWHxf; spf=pass (imf20.hostedemail.com: domain of kent.overstreet@gmail.com designates 209.85.219.53 as permitted sender) smtp.mailfrom=kent.overstreet@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 7E4061C004B X-Stat-Signature: 4u11yuyx9gite4cs1p6izw4o3pmdggop X-HE-Tag: 1650866182-240054 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 Sun, Apr 24, 2022 at 10:00:32PM -0700, Joe Perches wrote: > On Mon, 2022-04-25 at 00:59 -0400, Kent Overstreet wrote: > > On Sun, Apr 24, 2022 at 09:48:58PM -0700, Joe Perches wrote: > > > On Mon, 2022-04-25 at 00:19 -0400, Kent Overstreet wrote: > > > > On Mon, Apr 25, 2022 at 03:44:34AM +0100, Matthew Wilcox wrote: > > > > > On Sun, Apr 24, 2022 at 04:46:03PM -0700, Joe Perches wrote: > > > > > > > + * pr_human_readable_u64, pr_human_readable_s64: Print an integer with human > > > > > > > + * readable units. > > > > > > > > > > > > Why not extend vsprintf for this using something like %pH[8|16|32|64] > > > > > > or %pH[c|s|l|ll|uc|us|ul|ull] ? > > > > > > > > > > The %pX extension we have is _cute_, but ultimately a bad idea. It > > > > > centralises all kinds of unrelated things in vsprintf.c, eg bdev_name() > > > > > and clock() and ip_addr_string(). > > > > > > > > And it's not remotely discoverable. I didn't realize we had bdev_name() > > > > available as a format string until just now or I would've been using it! > > > > > > Documentation/core-api/printk-formats.rst > > > > Who has time for docs? > > The same people that have time to reimplement the already implemented? Touché :)