[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fcaf18ed6efaafa6ca7df79712d9d317645215f8.camel@perches.com>
Date: Sun, 24 Apr 2022 16:46:03 -0700
From: Joe Perches <joe@...ches.com>
To: Kent Overstreet <kent.overstreet@...il.com>,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-fsdevel@...r.kernel.org
Cc: hch@....de, hannes@...xchg.org, akpm@...ux-foundation.org,
linux-clk@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-input@...r.kernel.org, roman.gushchin@...ux.dev
Subject: Re: [PATCH v2 1/8] lib/printbuf: New data structure for
heap-allocated strings
On Thu, 2022-04-21 at 19:48 -0400, Kent Overstreet wrote:
> This adds printbufs: simple heap-allocated strings meant for building up
> structured messages, for logging/procfs/sysfs and elsewhere. They've
> been heavily used in bcachefs for writing .to_text() functions/methods -
> pretty printers, which has in turn greatly improved the overall quality
> of error messages.
>
> Basic usage is documented in include/linux/printbuf.h.
Given the maximum printk output is less than 1024 bytes, why should
this be allowed to be larger than that or larger than PAGE_SIZE?
> + * 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] ?
Powered by blists - more mailing lists