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 */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to