Index: sys/vm/vm_object.h =================================================================== --- sys/vm/vm_object.h (revisione 237164) +++ sys/vm/vm_object.h (copia locale) @@ -76,8 +76,16 @@ * * 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. In order to avoid fruit-less + * acquistion of the global free pages queue mutex, insertions always + * happen with the per-object mutex held. This allow checking presence + * of cached pages in cheaper way, avoiding contention. + * * List of locks * (c) const until freed + * (o) per-object mutex + * (q) free paging queue mutex * */ @@ -102,7 +110,7 @@ struct vm_object { vm_ooffset_t backing_object_offset;/* Offset in backing object */ TAILQ_ENTRY(vm_object) pager_object_list; /* list of all objects of this pager type */ LIST_HEAD(, vm_reserv) rvq; /* list of reservations */ - vm_page_t cache; /* root of the cache page splay tree */ + vm_page_t cache; /* (o + q) root of the cache page splay tree */ void *handle; union { /*