From owner-svn-src-all@FreeBSD.ORG Tue May 11 01:29:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4AB30106564A; Tue, 11 May 2010 01:29:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3B53C8FC1C; Tue, 11 May 2010 01:29:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4B1TJDO026535; Tue, 11 May 2010 01:29:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4B1TJEk026533; Tue, 11 May 2010 01:29:19 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201005110129.o4B1TJEk026533@svn.freebsd.org> From: Alan Cox Date: Tue, 11 May 2010 01:29:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207905 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 01:29:19 -0000 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 */