Skip to contentSkip to conversation

powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size

PATCH Applied Aneesh Kumar K.V 4 participants 5 messages Dec 13, 2016 – Jan 18, 2017 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size

generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0 we get

[0.241333] hugetlbfs: disabling because there are no supported hugepage sizes

bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
bash: echo: write error: Operation not supported

Fixes "powerpc: get hugetlbpage handling more generic"
---
 arch/powerpc/mm/hugetlbpage.c | 3 ---
 1 file changed, 3 deletions(-)
arch/powerpc/mm/hugetlbpage.c +0 -3
index 289df38fb7e0..e46bbd716832 100644
@@ -852,9 +852,6 @@ static int __init hugetlbpage_init(void)
 	else if (mmu_psize_defs[MMU_PAGE_2M].shift)
 		HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_2M].shift;
 #endif
-	else
-		panic("%s: Unable to set default huge page size\n", __func__);
-
 	return 0;
 }
 
Signature · 1 line
2.10.2
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Aneesh Kumar K.V

generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT =

=3D 0

Quoted 2 lines

we get

[0.241333] hugetlbfs: disabling because there are no supported hugepage s=

izes

Quoted 7 lines

=20
bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
bash: echo: write error: Operation not supported =20

Fixes "powerpc: get hugetlbpage handling more generic"

arch/powerpc/mm/hugetlbpage.=

Quoted 5 lines

---
=C2=A0arch/powerpc/mm/hugetlbpage.c | 3 --- =C2=A01 file changed, 3 deletions(-)
=20

arch/powerpc/mm/hugetlbpage.= renamed from arch/powerpc/mm/hugetlbpage.c +0 -0

c

Quoted 14 lines

index 289df38fb7e0..e46bbd716832 100644

arch/powerpc/mm/hugetlbpage.c +0 -0
@@ -852,9 +852,6 @@ static int __init hugetlbpage_init(void)
 =C2=A0	else if (mmu_psize_defs[MMU_PAGE_2M].shift)
 =C2=A0		HPAGE_SHIFT =3D mmu_psize_defs[MMU_PAGE_2M].shift;

=C2=A0#endif

arch/powerpc/mm/hugetlbpage.c +0 -2
-	else
-		panic("%s: Unable to set default huge page size\n",

__func__);
-
=C2=A0 return 0;
=C2=A0}
=C2=A0

#2 lore raw
In reply to Aneesh Kumar K.V
Quoted 1 line · Aneesh Kumar K.V

generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0

Need to add some context here. "That condition" refers to something without first mentioning it.

Quoted 7 lines

we get

[0.241333] hugetlbfs: disabling because there are no supported hugepage sizes

bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
bash: echo: write error: Operation not supported

Fixes "powerpc: get hugetlbpage handling more generic"

Dont we need the commit SHA for the "Fixes" header ?

#3 lore raw
Quoted 5 lines · Anshuman Khandual
Quoted 1 line · Aneesh Kumar K.V

generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0

Need to add some context here. "That condition" refers to something without first mentioning it.

It is the conditinal statement that gets removed as part of this patch. The next line also explains what the generic code does for that condition.

Quoted 10 lines
Quoted 8 lines

we get

[0.241333] hugetlbfs: disabling because there are no supported hugepage sizes

bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
bash: echo: write error: Operation not supported

Fixes "powerpc: get hugetlbpage handling more generic"

Dont we need the commit SHA for the "Fixes" header ?

When I wrote the patch, the commit was not upstream. Hence i didn't had an SHA1 to put there.

-aneesh

#4 lore raw
In reply to Aneesh Kumar K.V
Quoted 11 lines · Aneesh Kumar K.V

generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT = 0 we get

[0.241333] hugetlbfs: disabling because there are no supported hugepage sizes

bash-4.2# echo 30 > /proc/sys/vm/nr_hugepages
bash: echo: write error: Operation not supported

Fixes "powerpc: get hugetlbpage handling more generic"

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/ff8b85796dad5de869dc29903c9566

cheers