Page MenuHomeFreeBSD

Move map relookup into its own function.
ClosedPublic

Authored by jeff on Jan 21 2020, 7:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 29, 6:53 AM
Unknown Object (File)
Tue, Jan 28, 2:20 PM
Unknown Object (File)
Sat, Jan 25, 6:35 PM
Unknown Object (File)
Nov 1 2024, 3:39 PM
Unknown Object (File)
Oct 20 2024, 6:12 PM
Unknown Object (File)
Oct 19 2024, 5:42 AM
Unknown Object (File)
Oct 11 2024, 9:09 AM
Unknown Object (File)
Oct 4 2024, 11:34 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