From: Martin Pieuchot Subject: pgo_reference vs KERNEL_LOCK() To: tech@openbsd.org Date: Sat, 2 Nov 2024 21:40:11 +0100 Since page faults are executed in parallel, all pgo_reference() implementations are safe to be executed w/o KERNEL_LOCK(). ok? Index: uvm/uvm_map.c =================================================================== RCS file: /cvs/src/sys/uvm/uvm_map.c,v diff -u -p -r1.333 uvm_map.c --- uvm/uvm_map.c 31 Oct 2024 05:00:00 -0000 1.333 +++ uvm/uvm_map.c 2 Nov 2024 20:35:23 -0000 @@ -2593,10 +2593,8 @@ uvm_map_splitentry(struct vm_map *map, s } else if (UVM_ET_ISOBJ(orig)) { if (next->object.uvm_obj->pgops && next->object.uvm_obj->pgops->pgo_reference) { - KERNEL_LOCK(); next->object.uvm_obj->pgops->pgo_reference( next->object.uvm_obj); - KERNEL_UNLOCK(); } next->offset += adj; }