[RFC PATCH] mm/mempolicy: NUMA mempolicy mismatch during remote access

From: Lin Ruifeng

Date: Mon Mar 16 2026 - 08:15:54 EST


I'd like to report an issue in the SVA I/O Page Fault (IOPF) handling path:
a NUMA memory policy mismatch caused by deferred workqueue processing.

When hardware triggers a page fault via the IOMMU SVA mechanism, it's handled
asynchronously by a kworker thread. Although the fault handler correctly uses
the original process's mm_struct for address space mapping, the physical page
allocation (e.g., in do_anonymous_page()) still depends on current->mempolicy.

Since current here is the kworker, not the original user process, any
task-level NUMA policy (e.g., set_mempolicy() or numactl --membind) is
completely ignored. Instead, allocation follows the kworker's default policy,
which may run on a different NUMA node.

A similar issue was also discussed in [1]. I was wondering if you might have
any suggestions on how to address this issue.

Link: https://lore.kernel.org/linux-mm/e2d5f3a5-f6f1-4567-a162-a0e814292738@xxxxxxxxxxxxx/
Signed-off-by: Lin Ruifeng <linruifeng4@xxxxxxxxxx>
2.43.0