Skip to content

Commit

Permalink
Fix alignment of value in /proc/$pid/smaps
Browse files Browse the repository at this point in the history
The /proc/$pid/smaps output has an alignment issue for the field
FilePmdMapped and THPeligible.

Increases the alignment of FilePmdMapped by 1 space, and converts the
alignment of THPeligible to use spaces instead of tabs, to be consistent
with the other fields.

Signed-off-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
  • Loading branch information
ioquatix committed Dec 30, 2019
1 parent fd69884 commit ba77ea0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/proc/task_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ static void __show_smap(struct seq_file *m, const struct mem_size_stats *mss,
SEQ_PUT_DEC(" kB\nLazyFree: ", mss->lazyfree);
SEQ_PUT_DEC(" kB\nAnonHugePages: ", mss->anonymous_thp);
SEQ_PUT_DEC(" kB\nShmemPmdMapped: ", mss->shmem_thp);
SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
SEQ_PUT_DEC(" kB\nFilePmdMapped: ", mss->file_thp);
SEQ_PUT_DEC(" kB\nShared_Hugetlb: ", mss->shared_hugetlb);
seq_put_decimal_ull_width(m, " kB\nPrivate_Hugetlb: ",
mss->private_hugetlb >> 10, 7);
Expand Down Expand Up @@ -840,7 +840,7 @@ static int show_smap(struct seq_file *m, void *v)

__show_smap(m, &mss, false);

seq_printf(m, "THPeligible: %d\n",
seq_printf(m, "THPeligible: %d\n",
transparent_hugepage_enabled(vma));

if (arch_pkeys_enabled())
Expand Down

0 comments on commit ba77ea0

Please sign in to comment.