linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size
@ 2016-12-13 14:04 Aneesh Kumar K.V
  2017-01-04  0:18 ` Michael Neuling
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aneesh Kumar K.V @ 2016-12-13 14:04 UTC (permalink / raw)
  To: benh, paulus, mpe, Chris Smart, Christophe Leroy
  Cc: linuxppc-dev, 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"
Reported-by: Chris Smart <csmart@ozlabs.au.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 arch/powerpc/mm/hugetlbpage.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 289df38fb7e0..e46bbd716832 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -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;
 }
 
-- 
2.10.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size
  2016-12-13 14:04 [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size Aneesh Kumar K.V
@ 2017-01-04  0:18 ` Michael Neuling
  2017-01-16  6:55 ` Anshuman Khandual
  2017-01-18 12:10 ` Michael Ellerman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Neuling @ 2017-01-04  0:18 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus, mpe, Chris Smart, Christophe Leroy
  Cc: linuxppc-dev

On Tue, 2016-12-13 at 19:34 +0530, Aneesh Kumar K.V wrote:
> generic hugetlbfs can handle that condition correctly. With HPAGE_SHIFT =
=3D 0
> we get
> [0.241333] hugetlbfs: disabling because there are no supported hugepage s=
izes
>=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"
> Reported-by: Chris Smart <csmart@ozlabs.au.ibm.com>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

Acked-By: Michael Neuling <mikey@neuling.org>

> ---
> =C2=A0arch/powerpc/mm/hugetlbpage.c | 3 ---
> =C2=A01 file changed, 3 deletions(-)
>=20
> diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.=
c
> index 289df38fb7e0..e46bbd716832 100644
> --- a/arch/powerpc/mm/hugetlbpage.c
> +++ b/arch/powerpc/mm/hugetlbpage.c
> @@ -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
> -	else
> -		panic("%s: Unable to set default huge page size\n",
> __func__);
> -
> =C2=A0	return 0;
> =C2=A0}
> =C2=A0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size
  2016-12-13 14:04 [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size Aneesh Kumar K.V
  2017-01-04  0:18 ` Michael Neuling
@ 2017-01-16  6:55 ` Anshuman Khandual
  2017-01-16 16:42   ` Aneesh Kumar K.V
  2017-01-18 12:10 ` Michael Ellerman
  2 siblings, 1 reply; 5+ messages in thread
From: Anshuman Khandual @ 2017-01-16  6:55 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus, mpe, Chris Smart, Christophe Leroy
  Cc: linuxppc-dev

On 12/13/2016 07:34 PM, Aneesh Kumar K.V wrote:
> 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.

> 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 ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size
  2017-01-16  6:55 ` Anshuman Khandual
@ 2017-01-16 16:42   ` Aneesh Kumar K.V
  0 siblings, 0 replies; 5+ messages in thread
From: Aneesh Kumar K.V @ 2017-01-16 16:42 UTC (permalink / raw)
  To: Anshuman Khandual, benh, paulus, mpe, Chris Smart, Christophe Leroy
  Cc: linuxppc-dev

Anshuman Khandual <khandual@linux.vnet.ibm.com> writes:

> On 12/13/2016 07:34 PM, Aneesh Kumar K.V wrote:
>> 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.
>
>> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size
  2016-12-13 14:04 [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size Aneesh Kumar K.V
  2017-01-04  0:18 ` Michael Neuling
  2017-01-16  6:55 ` Anshuman Khandual
@ 2017-01-18 12:10 ` Michael Ellerman
  2 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2017-01-18 12:10 UTC (permalink / raw)
  To: Aneesh Kumar K.V, benh, paulus, Chris Smart, Christophe Leroy
  Cc: linuxppc-dev, Aneesh Kumar K.V

On Tue, 2016-12-13 at 14:04:11 UTC, "Aneesh Kumar K.V" wrote:
> 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"
> Reported-by: Chris Smart <csmart@ozlabs.au.ibm.com>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Acked-By: Michael Neuling <mikey@neuling.org>

Applied to powerpc fixes, thanks.

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

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-18 12:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-13 14:04 [PATCH] powerpc/mm/hugetlb: Don't panic if we don't find the default huge page size Aneesh Kumar K.V
2017-01-04  0:18 ` Michael Neuling
2017-01-16  6:55 ` Anshuman Khandual
2017-01-16 16:42   ` Aneesh Kumar K.V
2017-01-18 12:10 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).