From: zhong jiang <redacted>
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
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On 14 December 2016 at 14:19, zhongjiang [off-list ref] wrote:
From: zhong jiang <redacted>
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.
On 14 December 2016 at 14:19, zhongjiang [off-list ref] wrote:
quoted
From: zhong jiang <redacted>
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
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
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
From: Will Deacon <hidden> Date: 2016-12-16 12:35:17
On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
On 2016/12/14 22:19, zhongjiang wrote:
quoted
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
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
On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
quoted
On 2016/12/14 22:19, zhongjiang wrote:
quoted
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
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
On Fri, Dec 16, 2016 at 05:10:05PM +0800, zhong jiang wrote:
quoted
On 2016/12/14 22:19, zhongjiang wrote:
quoted
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/Kconfig | 1 +
1 file changed, 1 insertion(+)
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
On Wed, Dec 14, 2016 at 10:19:10PM +0800, zhongjiang wrote:
quoted hunk
From: zhong jiang <redacted>
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 <redacted>
---
arch/arm64/mm/hugetlbpage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -323,7 +323,7 @@ static __init int setup_hugepagesz(char *opt)static__initintadd_default_hugepagesz(void){if(size_to_hstate(CONT_PTES*PAGE_SIZE)==NULL)-hugetlb_add_hstate(CONT_PMD_SHIFT);+hugetlb_add_hstate(CONT_PTE_SHIFT);return0;}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