lkml.org 
[lkml]   [2022]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v2 16/47] hugetlb: make unmapping compatible with high-granularity mappings
On 10/21/22 16:36, James Houghton wrote:
> Enlighten __unmap_hugepage_range to deal with high-granularity mappings.
> This doesn't change its API; it still must be called with hugepage
> alignment, but it will correctly unmap hugepages that have been mapped
> at high granularity.
>
> The rules for mapcount and refcount here are:
> 1. Refcount and mapcount are tracked on the head page.
> 2. Each page table mapping into some of an hpage will increase that
> hpage's mapcount and refcount by 1.
>
> Eventually, functionality here can be expanded to allow users to call
> MADV_DONTNEED on PAGE_SIZE-aligned sections of a hugepage, but that is
> not done here.
>
> Signed-off-by: James Houghton <jthoughton@google.com>
> ---
> include/asm-generic/tlb.h | 6 ++--
> mm/hugetlb.c | 76 +++++++++++++++++++++++++--------------
> 2 files changed, 52 insertions(+), 30 deletions(-)

All looks reasonable, nothing stands out.

--
Mike Kravetz

\
 
 \ /
  Last update: 2022-12-15 01:30    [W:0.032 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site