linux/mm/damon
SeongJae Park b93af2cc8e mm/damon/vaddr: do not repeat pte_offset_map_lock() until success
DAMON's virtual address space operation set implementation (vaddr) calls
pte_offset_map_lock() inside the page table walk callback function.  This
is for reading and writing page table accessed bits.  If
pte_offset_map_lock() fails, it retries by returning the page table walk
callback function with ACTION_AGAIN.

pte_offset_map_lock() can continuously fail if the target is a pmd
migration entry, though.  Hence it could cause an infinite page table walk
if the migration cannot be done until the page table walk is finished. 
This indeed caused a soft lockup when CPU hotplugging and DAMON were
running in parallel.

Avoid the infinite loop by simply not retrying the page table walk.  DAMON
is promising only a best-effort accuracy, so missing access to such pages
is no problem.

Link: https://lkml.kernel.org/r/20250930004410.55228-1-sj@kernel.org
Fixes: 7780d04046 ("mm/pagewalkers: ACTION_AGAIN if pte_offset_map_lock() fails")
Signed-off-by: SeongJae Park <sj@kernel.org>
Reported-by: Xinyu Zheng <zhengxinyu6@huawei.com>
Closes: https://lore.kernel.org/20250918030029.2652607-1-zhengxinyu6@huawei.com
Acked-by: Hugh Dickins <hughd@google.com>
Cc: <stable@vger.kernel.org>	[6.5+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-10-07 14:01:12 -07:00
..
tests mm/damon: add damon_ctx->min_sz_region 2025-09-13 16:55:24 -07:00
Kconfig mm/damon/Kconfig: make DAMON_STAT_ENABLED_DEFAULT depend on DAMON_STAT 2025-09-13 16:55:07 -07:00
Makefile
core.c mm/damon/core: implement damon_initialized() function 2025-09-21 14:22:37 -07:00
lru_sort.c mm/damon/lru_sort: use damon_initialized() 2025-09-21 14:22:38 -07:00
modules-common.c
modules-common.h
ops-common.c mm: remove redundant __GFP_NOWARN 2025-09-13 16:54:58 -07:00
ops-common.h mm/damon/paddr: move filters existence check function to ops-common 2025-09-13 16:54:47 -07:00
paddr.c mm/damon/paddr: support addr_unit for DAMOS_STAT 2025-09-13 16:55:23 -07:00
reclaim.c mm/damon/reclaim: use damon_initialized() 2025-09-21 14:22:38 -07:00
stat.c mm/damon/stat: expose negative idle time 2025-09-21 14:22:39 -07:00
sysfs-common.c
sysfs-common.h
sysfs-schemes.c mm/damon/sysfs-schemes: put damos dests dir after removing its files 2025-08-19 16:35:57 -07:00
sysfs.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
vaddr.c mm/damon/vaddr: do not repeat pte_offset_map_lock() until success 2025-10-07 14:01:12 -07:00