Page MenuHomeFreeBSD

Reduce the scope of the object lock in fault.
ClosedPublic

Authored by jeff on Oct 15 2019, 4:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 28, 9:56 AM
Unknown Object (File)
Wed, Jul 23, 10:29 AM
Unknown Object (File)
Sun, Jul 6, 10:59 AM
Unknown Object (File)
Fri, Jul 4, 5:11 PM
Unknown Object (File)
Jun 23 2025, 6:21 AM
Unknown Object (File)
Jun 20 2025, 6:11 AM
Unknown Object (File)
Jun 18 2025, 3:37 AM
Unknown Object (File)
Jun 9 2025, 7:37 PM
Subscribers

Details

Summary

This avoids reacquiring the object lock after fault is complete because we can now unbusy and pip wakeup without it.

It also releases the lock earlier in CoW and avoids an expensive copy while the object lock is held.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jeff added reviewers: kib, markj, alc.

I find the names fault_deallocate() and unlock_and_deallocate() confusing. I don't have a good alternative at the moment though.

sys/vm/vm_fault.c
193 ↗(On Diff #63284)

Presumably this unlock can also be moved up?

This revision is now accepted and ready to land.Oct 15 2019, 2:42 PM
kib added inline comments.
sys/vm/vm_fault.c
185 ↗(On Diff #63284)

I would suggest faultstate_deallocate.