lkml.org 
[lkml]   [2023]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mm,thp: fix smaps THPeligible output alignment
On Tue, 15 Aug 2023, Alexey Dobriyan wrote:
> On Mon, Aug 14, 2023 at 01:02:08PM -0700, Hugh Dickins wrote:
> > Swap: 0 kB
> > SwapPss: 0 kB
> > Locked: 0 kB
> > THPeligible: 0
> > ProtectionKey: 0
>
> > - seq_printf(m, "THPeligible: %d\n",
> > + seq_printf(m, "THPeligible: %8u\n",
> > hugepage_vma_check(vma, vma->vm_flags, true, false, true));
>
> Why format string change? It would only slow down printing.

To document the alignment, and to look like the ProtectionKey line below.

>
> I'd print with
>
> "%u", +hugepage_vma_check()

Sorry, I don't understand.

>
> or just add whitespace.

My original patch did that, then I thought it better to document the
alignment and save those bytes of kernel.

Hugh

\
 
 \ /
  Last update: 2023-08-15 18:59    [W:1.846 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site