aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/blockcount.h
Commit message (Collapse)AuthorAgeFilesLines
* Handle PCATCH in blockcount_sleep() so it can be interrupted.Mark Johnston2020-04-211-2/+2
| | | | | | | | | | | | | blockcount_wait() still unconditionally waits for the count to reach zero before returning. Tested by: pho (a larger patch) Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D24513 Notes: svn path=/head/; revision=360163
* Add a blocking counter KPI.Mark Johnston2020-02-281-0/+95
refcount(9) was recently extended to support waiting on a refcount to drop to zero, as this was needed for a lockless VM object paging-in-progress counter. However, this adds overhead to all uses of refcount(9) and doesn't really match traditional refcounting semantics: once a counter has dropped to zero, the protected object may be freed at any point and it is not safe to dereference the counter. This change removes that extension and instead adds a new set of KPIs, blockcount_*, for use by VM object PIP and busy. Reviewed by: jeff, kib, mjg Tested by: pho Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D23723 Notes: svn path=/head/; revision=358432