Page MenuHomeFreeBSD

Move map relookup into its own function.
ClosedPublic

Authored by jeff on Jan 21 2020, 7:42 PM.
Tags
None
Referenced Files
F151222654: D23303.diff
Mon, Apr 6, 11:10 PM
Unknown Object (File)
Sun, Apr 5, 5:33 PM
Unknown Object (File)
Thu, Apr 2, 7:40 AM
Unknown Object (File)
Sat, Mar 28, 2:27 AM
Unknown Object (File)
Thu, Mar 26, 10:00 AM
Unknown Object (File)
Thu, Mar 26, 12:14 AM
Unknown Object (File)
Wed, Mar 25, 1:20 PM
Unknown Object (File)
Mon, Mar 23, 1:28 AM
Subscribers

Details

Summary

The map revalidation is hopefully rare so we could possibly even noinline or predict_false() the call.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28825
Build 26833: arc lint + arc unit

Event Timeline

jeff added reviewers: alc, dougm, kib, markj.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
sys/vm/vm_fault.c
810

You could reduce indent below by doing

if (fs->map->timestamp == fs->map_generation)
           return (KERN_SUCCESS);

there

826

What is KERN_RESTART ?

sys/vm/vm_fault.c
810

Yeah I also prefer to lessen indent and have more early returns. I can do that.

826

I meant to include that in this diff. I just added it to the list of vm errors. I am using KERN_RESOURCE_SHORTAGE to mean restart without fault_deallocate() and KERN_RESTART to mean restart with fault_deallocate(). It significantly reduces the number of places that call deallocate() and makes the error handling a little bit simpler.

Decrease indent. Remove dead comment. Add missing KERN_RESTART define.

This revision is now accepted and ready to land.Jan 22 2020, 1:14 PM