Re: [PATCH v4 0/4] Make alloc_contig_range handle Hugetlb pages

From: David Hildenbrand
Date: Mon Mar 15 2021 - 06:29:47 EST


On 15.03.21 11:27, Oscar Salvador wrote:
On Mon, Mar 15, 2021 at 10:06:40AM +0100, David Hildenbrand wrote:

BTW, I stumbled yesterday over

alloc_contig_pages()->pfn_range_valid_contig():

if (page_count(page) > 0)
rerurn false;
if (PageHuge(page))
return false;

As used by memtrace and for gigantic pages. We can now

a) Drop these check completely, as it's best-effort only and racy.
alloc_contig_pages()/alloc_contig_range() will handle it properly.

b) Similarly, check for gigantic pages and/or movability/migratability.

Dropping both checks might be the right thing to do: might significantly
increase allocation chances -- as we actually end up migrating busy pages
...

Oh, sorry David, my mail client tricked me and I did not see this till now.

I will have a look, but I would like to collect some more feedback from all
pieces before going any further and write a new version.
Vlastimil patch#1 and patch#2 and he was ok with them, but let see what others
think as well.

Planning on having a detailed look at the patches. Fairly busy though ... :(

--
Thanks,

David / dhildenb