Re: [RFC PATCH 00/14] mm: userspace hugepage collapse

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

 



On Mon, Mar 21, 2022 at 7:32 AM Zi Yan <ziy@xxxxxxxxxx> wrote:
>
> On 8 Mar 2022, at 16:34, Zach O'Keefe wrote:
>
> > Introduction
> > --------------------------------
> >
> > This series provides a mechanism for userspace to induce a collapse of
> > eligible ranges of memory into transparent hugepages in process context,
> > thus permitting users to more tightly control their own hugepage
> > utilization policy at their own expense.
> >
> > This idea was previously introduced by David Rientjes, and thanks to
> > everyone for your patience while I prepared these patches resulting from
> > that discussion[1].
> >
> > [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fall%2FC8C89F13-3F04-456B-BA76-DE2C378D30BF%40nvidia.com%2F&amp;data=04%7C01%7Cziy%40nvidia.com%7C7bcd2b7a8e4a424ab75908da014b76f9%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C637823721375395857%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=4bHCbskcQmp0Nu7ds7XCDFLty964672zCQPXILC25C8%3D&amp;reserved=0
> >
> > Interface
> > --------------------------------
> >
> > The proposed interface adds a new madvise(2) mode, MADV_COLLAPSE, and
>
> Can we have a better name instead of MADV_COLLAPSE? It sounds like it is
> destroying a huge page but in fact doing the opposite. Something like
> MADV_CREATE_HUGE_PAGE? I know the kernel functions uses collapse everywhere
> but it might be better not to confuse the user.
>

Hey Zi, thanks for reviewing / commenting. I briefly thought about
"coalesce", but, "collapse" isn't just used within the kernel; it's
already part of existing user apis such as the thp sysfs interface
(/sys/kernel/mm/transparent_hugepage/khugepaged/pages_collapsed),
vmstat (ex /proc/vmstat:thp_collapse_alloc[_failed]), per-memcg stats
(memory.stat:thp_collapse_alloc) and tracepoints (ex
mm_collapse_huge_page). I'm not married to it though.


> Thanks.
>
> --
> Best Regards,
> Yan, Zi





[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