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

Christoph Lameter (Ampere) cl at gentwo.org
Mon May 13 15:39:46 PDT 2024


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.





More information about the linux-arm-kernel mailing list