summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_object.h
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2012-07-08 16:12:59 +0000
committerattilio <attilio@FreeBSD.org>2012-07-08 16:12:59 +0000
commite237fbcafa3aafa0377a369aeebbb4a9ef82d67a (patch)
tree3c617cdcef1d9b27ff5463a014347fd9c12990d5 /sys/vm/vm_object.h
parentffa3f082fffd0919e1fab9e61c5d2f6e3b660159 (diff)
parent9cc8fb25a6c747a4ce4eff0392c16c81d2135af8 (diff)
downloadFreeBSD-src-e237fbcafa3aafa0377a369aeebbb4a9ef82d67a.zip
FreeBSD-src-e237fbcafa3aafa0377a369aeebbb4a9ef82d67a.tar.gz
Merge from vmcontention
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 3f36b35..77450a3 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