diff mbox series

[V2,1/5] mm/hugetlb: Enable PUD level huge page migration

Message ID 1539316799-6064-2-git-send-email-anshuman.khandual@arm.com (mailing list archive)
State Superseded, archived
Headers show
Series arm64/mm: Enable HugeTLB migration | expand

Commit Message

Anshuman Khandual Oct. 12, 2018, 3:59 a.m. UTC
Architectures like arm64 have PUD level HugeTLB pages for certain configs
(1GB huge page is PUD based on ARM64_4K_PAGES base page size) that can be
enabled for migration. It can be achieved through checking for PUD_SHIFT
order based HugeTLB pages during migration.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
 include/linux/hugetlb.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Michal Hocko Oct. 19, 2018, 8:09 a.m. UTC | #1
I planed to get to review this earlier but been busy. Anyway, this patch
should be applied only after movability one to prevent from
(theoretical) bisectability issues.

I would probably fold it into the one which defines arch specific hook.

On Fri 12-10-18 09:29:55, Anshuman Khandual wrote:
> Architectures like arm64 have PUD level HugeTLB pages for certain configs
> (1GB huge page is PUD based on ARM64_4K_PAGES base page size) that can be
> enabled for migration. It can be achieved through checking for PUD_SHIFT
> order based HugeTLB pages during migration.
> 
> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
> ---
>  include/linux/hugetlb.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
> index 6b68e34..9c1b77f 100644
> --- a/include/linux/hugetlb.h
> +++ b/include/linux/hugetlb.h
> @@ -483,7 +483,8 @@ static inline bool hugepage_migration_supported(struct hstate *h)
>  {
>  #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
>  	if ((huge_page_shift(h) == PMD_SHIFT) ||
> -		(huge_page_shift(h) == PGDIR_SHIFT))
> +		(huge_page_shift(h) == PUD_SHIFT) ||
> +			(huge_page_shift(h) == PGDIR_SHIFT))
>  		return true;
>  	else
>  		return false;
> -- 
> 2.7.4
Anshuman Khandual Oct. 22, 2018, 3:01 a.m. UTC | #2
On 10/19/2018 01:39 PM, Michal Hocko wrote:
> I planed to get to review this earlier but been busy. Anyway, this patch
> should be applied only after movability one to prevent from
> (theoretical) bisectability issues.

Sure, I can change the order there.

> 
> I would probably fold it into the one which defines arch specific hook.

Hmm but that may be like doing two functionality changes together. Adding one
more conditional check and at the same time wrapping it over with a new name
which is part of a new scheme. I would suggest keeping the patches separate.
Michal Hocko Oct. 22, 2018, 7:16 a.m. UTC | #3
On Mon 22-10-18 08:31:05, Anshuman Khandual wrote:
> On 10/19/2018 01:39 PM, Michal Hocko wrote:
> > I would probably fold it into the one which defines arch specific hook.
> 
> Hmm but that may be like doing two functionality changes together. Adding one
> more conditional check and at the same time wrapping it over with a new name
> which is part of a new scheme. I would suggest keeping the patches separate.

I will surely not insist. If you think it is better this way then no
objections from me of course.
diff mbox series

Patch

diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 6b68e34..9c1b77f 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -483,7 +483,8 @@  static inline bool hugepage_migration_supported(struct hstate *h)
 {
 #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
 	if ((huge_page_shift(h) == PMD_SHIFT) ||
-		(huge_page_shift(h) == PGDIR_SHIFT))
+		(huge_page_shift(h) == PUD_SHIFT) ||
+			(huge_page_shift(h) == PGDIR_SHIFT))
 		return true;
 	else
 		return false;