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)
Mar 18 2024, 12:29 PM
Unknown Object (File)
Mar 7 2024, 11:49 PM
Unknown Object (File)
Feb 20 2024, 9:24 AM
Unknown Object (File)
Dec 23 2023, 3:16 PM
Unknown Object (File)
Dec 21 2023, 11:14 PM
Unknown Object (File)
Dec 20 2023, 6:32 AM
Unknown Object (File)
Nov 10 2023, 11:55 AM
Unknown Object (File)
Nov 9 2023, 2:08 AM
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 42818
Build 39706: 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
1540

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

1541

This is from vm_fault_getpages()?

sys/vm/vm_fault.c
1540

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.

1541

Yes.

sys/vm/vm_fault.c
1540

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