Re: [PATCH v2] mm: Add PM_THP to /proc/pid/pagemap

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

 



On Thu, Nov 04, 2021 at 02:46:35PM -0700, Mina Almasry wrote:
> Add PM_THP to allow userspace to detect whether a given virt address is
> currently mapped by a hugepage or not.

Well, no, that's not what that means.

> @@ -1396,6 +1397,8 @@ static pagemap_entry_t pte_to_pagemap_entry(struct pagemapread *pm,
>  		flags |= PM_FILE;
>  	if (page && page_mapcount(page) == 1)
>  		flags |= PM_MMAP_EXCLUSIVE;
> +	if (page && PageTransCompound(page))
> +		flags |= PM_THP;

All that PageTransCompound() does is call PageCompound().  It doesn't
tell you if the underlying allocation is PMD sized, nor properly aligned.

And you didn't answer my question about whether you want information about
whether a large page is being used that's not quite as large as a PMD.





[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