Page MenuHomeFreeBSD

Move map relookup into its own function.
ClosedPublic

Authored by jeff on Jan 21 2020, 7:42 PM.
Tags
None
Referenced Files
F154403389: D23303.id67115.diff
Tue, Apr 28, 9:03 AM
Unknown Object (File)
Fri, Apr 24, 6:32 PM
Unknown Object (File)
Thu, Apr 23, 10:26 AM
Unknown Object (File)
Thu, Apr 23, 2:54 AM
Unknown Object (File)
Mon, Apr 20, 7:52 PM
Unknown Object (File)
Wed, Apr 15, 9:59 PM
Unknown Object (File)
Wed, Apr 15, 2:43 PM
Unknown Object (File)
Mon, Apr 6, 11:10 PM
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