Page MenuHomeFreeBSD

Don't relock the vm object after busy sleeps.
ClosedPublic

Authored by jeff on Dec 15 2019, 2:53 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 8 2024, 12:12 PM
Unknown Object (File)
Dec 20 2023, 6:44 AM
Unknown Object (File)
Dec 12 2023, 12:24 AM
Unknown Object (File)
Nov 1 2023, 5:38 AM
Unknown Object (File)
Sep 6 2023, 4:44 AM
Unknown Object (File)
Aug 28 2023, 4:52 AM
Unknown Object (File)
Aug 28 2023, 4:51 AM
Unknown Object (File)
Aug 28 2023, 4:51 AM
Subscribers

Details

Summary

A surprising amount of contention comes from waking up after busy sleep, locking the object, and then dropping immediately.

This change also makes it cleaner to sleep with an object read lock in some cases as well as avoiding touching the object after sleep which closes one of the type stability issues.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jeff added reviewers: alc, doug_freebsd.con.com, kib, markj.
jeff set the repository for this revision to rS FreeBSD src repository - subversion.
This revision is now accepted and ready to land.Dec 15 2019, 7:55 PM
markj added inline comments.
sys/vm/vm_page.c
1057 ↗(On Diff #65675)

It looks strange to me to compare a bool with 0. if (!_vm_page_busy_sleep(...)) would make more sense IMO.

Comment a little better. Use bool appropriately.

This revision now requires review to proceed.Dec 21 2019, 7:42 PM
This revision is now accepted and ready to land.Dec 21 2019, 9:31 PM