aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_page.h
diff options
context:
space:
mode:
authorKip Macy <kmacy@FreeBSD.org>2010-05-01 03:41:21 +0000
committerKip Macy <kmacy@FreeBSD.org>2010-05-01 03:41:21 +0000
commit0ce3ba8cd58ea437906bcb4cf8c03a4e92a9e8ca (patch)
tree055150d7db77e6a140f65c3f32c3d103e3e0244a /sys/vm/vm_page.h
parent483191871b206c25ea7f6182e8b8a8acdda0af24 (diff)
downloadsrc-0ce3ba8cd58ea437906bcb4cf8c03a4e92a9e8ca.tar.gz
src-0ce3ba8cd58ea437906bcb4cf8c03a4e92a9e8ca.zip
Update locking comment above vm_page:
- re-assign page queue lock "Q" - assign page lock "P" - update several uncommented fields - observe that hold_count is now protected by the page lock "P"
Notes
Notes: svn path=/head/; revision=207460
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r--sys/vm/vm_page.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h
index 35a81f8a8d74..51a896f9ae36 100644
--- a/sys/vm/vm_page.h
+++ b/sys/vm/vm_page.h
@@ -90,20 +90,21 @@
* and sundry status bits.
*
* Fields in this structure are locked either by the lock on the
- * object that the page belongs to (O) or by the lock on the page
- * queues (P).
+ * object that the page belongs to (O), its corresponding page lock (P),
+ * or by the lock on the page queues (Q).
+ *
*/
TAILQ_HEAD(pglist, vm_page);
struct vm_page {
- TAILQ_ENTRY(vm_page) pageq; /* queue info for FIFO queue or free list (P) */
+ TAILQ_ENTRY(vm_page) pageq; /* queue info for FIFO queue or free list (Q) */
TAILQ_ENTRY(vm_page) listq; /* pages in same object (O) */
struct vm_page *left; /* splay tree link (O) */
struct vm_page *right; /* splay tree link (O) */
- vm_object_t object; /* which object am I in (O,P)*/
- vm_pindex_t pindex; /* offset into object (O,P) */
+ vm_object_t object; /* which object am I in (O,Q)*/
+ vm_pindex_t pindex; /* offset into object (O,Q) */
vm_paddr_t phys_addr; /* physical address of page */
struct md_page md; /* machine dependant stuff */
uint8_t queue; /* page queue index */
@@ -111,11 +112,11 @@ struct vm_page {
u_short flags; /* see below */
uint8_t order; /* index of the buddy queue */
uint8_t pool;
- u_short cow; /* page cow mapping count */
- u_int wire_count; /* wired down maps refs (P) */
- short hold_count; /* page hold count */
+ u_short cow; /* page cow mapping count (Q) */
+ u_int wire_count; /* wired down maps refs (Q) */
+ short hold_count; /* page hold count (P) */
u_short oflags; /* page flags (O) */
- u_char act_count; /* page usage count */
+ u_char act_count; /* page usage count (Q) */
u_char busy; /* page busy count (O) */
/* NOTE that these must support one bit per DEV_BSIZE in a page!!! */
/* so, on normal X86 kernels, they must be at least 8 bits wide */