Date: Tue, 11 May 2010 01:29:19 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r207905 - head/sys/vm Message-ID: <201005110129.o4B1TJEk026533@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Tue May 11 01:29:18 2010 New Revision: 207905 URL: http://svn.freebsd.org/changeset/base/207905 Log: Update synchronization annotations for struct vm_page. Add a comment explaining how the setting of PG_WRITEABLE is synchronized. Modified: head/sys/vm/vm_page.h Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Mon May 10 22:21:08 2010 (r207904) +++ head/sys/vm/vm_page.h Tue May 11 01:29:18 2010 (r207905) @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005110129.o4B1TJEk026533>