Re: [PATCH V3] mm: Standardize printing for pgtable entries

From: Andy Shevchenko

Date: Thu Aug 06 2026 - 20:56:55 EST


On Mon, Jul 27, 2026 at 06:20:39PM +0530, Anshuman Khandual wrote:
> On 13/07/26 9:36 PM, Andy Shevchenko wrote:
> > On Mon, Jul 13, 2026 at 01:34:17PM +0100, Matthew Wilcox wrote:
> >> On Mon, Jul 13, 2026 at 02:36:50PM +0300, Andy Shevchenko wrote:

...

> >>> FWIW, we have hex_dump_to_buffer() for that already.

> >> ... which doesn't eliminate the problem of allocating buffers in the
> >> caller.
> >
> > Right, for this we need to integrate hex_dump_to_buffer() into %ph.
>
> Would not that create more complexity which might not really
> be required here for simple pgtable entry print solution that
> would probably have very limited number of callers anyway. Is
> not that reason - we did not go for the original printk format
> proposed earlier.
>
> https://lore.kernel.org/all/20260610043545.3725735-1-anshuman.khandual@xxxxxxx/
>
> IMHO this should be left unchanged. Later if there are more
> users for such prints, those printk formats should again be
> evaluated.

My comment was only to show the possible option to solve what Matthew pointed
out without relation to any exact usage. Yes, for this certain change this might
be an overkill.

--
With Best Regards,
Andy Shevchenko