Re: [PATCH] arm64: mm: force write fault for atomic RMW instructions

From: Christoph Lameter (Ampere)
Date: Mon May 13 2024 - 18:40:03 EST


On Thu, 9 May 2024, Anshuman Khandual wrote:


Okay, I was about to ask, but is not calling get_user() for all data
read page faults increase the cost for a hot code path in general for
some potential savings for a very specific use case. Not sure if that
is worth the trade-off.

The instruction is cache hot since it must be present in the cpu cache for the fault. So the overhead is minimal.


But could not a pagefault_disable()-enable() window prevent concurring
page faults for the current process thus degrading its performance.

The cpu is already executing a fault handler in kernel space. There cannot be an additional user space fault since we do not execute that code currently.