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)
Feb 23 2024, 5:09 PM
Unknown Object (File)
Jan 3 2024, 2:57 PM
Unknown Object (File)
Dec 20 2023, 4:01 AM
Unknown Object (File)
Sep 20 2023, 4:47 AM
Unknown Object (File)
Sep 2 2023, 11:23 PM
Unknown Object (File)
Sep 2 2023, 11:22 PM
Unknown Object (File)
Sep 2 2023, 11:20 PM
Unknown Object (File)
Sep 2 2023, 11:20 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