From owner-svn-src-head@FreeBSD.ORG Thu Jun 3 10:11:46 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A4691065674; Thu, 3 Jun 2010 10:11:46 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A4E88FC1C; Thu, 3 Jun 2010 10:11:46 +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 o53ABk2X041468; Thu, 3 Jun 2010 10:11:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o53ABk0x041466; Thu, 3 Jun 2010 10:11:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201006031011.o53ABk0x041466@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 3 Jun 2010 10:11:46 +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: r208772 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2010 10:11:46 -0000 Author: kib Date: Thu Jun 3 10:11:45 2010 New Revision: 208772 URL: http://svn.freebsd.org/changeset/base/208772 Log: Add assertion and comment in vm_page_flag_set() describing the expectations when the PG_WRITEABLE flag is set. Reviewed by: alc Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Jun 3 09:54:53 2010 (r208771) +++ head/sys/vm/vm_page.c Thu Jun 3 10:11:45 2010 (r208772) @@ -486,6 +486,14 @@ vm_page_flag_set(vm_page_t m, unsigned s { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + /* + * For a managed page, the PG_WRITEABLE flag can be set only if + * the page is VPO_BUSY. Currently this flag is only set by + * pmap_enter(). + */ + KASSERT((bits & PG_WRITEABLE) == 0 || + (m->flags & (PG_UNMANAGED | PG_FICTITIOUS)) != 0 || + (m->oflags & VPO_BUSY) != 0, ("PG_WRITEABLE and !VPO_BUSY")); m->flags |= bits; }