Re: [PATCH v3 0/2] Align mmap address for DAX pmd mappings

From: Toshi Kani
Date: Thu Apr 21 2016 - 19:44:05 EST



On 4/21/2016 4:21 PM, Mike Kravetz wrote:
On 04/21/2016 12:06 AM, Matthew Wilcox wrote:
On Wed, Apr 20, 2016 at 11:10:25PM -0400, Toshi Kani wrote:
How about moving the function (as is) to mm/huge_memory.c, rename it to
get_hugepage_unmapped_area(), which is defined to NULL in huge_mm.h
when TRANSPARENT_HUGEPAGE is unset?
Great idea. Perhaps it should look something like this?

unsigned long thp_get_unmapped_area(struct file *filp, unsigned long addr,
unsigned long len, unsigned long pgoff, unsigned long flags)
{
Might want to keep the future possibility of PUD_SIZE THP in mind?

Yes, this is why the func name does not say 'pmd'. It can be extended to support
PUD_SIZE in future.

Thanks,
-Toshi