Page MenuHomeFreeBSD

Low hanging lock reduction based on semi-const flags.
ClosedPublic

Authored by jeff on Nov 27 2019, 3:42 AM.
Tags
None
Referenced Files
F81645699: D22565.diff
Fri, Apr 19, 10:23 AM
Unknown Object (File)
Mar 11 2024, 4:13 AM
Unknown Object (File)
Jan 18 2024, 9:24 AM
Unknown Object (File)
Dec 27 2023, 3:13 PM
Unknown Object (File)
Dec 22 2023, 9:54 PM
Unknown Object (File)
Oct 3 2023, 7:47 AM
Unknown Object (File)
Sep 16 2023, 11:44 PM
Unknown Object (File)
Sep 13 2023, 3:06 PM
Subscribers

Details

Summary

These are pretty minor changes. COLOR is never cleared after it is set. So we can check for it before acquiring and setting. I made a mistake in my ref patch that caused us to use a write ref for the final vnode ref which is not necessary and actually was a regression. The vm_map_pmap_enter() change realistically isn't likely to improve perf but it looks more tidy this way I think.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27820
Build 25999: arc lint + arc unit

Event Timeline

jeff added reviewers: kib, markj, alc, dougm.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
sys/vm/vm_map.c
2374

Don't we formally need to recheck the object type here?

sys/vm/vm_object.c
574–575

The indentation is wrong.

sys/vm/vm_map.c
2374

It can only have become DEAD since we must have a valid reference.

sys/vm/vm_map.c
2542

Isn't this a policy change? Now we are not accounting for swap space reserved for shared memory or tmpfs objects.

sys/vm/vm_map.c
2372

I wonder if it makes sense to just return there, regardless of the locking changes. If the object was device/sg and now it is no longer, then it probably does not make sense do any page table prefilling at all.

2542

I suspect that this would be more important e.g. for shared read-only mapping (weird case actually).

sys/vm/vm_object.c
538–539

I think that this runlock can happen before umtx_shm_object_terminated().

sys/vm/vm_map.c
2542

I think mark is right. And I may have made the same error in vm_map_copy_entry_anon().

Address review feedback. Correct a mistaken OBJ_ANON test.

This revision is now accepted and ready to land.Nov 28 2019, 7:51 PM
markj added inline comments.
sys/vm/vm_map.c
2374

Perhaps add a comment in the block above, where we recheck object->type == OBJT_DEVICE || object->type == OBJT_SG.