Re: [RFC PATCH v2 16/47] hugetlb: make unmapping compatible with high-granularity mappings

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

 



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@xxxxxxxxxx>
> ---
>  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




[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