[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cbaf817-7a33-42d8-ba39-fa1b448266f6@redhat.com>
Date: Wed, 11 Jun 2025 15:23:11 +0200
From: David Hildenbrand <david@...hat.com>
To: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org
Cc: Liam.Howlett@...cle.com, lorenzo.stoakes@...cle.com, vbabka@...e.cz,
jannh@...gle.com, pfalcato@...e.de, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, peterx@...hat.com, ryan.roberts@....com,
mingo@...nel.org, libang.li@...group.com, maobibo@...ngson.cn,
zhengqi.arch@...edance.com, baohua@...nel.org, anshuman.khandual@....com,
willy@...radead.org, ioworker0@...il.com, yang@...amperecomputing.com,
baolin.wang@...ux.alibaba.com, ziy@...dia.com, hughd@...gle.com
Subject: Re: [PATCH v4 1/2] mm: Call pointers to ptes as ptep
On 10.06.25 05:50, Dev Jain wrote:
> Avoid confusion between pte_t* and pte_t data types by suffixing pointer
> type variables with p. No functional change.
>
> Reviewed-by: Barry Song <baohua@...nel.org>
> Reviewed-by: Anshuman Khandual <anshuman.khandual@....com>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
> Signed-off-by: Dev Jain <dev.jain@....com>
> ---
> mm/mremap.c | 31 ++++++++++++++++---------------
> 1 file changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/mm/mremap.c b/mm/mremap.c
> index 60f6b8d0d5f0..180b12225368 100644
> --- a/mm/mremap.c
> +++ b/mm/mremap.c
> @@ -176,7 +176,8 @@ static int move_ptes(struct pagetable_move_control *pmc,
> struct vm_area_struct *vma = pmc->old;
> bool need_clear_uffd_wp = vma_has_uffd_without_event_remap(vma);
> struct mm_struct *mm = vma->vm_mm;
> - pte_t *old_pte, *new_pte, pte;
> + pte_t *old_ptep, *new_ptep;
> + pte_t pte;
Could have left that on the same line ...
> pmd_t dummy_pmdval;
> spinlock_t *old_ptl, *new_ptl;
> bool force_flush = false;
> @@ -211,8 +212,8 @@ static int move_ptes(struct pagetable_move_control *pmc,
> * We don't have to worry about the ordering of src and dst
> * pte locks because exclusive mmap_lock prevents deadlock.
> */
> - old_pte = pte_offset_map_lock(mm, old_pmd, old_addr, &old_ptl);
> - if (!old_pte) {
> + old_ptep = pte_offset_map_lock(mm, old_pmd, old_addr, &old_ptl);
> + if (!old_ptep) {
> err = -EAGAIN;
One of those things that's completely inconsistent all over the place.
But yeah, I agree that ptep is much better for a PTE pointer.
Acked-by: David Hildenbrand <david@...hat.com>
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists