Rework the pmap ASID handling to not require the SCHED_LOCK
authorclaudio <claudio@openbsd.org>
Tue, 28 May 2024 15:16:45 +0000 (15:16 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 28 May 2024 15:16:45 +0000 (15:16 +0000)
commitfd80d490cad08bcc629af7882a6ddca20b058f8e
tree49dd9d3888e99a8fd61d5782b8a6373fded52fff
parent2b099f454757cc2a6fb0034e96eab7f74aac3e0c
Rework the pmap ASID handling to not require the SCHED_LOCK

The ASID lookup code already uses its own mutex (pmap_asid_mtx)
and this mutex is enough to ensure that pmap_rollover_asid()
is safe. Now only the generation number check in pmap_setttb()
is done without the lock but the update of the pmap_asid_gen
is now atomic so using READ_ONCE there is enough.

OK kettenis@ mpi@
sys/arch/arm64/arm64/pmap.c