Re: [PATCH 02/10] mm/hugetlb: Add PGD based implementation awareness
From: Anshuman Khandual <hidden>
Date: 2016-04-11 06:11:04
Also in:
linux-mm, lkml
On 04/11/2016 10:55 AM, Anshuman Khandual wrote:
On 04/07/2016 02:34 PM, Balbir Singh wrote:quoted
quoted
On 07/04/16 15:37, Anshuman Khandual wrote:quoted
quoted
Currently the config ARCH_WANT_GENERAL_HUGETLB enabled functions like 'huge_pte_alloc' and 'huge_pte_offset' dont take into account HugeTLB page implementation at the PGD level. This is also true for functions like 'follow_page_mask' which is called from move_pages() system call. This lack of PGD level huge page support prohibits some architectures to use these generic HugeTLB functions.From what I know of move_pages(), it will always call follow_page_mask() with FOLL_GET (I could be wrong here) and the implementation below returns NULL for follow_huge_pgd().You are right. This patch makes ARCH_WANT_GENERAL_HUGETLB functions aware of PGD implementation so that we can do all transactions on 16GB pages using these function instead of the present arch overrides. But that also requires follow_page_mask() changes for every other access to the page than the migrate_pages() usage. But yes, we dont support migrate_pages() on PGD based pages yet, hence it just returns NULL in that case. May be the commit message needs to reflect this.
The next commit actually changes follow_huge_pud|pgd() functions to support FOLL_GET and PGD based huge page migration.