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

From: Anshuman Khandual

Date: Mon Jul 27 2026 - 08:50:49 EST




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.

- Anshuman