[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izNPr+TfxLL_dBitKAgd11rPhjHx+10Nn96TD3HXzUSevQ@mail.gmail.com>
Date: Wed, 22 Feb 2023 12:57:27 -0800
From: Mina Almasry <almasrymina@...gle.com>
To: David Hildenbrand <david@...hat.com>
Cc: Mike Kravetz <mike.kravetz@...cle.com>,
James Houghton <jthoughton@...gle.com>,
Muchun Song <songmuchun@...edance.com>,
Peter Xu <peterx@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
David Rientjes <rientjes@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>,
"Zach O'Keefe" <zokeefe@...gle.com>,
Manish Mishra <manish.mishra@...anix.com>,
Naoya Horiguchi <naoya.horiguchi@....com>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
Baolin Wang <baolin.wang@...ux.alibaba.com>,
Miaohe Lin <linmiaohe@...wei.com>,
Yang Shi <shy828301@...il.com>,
Frank van der Linden <fvdl@...gle.com>,
Jiaqi Yan <jiaqiyan@...gle.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 00/46] hugetlb: introduce HugeTLB high-granularity mapping
On Wed, Feb 22, 2023 at 7:49 AM David Hildenbrand <david@...hat.com> wrote:
>
> On 21.02.23 22:46, Mike Kravetz wrote:
> > On 02/18/23 00:27, James Houghton wrote:
> >> This series introduces the concept of HugeTLB high-granularity mapping
> >> (HGM). This series teaches HugeTLB how to map HugeTLB pages at
> >> high-granularity, similar to how THPs can be PTE-mapped.
> >>
> >> Support for HGM in this series is for MAP_SHARED VMAs on x86_64 only. Other
> >> architectures and (some) support for MAP_PRIVATE will come later.
> >>
> >> This series is based on latest mm-unstable (ccd6a73daba9).
> >>
> >> Notable changes with this series
> >> ================================
> >>
> >> - hugetlb_add_file_rmap / hugetlb_remove_rmap are added to handle
> >> mapcounting for non-anon hugetlb.
> >> - The mapcounting scheme uses subpages' mapcounts for high-granularity
> >> mappings, but it does not use subpages_mapcount(). This scheme
> >> prevents the HugeTLB VMEMMAP optimization from being used, so it
> >> will be improved in a later series.
> >> - page_add_file_rmap and page_remove_rmap are updated so they can be
> >> used by hugetlb_add_file_rmap / hugetlb_remove_rmap.
> >> - MADV_SPLIT has been added to enable the userspace API changes that
> >> HGM allows for: high-granularity UFFDIO_CONTINUE (and maybe other
> >> changes in the future). MADV_SPLIT does NOT force all the mappings to
> >> be PAGE_SIZE.
> >> - MADV_COLLAPSE is expanded to include HugeTLB mappings.
> >>
> >> Old versions:
> >> v1: https://lore.kernel.org/linux-mm/20230105101844.1893104-1-jthoughton@google.com/
> >> RFC v2: https://lore.kernel.org/linux-mm/20221021163703.3218176-1-jthoughton@google.com/
> >> RFC v1: https://lore.kernel.org/linux-mm/20220624173656.2033256-1-jthoughton@google.com/
> >>
> >> Changelog:
> >> v1 -> v2 (thanks Peter for all your suggestions!):
> >> - Changed mapcount to be more THP-like, and make HGM incompatible with
> >> HVO.
> >> - HGM is now disabled by default to leave HVO enabled by default.
> >
> > I understand the reasoning behind the move to THP-like mapcounting, and the
> > incompatibility with HVO. However, I just got to patch 5 and realized either
> > HGM or HVO will need to be chosen at kernel build time. That may not be an
> > issue for cloud providers or others building their own kernels for internal
> > use. However, distro kernels will need to pick one option or the other.
> > Right now, my Fedora desktop has HVO enabled so it would likely not have
> > HGM enabled. That is not a big deal for a desktop.
> >
> > Just curious, do we have distro kernel users that want to use HGM?
>
> Most certainly I would say :)
>
Is it a blocker to merge in an initial implementation though? Do
distro kernel users have a pressing need for HVO + HGM used in tandem?
> --
> Thanks,
>
> David / dhildenb
>
Powered by blists - more mailing lists