Page MenuHomeFreeBSD

vm_fault: Factor out per-object operations into vm_fault_object()
ClosedPublic

Authored by markj on Nov 16 2021, 9:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 11:25 AM
Unknown Object (File)
Oct 3 2024, 9:01 PM
Unknown Object (File)
Oct 3 2024, 4:46 PM
Unknown Object (File)
Oct 3 2024, 2:31 AM
Unknown Object (File)
Oct 1 2024, 3:20 PM
Unknown Object (File)
Sep 28 2024, 12:14 AM
Unknown Object (File)
Sep 27 2024, 7:48 PM
Unknown Object (File)
Sep 27 2024, 7:48 PM
Subscribers

Details

Summary

No functional change intended.

Obtained from: jeff (object_concurrency patches)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 42847
Build 39735: arc lint + arc unit

Event Timeline

markj requested review of this revision.Nov 16 2021, 9:14 PM

Push OBJ_DEAD checking into vm_fault_object() as well.

sys/vm/vm_fault.c
1550

I liked the old /* break to PAGE HAS BEEN FOUND. */ comment. I wonder if you could just paste it there.

1551

This is from vm_fault_getpages()?

sys/vm/vm_fault.c
1550

Well, it sounds somewhat obvious now that the lookup loop shrunk from 400LOC (in stable/12) to 45LOC. This fragment could be written like this:

res = vm_fault_object(&fs, &behind, &ahead);
if (res == FAULT_SOFT)
    break; /* page has been found */
if (res == FAULT_HARD) {
    faultcount = behind + 1 + ahead;
    hardfault = true;
    break; /* page has been found */
}
switch (res) {
    <handle other statuses>
}

Or do you prefer to fully restore the old "PAGE HAS BEEN FOUND" label? I don't have strong feelings about it.

1551

Yes.

sys/vm/vm_fault.c
1550

I used this comment for orientation in the file. I remembered to search for it to find the core anchor basically splitting the fault handling into 'before we have a page' (lookup/validation) and 'after' (doing pmap work and post-accounting).

May be I can use FAULT_SOFT/FAULT_HARD for this after your change.

This revision is now accepted and ready to land.Nov 17 2021, 10:53 PM