summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-06-23 02:08:15 +0000
committerattilio <attilio@FreeBSD.org>2012-06-23 02:08:15 +0000
commit5d9dd820d8dbc25b32304a51fb32d3ac2e2a88e5 (patch)
tree4d0464daafa331a0f98cca9a1273d2355181ea1e /sys/vm/vm_object.h
parenta8dc1f52704aa713258258a5479ff5f815b8606f (diff)
parente19c8fe0ffaebe2cb325b0d14102166d51b7429d (diff)
downloadFreeBSD-src-5d9dd820d8dbc25b32304a51fb32d3ac2e2a88e5.zip
FreeBSD-src-5d9dd820d8dbc25b32304a51fb32d3ac2e2a88e5.tar.gz
MFC
Diffstat (limited to 'sys/vm/vm_object.h')
-rw-r--r--sys/vm/vm_object.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/vm/vm_object.h b/sys/vm/vm_object.h
index 6aa9f5f..a386150 100644
--- a/sys/vm/vm_object.h
+++ b/sys/vm/vm_object.h
@@ -78,8 +78,21 @@
*
* vm_object_t Virtual memory object.
*
+ * The root of cached pages pool is protected by both the per-object mutex
+ * and the free pages queue mutex.
+ * On insert in the cache splay tree, the per-object mutex is expected
+ * to be already held and the free pages queue mutex will be
+ * acquired during the operation too.
+ * On remove and lookup from the cache splay tree, only the free
+ * pages queue mutex is expected to be locked.
+ * These rules allow for reliably checking for the presence of cached
+ * pages with only the per-object lock held, thereby reducing contention
+ * for the free pages queue mutex.
+ *
* List of locks
* (c) const until freed
+ * (o) per-object mutex
+ * (f) free pages queue mutex
*
*/
OpenPOWER on IntegriCloud