HomeFreeBSD

vm: read-locked fault handling for backing objects

Description

vm: read-locked fault handling for backing objects

This is almost the simplest patch which manages to avoid write locking
for backing objects, as a result mostly fixing vm object contention
problems.

What is not fixed:

  1. cacheline ping pong due to read-locks
  2. cacheline ping pong due to pip
  3. cacheling ping pong due to object busying
  4. write locking on first object

On top of it the use of VM_OBJECT_UNLOCK instead of explicitly tracking
the state is slower multithreaded that it needs to be, done for
simplicity for the time being.

Sample lock profiling results doing -j 104 buildkernel on tmpfs:
before:
71446200 (rw:vmobject)
14689706 (sx:vm map (user))
4166251 (rw:pmap pv list)
2799924 (spin mutex:turnstile chain)

after:
19940411 (rw:vmobject)
8166012 (rw:pmap pv list)
6017608 (sx:vm map (user))
1151416 (sleep mutex:pipe mutex)

Reviewed by: kib
Reviewed by: markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D38964

Details

Provenance
mjgAuthored on Mar 7 2023, 8:56 PM
Reviewer
kib
Differential Revision
D38964: vm: read-locked fault handling for backing objects ; simplest take
Parents
rGbdfd1adc9908: vm: add VM_OBJECT_UNLOCK
Branches
Unknown
Tags
Unknown