Re: [PATCH v3] mm: add per-order mTHP swpin counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Barry Song <21cnbao@xxxxxxxxx> writes:

> On Thu, Oct 31, 2024 at 9:09 PM Huang, Ying <ying.huang@xxxxxxxxx> wrote:
>>
>> Barry Song <21cnbao@xxxxxxxxx> writes:
>>
>> > From: Barry Song <v-songbaohua@xxxxxxxx>
>> >
>> > This helps profile the sizes of folios being swapped in. Currently,
>> > only mTHP swap-out is being counted.
>> > The new interface can be found at:
>> > /sys/kernel/mm/transparent_hugepage/hugepages-<size>/stats/swpin
>> > For example,
>> > $ cat /sys/kernel/mm/transparent_hugepage/hugepages-64kB/stats/swpin
>> > 12809
>> > $ cat /sys/kernel/mm/transparent_hugepage/hugepages-32kB/stats/swpin
>> > 4763
>> >
>> > Signed-off-by: Barry Song <v-songbaohua@xxxxxxxx>
>> > Reviewed-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
>> > Acked-by: David Hildenbrand <david@xxxxxxxxxx>
>> > Cc: Chris Li <chrisl@xxxxxxxxxx>
>> > Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx>
>> > Cc: "Huang, Ying" <ying.huang@xxxxxxxxx>
>> > Cc: Kairui Song <kasong@xxxxxxxxxxx>
>> > Cc: Ryan Roberts <ryan.roberts@xxxxxxx>
>> > Cc: Kanchana P Sridhar <kanchana.p.sridhar@xxxxxxxxx>
>> > Cc: Usama Arif <usamaarif642@xxxxxxxxx>
>> > ---
>> >  -v3: minor refine changelog per Huang, Ying. thanks!
>> >
>> >  Documentation/admin-guide/mm/transhuge.rst | 4 ++++
>> >  include/linux/huge_mm.h                    | 1 +
>> >  mm/huge_memory.c                           | 3 +++
>> >  mm/page_io.c                               | 3 +++
>> >  4 files changed, 11 insertions(+)
>> >
>> > diff --git a/Documentation/admin-guide/mm/transhuge.rst b/Documentation/admin-guide/mm/transhuge.rst
>> > index 2a171ed5206e..5caa3fb2feb1 100644
>> > --- a/Documentation/admin-guide/mm/transhuge.rst
>> > +++ b/Documentation/admin-guide/mm/transhuge.rst
>> > @@ -534,6 +534,10 @@ zswpout
>> >       is incremented every time a huge page is swapped out to zswap in one
>> >       piece without splitting.
>> >
>> > +swpin
>> > +     is incremented every time a huge page is swapped in from a non-zswap
>> > +     swap device in one piece.
>> > +
>> >  swpout
>> >       is incremented every time a huge page is swapped out to a non-zswap
>> >       swap device in one piece without splitting.
>>
>> In Documentation/ABI/testing/sysfs-kernel-mm-transparent-hugepage, I
>> found
>>
>> "
>> What:           /sys/kernel/mm/transparent_hugepage/
>> Date:           April 2024
>> Contact:        Linux memory management mailing list <linux-mm@xxxxxxxxx>
>> Description:
>>                 /sys/kernel/mm/transparent_hugepage/ contains a number of files and
>>                 subdirectories,
>>
>>                         - defrag
>>                         - enabled
>>                         - hpage_pmd_size
>>                         - khugepaged
>>                         - shmem_enabled
>>                         - use_zero_page
>>                         - subdirectories of the form hugepages-<size>kB, where <size>
>>                           is the page size of the hugepages supported by the kernel/CPU
>>                           combination.
>>
>>                 See Documentation/admin-guide/mm/transhuge.rst for details.
>> "
>>
>> So, Documentation/admin-guide/mm/transhuge.rst will be used as ABI
>> document?
>
> Yes. this follows:
>
> sysfs-kernel-mm-hugepages:              See
> Documentation/admin-guide/mm/hugetlbpage.rst for details.
> sysfs-kernel-mm-ksm:            See Documentation/mm/ksm.rst for more
> information.
> sysfs-kernel-mm-transparent-hugepage:           See
> Documentation/admin-guide/mm/transhuge.rst for details.
>

Got it!  Thanks!  Feel free to add

Acked-by: "Huang, Ying" <ying.huang@xxxxxxxxx>

in the future versions.

--
Best Regards,
Huang, Ying





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux