All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 0/2] fix some trivial bug involving the contiguous bit
@ 2016-12-14 14:19 ` zhongjiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: catalin.marinas, will.deacon, rrichter, mark.rutland, arnd,
	ard.biesheuvel, robh+dt, dwoods, jeremy.linton
  Cc: linux-arm-kernel, linux-kernel

From: zhong jiang <zhongjiang@huawei.com>

Hi,
    The following patch have sent it last week, but it fails to receive any reply.
These patch is simple but reasonable. I hope it can merge to next version. So, 
if anyone has any objection, just please let me know. 

Thanks
zhongjiang 

zhong jiang (2):
  arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE

 arch/arm64/Kconfig          | 1 +
 arch/arm64/mm/hugetlbpage.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
1.8.3.1

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

* [RESEND PATCH 0/2] fix some trivial bug involving the contiguous bit
@ 2016-12-14 14:19 ` zhongjiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: zhong jiang <zhongjiang@huawei.com>

Hi,
    The following patch have sent it last week, but it fails to receive any reply.
These patch is simple but reasonable. I hope it can merge to next version. So, 
if anyone has any objection, just please let me know. 

Thanks
zhongjiang 

zhong jiang (2):
  arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE

 arch/arm64/Kconfig          | 1 +
 arch/arm64/mm/hugetlbpage.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

-- 
1.8.3.1

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

* [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  2016-12-14 14:19 ` zhongjiang
@ 2016-12-14 14:19   ` zhongjiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: catalin.marinas, will.deacon, rrichter, mark.rutland, arnd,
	ard.biesheuvel, robh+dt, dwoods, jeremy.linton
  Cc: linux-arm-kernel, linux-kernel

From: zhong jiang <zhongjiang@huawei.com>

I think that CONT_PTE_SHIFT is more reasonable even if they are some
value. and the patch is not any functional change.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 arch/arm64/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 2e49bd2..0a4c97b 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
 static __init int add_default_hugepagesz(void)
 {
 	if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
-		hugetlb_add_hstate(CONT_PMD_SHIFT);
+		hugetlb_add_hstate(CONT_PTE_SHIFT);
 	return 0;
 }
 arch_initcall(add_default_hugepagesz);
-- 
1.8.3.1

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

* [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
@ 2016-12-14 14:19   ` zhongjiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: zhong jiang <zhongjiang@huawei.com>

I think that CONT_PTE_SHIFT is more reasonable even if they are some
value. and the patch is not any functional change.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 arch/arm64/mm/hugetlbpage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
index 2e49bd2..0a4c97b 100644
--- a/arch/arm64/mm/hugetlbpage.c
+++ b/arch/arm64/mm/hugetlbpage.c
@@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
 static __init int add_default_hugepagesz(void)
 {
 	if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
-		hugetlb_add_hstate(CONT_PMD_SHIFT);
+		hugetlb_add_hstate(CONT_PTE_SHIFT);
 	return 0;
 }
 arch_initcall(add_default_hugepagesz);
-- 
1.8.3.1

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
  2016-12-14 14:19 ` zhongjiang
@ 2016-12-14 14:19   ` zhongjiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: catalin.marinas, will.deacon, rrichter, mark.rutland, arnd,
	ard.biesheuvel, robh+dt, dwoods, jeremy.linton
  Cc: linux-arm-kernel, linux-kernel

From: zhong jiang <zhongjiang@huawei.com>

when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
fuctions should not be use. therefore, we add the dependency.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 969ef88..694ca73 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
 
 config ARCH_WANT_HUGE_PMD_SHARE
 	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
+	depends on HUGETLB_PAGE
 
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
-- 
1.8.3.1

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
@ 2016-12-14 14:19   ` zhongjiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhongjiang @ 2016-12-14 14:19 UTC (permalink / raw)
  To: linux-arm-kernel

From: zhong jiang <zhongjiang@huawei.com>

when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
fuctions should not be use. therefore, we add the dependency.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 arch/arm64/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 969ef88..694ca73 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
 
 config ARCH_WANT_HUGE_PMD_SHARE
 	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
+	depends on HUGETLB_PAGE
 
 config ARCH_HAS_CACHE_LINE_SIZE
 	def_bool y
-- 
1.8.3.1

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

* Re: [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  2016-12-14 14:19   ` zhongjiang
@ 2016-12-14 14:45     ` Ard Biesheuvel
  -1 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2016-12-14 14:45 UTC (permalink / raw)
  To: zhongjiang
  Cc: Catalin Marinas, Will Deacon, Robert Richter, Mark Rutland,
	Arnd Bergmann, Rob Herring, dwoods, Jeremy Linton,
	linux-arm-kernel, linux-kernel

On 14 December 2016 at 14:19, zhongjiang <zhongjiang@huawei.com> wrote:
> From: zhong jiang <zhongjiang@huawei.com>
>
> I think that CONT_PTE_SHIFT is more reasonable even if they are some
> value. and the patch is not any functional change.
>

This may be the case for 64k pages, but not for 16k pages, and I
actually think add_default_hugepagesz() could be made unconditional,
given that both 64k on 4k kernels and 2 MB on 16k kernels are useful
hugepage sizes that are not otherwise available by default.

> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  arch/arm64/mm/hugetlbpage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
> index 2e49bd2..0a4c97b 100644
> --- a/arch/arm64/mm/hugetlbpage.c
> +++ b/arch/arm64/mm/hugetlbpage.c
> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>  static __init int add_default_hugepagesz(void)
>  {
>         if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
> -               hugetlb_add_hstate(CONT_PMD_SHIFT);
> +               hugetlb_add_hstate(CONT_PTE_SHIFT);
>         return 0;
>  }
>  arch_initcall(add_default_hugepagesz);
> --
> 1.8.3.1
>

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

* [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
@ 2016-12-14 14:45     ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2016-12-14 14:45 UTC (permalink / raw)
  To: linux-arm-kernel

On 14 December 2016 at 14:19, zhongjiang <zhongjiang@huawei.com> wrote:
> From: zhong jiang <zhongjiang@huawei.com>
>
> I think that CONT_PTE_SHIFT is more reasonable even if they are some
> value. and the patch is not any functional change.
>

This may be the case for 64k pages, but not for 16k pages, and I
actually think add_default_hugepagesz() could be made unconditional,
given that both 64k on 4k kernels and 2 MB on 16k kernels are useful
hugepage sizes that are not otherwise available by default.

> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  arch/arm64/mm/hugetlbpage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
> index 2e49bd2..0a4c97b 100644
> --- a/arch/arm64/mm/hugetlbpage.c
> +++ b/arch/arm64/mm/hugetlbpage.c
> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>  static __init int add_default_hugepagesz(void)
>  {
>         if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
> -               hugetlb_add_hstate(CONT_PMD_SHIFT);
> +               hugetlb_add_hstate(CONT_PTE_SHIFT);
>         return 0;
>  }
>  arch_initcall(add_default_hugepagesz);
> --
> 1.8.3.1
>

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

* Re: [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  2016-12-14 14:45     ` Ard Biesheuvel
@ 2016-12-15  2:59       ` zhong jiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-15  2:59 UTC (permalink / raw)
  To: Ard Biesheuvel
  Cc: Catalin Marinas, Will Deacon, Robert Richter, Mark Rutland,
	Arnd Bergmann, Rob Herring, dwoods, Jeremy Linton,
	linux-arm-kernel, linux-kernel

On 2016/12/14 22:45, Ard Biesheuvel wrote:
> On 14 December 2016 at 14:19, zhongjiang <zhongjiang@huawei.com> wrote:
>> From: zhong jiang <zhongjiang@huawei.com>
>>
>> I think that CONT_PTE_SHIFT is more reasonable even if they are some
>> value. and the patch is not any functional change.
>>
> This may be the case for 64k pages, but not for 16k pages, and I
> actually think add_default_hugepagesz() could be made unconditional,
> given that both 64k on 4k kernels and 2 MB on 16k kernels are useful
> hugepage sizes that are not otherwise available by default.
 I agree that we can make add_default_hugepagesz() to be unconditional.
 but I do not know the history why it did so at that time. The patch
 just is based on the current kernel.

 by the way, please review the second patch if you have time. Any comment
 will be welcomed.

 Thanks
 zhongjiang
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
>> ---
>>  arch/arm64/mm/hugetlbpage.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
>> index 2e49bd2..0a4c97b 100644
>> --- a/arch/arm64/mm/hugetlbpage.c
>> +++ b/arch/arm64/mm/hugetlbpage.c
>> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>>  static __init int add_default_hugepagesz(void)
>>  {
>>         if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
>> -               hugetlb_add_hstate(CONT_PMD_SHIFT);
>> +               hugetlb_add_hstate(CONT_PTE_SHIFT);
>>         return 0;
>>  }
>>  arch_initcall(add_default_hugepagesz);
>> --
>> 1.8.3.1
>>
> .
>

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

* [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
@ 2016-12-15  2:59       ` zhong jiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-15  2:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 2016/12/14 22:45, Ard Biesheuvel wrote:
> On 14 December 2016 at 14:19, zhongjiang <zhongjiang@huawei.com> wrote:
>> From: zhong jiang <zhongjiang@huawei.com>
>>
>> I think that CONT_PTE_SHIFT is more reasonable even if they are some
>> value. and the patch is not any functional change.
>>
> This may be the case for 64k pages, but not for 16k pages, and I
> actually think add_default_hugepagesz() could be made unconditional,
> given that both 64k on 4k kernels and 2 MB on 16k kernels are useful
> hugepage sizes that are not otherwise available by default.
 I agree that we can make add_default_hugepagesz() to be unconditional.
 but I do not know the history why it did so at that time. The patch
 just is based on the current kernel.

 by the way, please review the second patch if you have time. Any comment
 will be welcomed.

 Thanks
 zhongjiang
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
>> ---
>>  arch/arm64/mm/hugetlbpage.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
>> index 2e49bd2..0a4c97b 100644
>> --- a/arch/arm64/mm/hugetlbpage.c
>> +++ b/arch/arm64/mm/hugetlbpage.c
>> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>>  static __init int add_default_hugepagesz(void)
>>  {
>>         if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
>> -               hugetlb_add_hstate(CONT_PMD_SHIFT);
>> +               hugetlb_add_hstate(CONT_PTE_SHIFT);
>>         return 0;
>>  }
>>  arch_initcall(add_default_hugepagesz);
>> --
>> 1.8.3.1
>>
> .
>

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

* Re: [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
  2016-12-14 14:19   ` zhongjiang
@ 2016-12-16  9:10     ` zhong jiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16  9:10 UTC (permalink / raw)
  To: catalin.marinas, will.deacon, rrichter, mark.rutland, arnd,
	ard.biesheuvel, robh+dt, dwoods, jeremy.linton
  Cc: linux-arm-kernel, linux-kernel

On 2016/12/14 22:19, zhongjiang wrote:
> From: zhong jiang <zhongjiang@huawei.com>
>
> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
> fuctions should not be use. therefore, we add the dependency.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  arch/arm64/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 969ef88..694ca73 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>  
>  config ARCH_WANT_HUGE_PMD_SHARE
>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
> +	depends on HUGETLB_PAGE
>  
>  config ARCH_HAS_CACHE_LINE_SIZE
>  	def_bool y
Hi,
      I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
 when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
 huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
 exported.  is it right ??

Thanks
zhongjiang

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
@ 2016-12-16  9:10     ` zhong jiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16  9:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 2016/12/14 22:19, zhongjiang wrote:
> From: zhong jiang <zhongjiang@huawei.com>
>
> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
> fuctions should not be use. therefore, we add the dependency.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  arch/arm64/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 969ef88..694ca73 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>  
>  config ARCH_WANT_HUGE_PMD_SHARE
>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
> +	depends on HUGETLB_PAGE
>  
>  config ARCH_HAS_CACHE_LINE_SIZE
>  	def_bool y
Hi,
      I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
 when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
 huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
 exported.  is it right ??

Thanks
zhongjiang

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

* Re: [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
  2016-12-16  9:10     ` zhong jiang
@ 2016-12-16 12:35       ` Will Deacon
  -1 siblings, 0 replies; 20+ messages in thread
From: Will Deacon @ 2016-12-16 12:35 UTC (permalink / raw)
  To: zhong jiang
  Cc: catalin.marinas, rrichter, mark.rutland, arnd, ard.biesheuvel,
	robh+dt, dwoods, jeremy.linton, linux-arm-kernel, linux-kernel

On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
> On 2016/12/14 22:19, zhongjiang wrote:
> > From: zhong jiang <zhongjiang@huawei.com>
> >
> > when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
> > fuctions should not be use. therefore, we add the dependency.
> >
> > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> > ---
> >  arch/arm64/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 969ef88..694ca73 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
> >  
> >  config ARCH_WANT_HUGE_PMD_SHARE
> >  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
> > +	depends on HUGETLB_PAGE
> >  
> >  config ARCH_HAS_CACHE_LINE_SIZE
> >  	def_bool y
> Hi,
>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>  exported.  is it right ??

The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:

arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */

and neither of those files are compiled if !HUGETLB_PAGE.

Are you actually seeing a problem here?

Will

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
@ 2016-12-16 12:35       ` Will Deacon
  0 siblings, 0 replies; 20+ messages in thread
From: Will Deacon @ 2016-12-16 12:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
> On 2016/12/14 22:19, zhongjiang wrote:
> > From: zhong jiang <zhongjiang@huawei.com>
> >
> > when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
> > fuctions should not be use. therefore, we add the dependency.
> >
> > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> > ---
> >  arch/arm64/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index 969ef88..694ca73 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
> >  
> >  config ARCH_WANT_HUGE_PMD_SHARE
> >  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
> > +	depends on HUGETLB_PAGE
> >  
> >  config ARCH_HAS_CACHE_LINE_SIZE
> >  	def_bool y
> Hi,
>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>  exported.  is it right ??

The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:

arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */

and neither of those files are compiled if !HUGETLB_PAGE.

Are you actually seeing a problem here?

Will

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

* Re: [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
  2016-12-16 12:35       ` Will Deacon
@ 2016-12-16 12:56         ` zhong jiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16 12:56 UTC (permalink / raw)
  To: Will Deacon
  Cc: catalin.marinas, rrichter, mark.rutland, arnd, ard.biesheuvel,
	robh+dt, dwoods, jeremy.linton, linux-arm-kernel, linux-kernel

On 2016/12/16 20:35, Will Deacon wrote:
> On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
>> On 2016/12/14 22:19, zhongjiang wrote:
>>> From: zhong jiang <zhongjiang@huawei.com>
>>>
>>> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
>>> fuctions should not be use. therefore, we add the dependency.
>>>
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>>  arch/arm64/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>> index 969ef88..694ca73 100644
>>> --- a/arch/arm64/Kconfig
>>> +++ b/arch/arm64/Kconfig
>>> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>>>  
>>>  config ARCH_WANT_HUGE_PMD_SHARE
>>>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
>>> +	depends on HUGETLB_PAGE
>>>  
>>>  config ARCH_HAS_CACHE_LINE_SIZE
>>>  	def_bool y
>> Hi,
>>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>>  exported.  is it right ??
> The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:
>
> arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
  yes
> mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
>
> and neither of those files are compiled if !HUGETLB_PAGE.
  Indeed, but  The only users maybe use it  if !HUGETLB_PAGE. 
  because  include/linux/hugetlb.h  can not export the reference if !HUGETLB_PAGE.
  IOW,  the function is not definition.  

  is it right ? or I miss the key point.
> Are you actually seeing a problem here?
  I review the code and find the issue.

 Thanks
 zhongjiang
> Will
>
> .
>

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
@ 2016-12-16 12:56         ` zhong jiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

On 2016/12/16 20:35, Will Deacon wrote:
> On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
>> On 2016/12/14 22:19, zhongjiang wrote:
>>> From: zhong jiang <zhongjiang@huawei.com>
>>>
>>> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
>>> fuctions should not be use. therefore, we add the dependency.
>>>
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>>  arch/arm64/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>> index 969ef88..694ca73 100644
>>> --- a/arch/arm64/Kconfig
>>> +++ b/arch/arm64/Kconfig
>>> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>>>  
>>>  config ARCH_WANT_HUGE_PMD_SHARE
>>>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
>>> +	depends on HUGETLB_PAGE
>>>  
>>>  config ARCH_HAS_CACHE_LINE_SIZE
>>>  	def_bool y
>> Hi,
>>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>>  exported.  is it right ??
> The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:
>
> arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
  yes
> mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
>
> and neither of those files are compiled if !HUGETLB_PAGE.
  Indeed, but  The only users maybe use it  if !HUGETLB_PAGE. 
  because  include/linux/hugetlb.h  can not export the reference if !HUGETLB_PAGE.
  IOW,  the function is not definition.  

  is it right ? or I miss the key point.
> Are you actually seeing a problem here?
  I review the code and find the issue.

 Thanks
 zhongjiang
> Will
>
> .
>

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

* Re: [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
  2016-12-16 12:35       ` Will Deacon
@ 2016-12-16 14:08         ` zhong jiang
  -1 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16 14:08 UTC (permalink / raw)
  To: Will Deacon
  Cc: catalin.marinas, rrichter, mark.rutland, arnd, ard.biesheuvel,
	robh+dt, dwoods, jeremy.linton, linux-arm-kernel, linux-kernel

On 2016/12/16 20:35, Will Deacon wrote:
> On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
>> On 2016/12/14 22:19, zhongjiang wrote:
>>> From: zhong jiang <zhongjiang@huawei.com>
>>>
>>> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
>>> fuctions should not be use. therefore, we add the dependency.
>>>
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>>  arch/arm64/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>> index 969ef88..694ca73 100644
>>> --- a/arch/arm64/Kconfig
>>> +++ b/arch/arm64/Kconfig
>>> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>>>  
>>>  config ARCH_WANT_HUGE_PMD_SHARE
>>>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
>>> +	depends on HUGETLB_PAGE
>>>  
>>>  config ARCH_HAS_CACHE_LINE_SIZE
>>>  	def_bool y
>> Hi,
>>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>>  exported.  is it right ??
> The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:
>
> arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
> mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
>
> and neither of those files are compiled if !HUGETLB_PAGE.
>
> Are you actually seeing a problem here?
>
> Will
>
> .
>
  I got it.  Please forget the  stupid patch and my stupid comments.
 
 but the first patch look reasonable.  Is it accepted  ?

 Thanks
 zhongjiang

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

* [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE
@ 2016-12-16 14:08         ` zhong jiang
  0 siblings, 0 replies; 20+ messages in thread
From: zhong jiang @ 2016-12-16 14:08 UTC (permalink / raw)
  To: linux-arm-kernel

On 2016/12/16 20:35, Will Deacon wrote:
> On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
>> On 2016/12/14 22:19, zhongjiang wrote:
>>> From: zhong jiang <zhongjiang@huawei.com>
>>>
>>> when HUGETLB_PAGE is disable, WANT_HUGE_PMD_SHARE contains the
>>> fuctions should not be use. therefore, we add the dependency.
>>>
>>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>>> ---
>>>  arch/arm64/Kconfig | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>>> index 969ef88..694ca73 100644
>>> --- a/arch/arm64/Kconfig
>>> +++ b/arch/arm64/Kconfig
>>> @@ -640,6 +640,7 @@ config SYS_SUPPORTS_HUGETLBFS
>>>  
>>>  config ARCH_WANT_HUGE_PMD_SHARE
>>>  	def_bool y if ARM64_4K_PAGES || (ARM64_16K_PAGES && !ARM64_VA_BITS_36)
>>> +	depends on HUGETLB_PAGE
>>>  
>>>  config ARCH_HAS_CACHE_LINE_SIZE
>>>  	def_bool y
>> Hi,
>>       I still think it is a issue. Perhaps above changelog is unclear.  Further explain is as follows.
>>  when hugetlb_pages is disable and arch_want_huge_pmd_share is enable,   we maybe call
>>  huge_pmd_sahre in hugetlbpage.c, but the function actually is not definition as it is not
>>  exported.  is it right ??
> The only users of ARCH_WANT_HUGE_PMD_SHARE on arm64 are:
>
> arch/arm64/mm/hugetlbpage.c:            if (IS_ENABLED(CONFIG_ARCH_WANT_HUGE_PMD_SHARE) &&
> mm/hugetlb.c:#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE
> mm/hugetlb.c:#else /* !CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
> mm/hugetlb.c:#endif /* CONFIG_ARCH_WANT_HUGE_PMD_SHARE */
>
> and neither of those files are compiled if !HUGETLB_PAGE.
>
> Are you actually seeing a problem here?
>
> Will
>
> .
>
  I got it.  Please forget the  stupid patch and my stupid comments.
 
 but the first patch look reasonable.  Is it accepted  ?

 Thanks
 zhongjiang

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

* Re: [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
  2016-12-14 14:19   ` zhongjiang
@ 2017-01-03 12:31     ` Catalin Marinas
  -1 siblings, 0 replies; 20+ messages in thread
From: Catalin Marinas @ 2017-01-03 12:31 UTC (permalink / raw)
  To: zhongjiang
  Cc: will.deacon, rrichter, mark.rutland, arnd, ard.biesheuvel,
	robh+dt, dwoods, jeremy.linton, linux-kernel, linux-arm-kernel

On Wed, Dec 14, 2016 at 10:19:10PM +0800, zhongjiang wrote:
> From: zhong jiang <zhongjiang@huawei.com>
> 
> I think that CONT_PTE_SHIFT is more reasonable even if they are some
> value. and the patch is not any functional change.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  arch/arm64/mm/hugetlbpage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
> index 2e49bd2..0a4c97b 100644
> --- a/arch/arm64/mm/hugetlbpage.c
> +++ b/arch/arm64/mm/hugetlbpage.c
> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>  static __init int add_default_hugepagesz(void)
>  {
>  	if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
> -		hugetlb_add_hstate(CONT_PMD_SHIFT);
> +		hugetlb_add_hstate(CONT_PTE_SHIFT);
>  	return 0;
>  }
>  arch_initcall(add_default_hugepagesz);

It looks like I fixed this already when I merged some other hugetlb
patches. See commit 6ed0038d5ecb ("arm64: Fix typo in
add_default_hugepagesz() for 64K pages").

-- 
Catalin

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

* [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT
@ 2017-01-03 12:31     ` Catalin Marinas
  0 siblings, 0 replies; 20+ messages in thread
From: Catalin Marinas @ 2017-01-03 12:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 14, 2016 at 10:19:10PM +0800, zhongjiang wrote:
> From: zhong jiang <zhongjiang@huawei.com>
> 
> I think that CONT_PTE_SHIFT is more reasonable even if they are some
> value. and the patch is not any functional change.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  arch/arm64/mm/hugetlbpage.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/mm/hugetlbpage.c b/arch/arm64/mm/hugetlbpage.c
> index 2e49bd2..0a4c97b 100644
> --- a/arch/arm64/mm/hugetlbpage.c
> +++ b/arch/arm64/mm/hugetlbpage.c
> @@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)
>  static __init int add_default_hugepagesz(void)
>  {
>  	if (size_to_hstate(CONT_PTES * PAGE_SIZE) == NULL)
> -		hugetlb_add_hstate(CONT_PMD_SHIFT);
> +		hugetlb_add_hstate(CONT_PTE_SHIFT);
>  	return 0;
>  }
>  arch_initcall(add_default_hugepagesz);

It looks like I fixed this already when I merged some other hugetlb
patches. See commit 6ed0038d5ecb ("arm64: Fix typo in
add_default_hugepagesz() for 64K pages").

-- 
Catalin

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

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

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 14:19 [RESEND PATCH 0/2] fix some trivial bug involving the contiguous bit zhongjiang
2016-12-14 14:19 ` zhongjiang
2016-12-14 14:19 ` [RESEND PATCH 1/2] arm64: change from CONT_PMD_SHIFT to CONT_PTE_SHIFT zhongjiang
2016-12-14 14:19   ` zhongjiang
2016-12-14 14:45   ` Ard Biesheuvel
2016-12-14 14:45     ` Ard Biesheuvel
2016-12-15  2:59     ` zhong jiang
2016-12-15  2:59       ` zhong jiang
2017-01-03 12:31   ` Catalin Marinas
2017-01-03 12:31     ` Catalin Marinas
2016-12-14 14:19 ` [RESEND PATCH 2/2] arm64: make WANT_HUGE_PMD_SHARE depends on HUGETLB_PAGE zhongjiang
2016-12-14 14:19   ` zhongjiang
2016-12-16  9:10   ` zhong jiang
2016-12-16  9:10     ` zhong jiang
2016-12-16 12:35     ` Will Deacon
2016-12-16 12:35       ` Will Deacon
2016-12-16 12:56       ` zhong jiang
2016-12-16 12:56         ` zhong jiang
2016-12-16 14:08       ` zhong jiang
2016-12-16 14:08         ` zhong jiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.