Page MenuHomeFreeBSD

Move map relookup into its own function.
ClosedPublic

Authored by jeff on Jan 21 2020, 7:42 PM.
Tags
None
Referenced Files
F137049677: D23303.id67128.diff
Fri, Nov 21, 1:26 AM
F137049077: D23303.id.diff
Fri, Nov 21, 1:24 AM
F137048225: D23303.id67180.diff
Fri, Nov 21, 1:21 AM
F137047734: D23303.id67115.diff
Fri, Nov 21, 1:19 AM
F137046309: D23303.diff
Fri, Nov 21, 1:15 AM
F136895578: D23303.id67180.diff
Thu, Nov 20, 12:22 PM
Unknown Object (File)
Tue, Nov 18, 10:59 AM
Unknown Object (File)
Fri, Nov 14, 10:35 PM
Subscribers

Details

Summary

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

Diff Detail

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

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 ↗(On Diff #67115)

You could reduce indent below by doing

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

there

826 ↗(On Diff #67115)

What is KERN_RESTART ?

sys/vm/vm_fault.c
810 ↗(On Diff #67115)

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

826 ↗(On Diff #67115)

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