Skip to content
Unverified Commit 542124fc authored by Yangyu Chen's avatar Yangyu Chen Committed by Palmer Dabbelt
Browse files

RISC-V: only flush icache when it has VM_EXEC set



As I-Cache flush on current RISC-V needs to send IPIs to every CPU cores
in the system is very costly, limiting flush_icache_mm to be called only
when vma->vm_flags has VM_EXEC can help minimize the frequency of these
operations. It improves performance and reduces disturbances when
copy_from_user_page is needed such as profiling with perf.

For I-D coherence concerns, it will not fail if such a page adds VM_EXEC
flags in the future since we have checked it in the __set_pte_at function.

Signed-off-by: default avatarYangyu Chen <cyy@cyyself.name>
Reviewed-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/tencent_6D851035F6F2FD0B5A69FB391AE39AC6300A@qq.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 84c3a079
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment