diff options
author | alc <alc@FreeBSD.org> | 2010-05-11 01:29:18 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2010-05-11 01:29:18 +0000 |
commit | bb095a7b971cdea7cd0c50e53166c63d365f00fb (patch) | |
tree | 152873259769c448b59bf3d3ea63cccee33463aa /sys/vm | |
parent | c4a8bb5da4b48347306be397d222043f8221596e (diff) | |
download | FreeBSD-src-bb095a7b971cdea7cd0c50e53166c63d365f00fb.zip FreeBSD-src-bb095a7b971cdea7cd0c50e53166c63d365f00fb.tar.gz |
Update synchronization annotations for struct vm_page. Add a comment
explaining how the setting of PG_WRITEABLE is synchronized.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_page.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index b2b92e9..e9d9544 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -112,7 +112,7 @@ 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 (Q) */ + u_short cow; /* page cow mapping count (P) */ u_int wire_count; /* wired down maps refs (P) */ short hold_count; /* page hold count (P) */ u_short oflags; /* page flags (O) */ @@ -122,16 +122,16 @@ struct vm_page { /* so, on normal X86 kernels, they must be at least 8 bits wide */ #if PAGE_SIZE == 4096 u_char valid; /* map of valid DEV_BSIZE chunks (O) */ - u_char dirty; /* map of dirty DEV_BSIZE chunks */ + u_char dirty; /* map of dirty DEV_BSIZE chunks (O) */ #elif PAGE_SIZE == 8192 u_short valid; /* map of valid DEV_BSIZE chunks (O) */ - u_short dirty; /* map of dirty DEV_BSIZE chunks */ + u_short dirty; /* map of dirty DEV_BSIZE chunks (O) */ #elif PAGE_SIZE == 16384 u_int valid; /* map of valid DEV_BSIZE chunks (O) */ - u_int dirty; /* map of dirty DEV_BSIZE chunks */ + u_int dirty; /* map of dirty DEV_BSIZE chunks (O) */ #elif PAGE_SIZE == 32768 u_long valid; /* map of valid DEV_BSIZE chunks (O) */ - u_long dirty; /* map of dirty DEV_BSIZE chunks */ + u_long dirty; /* map of dirty DEV_BSIZE chunks (O) */ #endif }; @@ -216,6 +216,9 @@ extern struct vpglocks pa_lock[]; * via the object/vm_page_t because there is no knowledge of their * pte mappings, nor can they be removed from their objects via * the object, and such pages are also not on any PQ queue. + * + * PG_WRITEABLE is set exclusively by pmap_enter(). When it does so, either + * the page must be VPO_BUSY or the containing object must be locked. */ #define PG_CACHED 0x0001 /* page is cached */ #define PG_FREE 0x0002 /* page is free */ |