Thread (29 messages) 29 messages, 3 authors, 2024-09-24

Re: [PATCH v4 09/13] mm: mremap: move_ptes() use pte_offset_map_rw_nolock()

From: Muchun Song <muchun.song@linux.dev>
Date: 2024-09-24 07:40:10
Also in: linux-arm-kernel, linux-mm, lkml

On Sep 24, 2024, at 14:10, Qi Zheng [off-list ref] 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 <redacted>
Reviewed-by: Muchun Song <muchun.song@linux.dev>


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help