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
Unknown Object (File)
Mon, Jan 13, 11:40 PM
Unknown Object (File)
Mon, Jan 6, 3:32 AM
Unknown Object (File)
Nov 19 2024, 12:18 AM
Unknown Object (File)
Nov 18 2024, 10:17 PM
Unknown Object (File)
Nov 10 2024, 12:38 PM
Unknown Object (File)
Oct 27 2024, 9:48 PM
Unknown Object (File)
Oct 3 2024, 9:44 AM
Unknown Object (File)
Sep 29 2024, 8:55 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.