Re: [PATCH v2 2/5] hugetlb: convert page_huge_active() HPageMigratable flag
From: Oscar Salvador <osalvador@suse.de>
Date: 2021-01-21 20:10:18
Also in:
lkml
From: Oscar Salvador <osalvador@suse.de>
Date: 2021-01-21 20:10:18
Also in:
lkml
On Wed, Jan 20, 2021 at 01:48:05PM -0800, Mike Kravetz wrote:
quoted
quoted
This comment addresses both this patch and the next one. Instead of putting the SetHPageMigratable flag spread over the allocation paths, would it make more sense to place it in alloc_huge_page before returning the page? Then we could opencode SetHPageMigratableIfSupported right there.and in putback_active_hugepage.Hi Oscar, In Muchun's series of hugetlb bug fixes, Michal asked the same question. https://lore.kernel.org/linux-mm/7e69a55c-d501-6b42-8225-a677f09fb829@oracle.com/ (local) The 'short answer' is that the this would allow a page to be migrated after allocation but before the page fault code adds it to the page cache or page tables. This actually caused bugs in the past.
Oh, I see. I jumped late into that patchset so I missed some early messages. Thanks for explaining this again. -- Oscar Salvador SUSE L3