Page MenuHomeFreeBSD

Consolidate busy sleep mechanisms.
AcceptedPublic

Authored by jeff on Mar 11 2020, 8:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 7:01 AM
Unknown Object (File)
Nov 24 2024, 8:54 PM
Unknown Object (File)
Nov 24 2024, 8:27 PM
Unknown Object (File)
Nov 22 2024, 5:01 AM
Unknown Object (File)
Nov 21 2024, 2:13 AM
Unknown Object (File)
Nov 19 2024, 5:55 PM
Unknown Object (File)
Nov 17 2024, 10:41 PM
Unknown Object (File)
Nov 10 2024, 2:40 PM
Subscribers

Details

Reviewers
alc
dougm
kib
markj
Summary

We have a proliferation of slightly different busy sleep implementations. The only real difference is how they handled shared and whether they relock on sleep or drop the lock if they don't sleep. The internal sleep function already handles these cases. I am simplify doing the substitution for an API that parses ALLOC flags and returns a bool if the lock was dropped.

This will allow me to introduce other changes to busy handling in a way that is API compatible with most code. Although the consumers have to do a little more work to check for the sleep return it typically integrates well with their existing lock acquire/drop loops. I think overall this is simpler and less code.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29885
Build 27705: arc lint + arc unit

Event Timeline

jeff added reviewers: alc, dougm, kib, markj.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.

One other thing; I have submitted patches to drm to address these changes. I will have to bump FreeBSD_version and fix one extra case in drm-legacy because it is not written in a way that it can use vm_page_busy_acquire().

This revision is now accepted and ready to land.Mar 12 2020, 11:05 PM
markj added inline comments.
sys/vm/vm_page.c
999

We can probably get rid of the page_lock asserts now.

sys/vm/vm_page.c
999

We can also get rid of the page array. Let's do that all in one patch.