2022-10-21 16:52:22

by James Houghton

[permalink] [raw]
Subject: [RFC PATCH v2 03/47] hugetlb: remove redundant pte_mkhuge in migration path

arch_make_huge_pte, which is called immediately following pte_mkhuge,
already makes the necessary changes to the PTE that pte_mkhuge would
have. The generic implementation of arch_make_huge_pte simply calls
pte_mkhuge.

Signed-off-by: James Houghton <[email protected]>
---
mm/migrate.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 8e5eb6ed9da2..1457cdbb7828 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -237,7 +237,6 @@ static bool remove_migration_pte(struct folio *folio,
if (folio_test_hugetlb(folio)) {
unsigned int shift = huge_page_shift(hstate_vma(vma));

- pte = pte_mkhuge(pte);
pte = arch_make_huge_pte(pte, shift, vma->vm_flags);
if (folio_test_anon(folio))
hugepage_add_anon_rmap(new, vma, pvmw.address,
--
2.38.0.135.g90850a2211-goog


2022-11-16 17:05:11

by Peter Xu

[permalink] [raw]
Subject: Re: [RFC PATCH v2 03/47] hugetlb: remove redundant pte_mkhuge in migration path

On Fri, Oct 21, 2022 at 04:36:19PM +0000, James Houghton wrote:
> arch_make_huge_pte, which is called immediately following pte_mkhuge,
> already makes the necessary changes to the PTE that pte_mkhuge would
> have. The generic implementation of arch_make_huge_pte simply calls
> pte_mkhuge.
>
> Signed-off-by: James Houghton <[email protected]>

Acked-by: Peter Xu <[email protected]>

--
Peter Xu


2022-12-08 00:31:04

by Mina Almasry

[permalink] [raw]
Subject: Re: [RFC PATCH v2 03/47] hugetlb: remove redundant pte_mkhuge in migration path

On Fri, Oct 21, 2022 at 9:37 AM James Houghton <[email protected]> wrote:
>
> arch_make_huge_pte, which is called immediately following pte_mkhuge,
> already makes the necessary changes to the PTE that pte_mkhuge would
> have. The generic implementation of arch_make_huge_pte simply calls
> pte_mkhuge.
>
> Signed-off-by: James Houghton <[email protected]>

Acked-by: Mina Almasry <[email protected]>

> ---
> mm/migrate.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/mm/migrate.c b/mm/migrate.c
> index 8e5eb6ed9da2..1457cdbb7828 100644
> --- a/mm/migrate.c
> +++ b/mm/migrate.c
> @@ -237,7 +237,6 @@ static bool remove_migration_pte(struct folio *folio,
> if (folio_test_hugetlb(folio)) {
> unsigned int shift = huge_page_shift(hstate_vma(vma));
>
> - pte = pte_mkhuge(pte);
> pte = arch_make_huge_pte(pte, shift, vma->vm_flags);
> if (folio_test_anon(folio))
> hugepage_add_anon_rmap(new, vma, pvmw.address,
> --
> 2.38.0.135.g90850a2211-goog
>

2022-12-09 00:16:07

by Mike Kravetz

[permalink] [raw]
Subject: Re: [RFC PATCH v2 03/47] hugetlb: remove redundant pte_mkhuge in migration path

On 10/21/22 16:36, James Houghton wrote:
> arch_make_huge_pte, which is called immediately following pte_mkhuge,
> already makes the necessary changes to the PTE that pte_mkhuge would
> have. The generic implementation of arch_make_huge_pte simply calls
> pte_mkhuge.
>
> Signed-off-by: James Houghton <[email protected]>
> ---
> mm/migrate.c | 1 -
> 1 file changed, 1 deletion(-)

Thanks,

Reviewed-by: Mike Kravetz <[email protected]>

--
Mike Kravetz