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)
Wed, Oct 8, 6:02 AM
Unknown Object (File)
Mon, Oct 6, 7:50 PM
Unknown Object (File)
Fri, Oct 3, 5:22 PM
Unknown Object (File)
Sun, Sep 28, 9:18 PM
Unknown Object (File)
Thu, Sep 25, 11:13 PM
Unknown Object (File)
Sun, Sep 21, 5:59 AM
Unknown Object (File)
Sun, Sep 21, 5:53 AM
Unknown Object (File)
Sat, Sep 20, 1:48 AM
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.