On 09.09.20 15:14, Jason Gunthorpe wrote:
> On Wed, Sep 09, 2020 at 01:32:44PM +0100, Matthew Wilcox wrote:
> 
>> But here's the thing ... we already allow
>>      mmap(MAP_POPULATE | MAP_HUGETLB | MAP_HUGE_1GB)
>>
>> So if we're not doing THP, what's the point of this thread?
> 
> I wondered that too..
> 
>> An madvise flag is a different beast; that's just letting the kernel
>> know what the app thinks its behaviour will be.  The kernel can pay
> 
> But madvise is too late, the VMA already has an address, if it is not
> 1G aligned it cannot be 1G THP already.

That's why user space (like QEMU) is THP-aware and selects an address
that is aligned to the expected THP granularity (e.g., 2MB on x86_64).

-- 
Thanks,

David / dhildenb

Reply via email to