[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <EF701BDB-5742-417C-AAC3-99EF12997DFB@linux.dev>
Date: Tue, 24 Sep 2024 15:39:21 +0800
From: Muchun Song <muchun.song@...ux.dev>
To: Qi Zheng <zhengqi.arch@...edance.com>
Cc: david@...hat.com,
hughd@...gle.com,
willy@...radead.org,
vbabka@...nel.org,
akpm@...ux-foundation.org,
rppt@...nel.org,
vishal.moola@...il.com,
peterx@...hat.com,
ryan.roberts@....com,
christophe.leroy2@...soprasteria.com,
linux-kernel@...r.kernel.org,
linux-mm@...ck.org,
linux-arm-kernel@...ts.infradead.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH v4 09/13] mm: mremap: move_ptes() use
pte_offset_map_rw_nolock()
> On Sep 24, 2024, at 14:10, Qi Zheng <zhengqi.arch@...edance.com> wrote:
>
> In move_ptes(), we may modify the new_pte after acquiring the new_ptl, so
> convert it to using pte_offset_map_rw_nolock(). Now new_pte is none, so
> hpage_collapse_scan_file() path can not find this by traversing
> file->f_mapping, so there is no concurrency with retract_page_tables(). In
> addition, we already hold the exclusive mmap_lock, so this new_pte page is
> stable, so there is no need to get pmdval and do pmd_same() check.
>
> Signed-off-by: Qi Zheng <zhengqi.arch@...edance.com>
Reviewed-by: Muchun Song <muchun.song@...ux.dev>
Powered by blists - more mailing lists