Page MenuHomeFreeBSD

Move the fault busy sleep into its own function.
ClosedPublic

Authored by jeff on Dec 15 2019, 2:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 4:57 AM
Unknown Object (File)
Dec 29 2023, 4:28 AM
Unknown Object (File)
Dec 20 2023, 6:16 AM
Unknown Object (File)
Nov 8 2023, 7:20 PM
Unknown Object (File)
Nov 6 2023, 5:45 AM
Unknown Object (File)
Sep 21 2023, 3:00 PM
Unknown Object (File)
Aug 6 2023, 2:49 AM
Unknown Object (File)
Aug 6 2023, 2:48 AM
Subscribers

Details

Summary

The motivation here is two fold; Eventually I will want to sleep from more than a single place in vm_fault(). Secondly, fault has become a 900 line function that was only comprehensible to me after weeks. I have a series of patches that split the stages off into other functions simply to improve readability and control flow.

Diff Detail

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

Event Timeline

jeff added reviewers: alc, kib, markj, dougm.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
sys/vm/vm_fault.c
707 ↗(On Diff #65674)

You might as well reformat the comment blocks so that they fill 79 columns.

Ignoring the KASSERT added, it looks fine.

sys/vm/vm_fault.c
871 ↗(On Diff #65674)

Is this supposed to be committed ? And why ?

This revision is now accepted and ready to land.Dec 15 2019, 8:22 PM
sys/vm/vm_fault.c
871 ↗(On Diff #65674)

I didn't realize that snuck into this patch. I believe it is impossible. OBJ_DEAD is possible but not OBJT_DEAD. We pip_wait before OBJT_DEAD so it should not be visible.

This branch in aggregate has seen probably a week of stress2 without hitting this assert but I will remove it for a later commit.

Address review feedback. Comment format and extra assert.

This revision now requires review to proceed.Dec 21 2019, 7:41 PM
This revision is now accepted and ready to land.Dec 21 2019, 9:29 PM