From owner-svn-src-user@FreeBSD.ORG Wed Jul 3 17:39:19 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D311258A; Wed, 3 Jul 2013 17:39:19 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C3AB81ACE; Wed, 3 Jul 2013 17:39:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r63HdJ7w052013; Wed, 3 Jul 2013 17:39:19 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r63HdJfk052012; Wed, 3 Jul 2013 17:39:19 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201307031739.r63HdJfk052012@svn.freebsd.org> From: Attilio Rao Date: Wed, 3 Jul 2013 17:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r252578 - user/attilio/vmobj-readlock/sys/vm X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jul 2013 17:39:19 -0000 Author: attilio Date: Wed Jul 3 17:39:19 2013 New Revision: 252578 URL: http://svnweb.freebsd.org/changeset/base/252578 Log: Improve comments about busy_lock implementation and usage. Sponsored by: EMC / Isilon storage division Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.h ============================================================================== --- user/attilio/vmobj-readlock/sys/vm/vm_page.h Wed Jul 3 17:27:32 2013 (r252577) +++ user/attilio/vmobj-readlock/sys/vm/vm_page.h Wed Jul 3 17:39:19 2013 (r252578) @@ -112,14 +112,13 @@ * * Page content access is regulated (mostly) by the busy mechanism. * When the page content is changing (for example, during a page READ - * operation) the page owner must acquire an hard busy token. Similarly, + * operation) the page owner must acquire an write busy token. Similarly, * when the page content is just being accessed for reading purposes * (for example, during a page WRITE operation) the page owner must - * acquire a soft busy token. - * The hard busy mechanism is controlled using vm_page_busy() and - * vm_page_unbusy() interfaces. Likewise the soft busy mechanism is - * controlled through the usage of vm_page_io_start() and - * vm_page_io_finish(). + * acquire a read busy token. + * The busy mechanism is regulated by the vm_page_busy_*() family of + * primitives and it follows a reader/writer lock pattern as the names + * suggest. */ #if PAGE_SIZE == 4096 @@ -184,7 +183,11 @@ struct vm_page { #define VPO_NOSYNC 0x10 /* do not collect for syncer */ /* - * ARXXX: Insert comments for busy here. + * Busy lock implementation details. + * The algorithm is taken mostly by rwlock(9) and sx(9) locks implementation, + * even if the support for owner identity is removed because of size + * constraints. Checks on lock recursion are then not possible, while the + * lock assertions effectiveness is someway reduced. */ #define VPB_LOCK_READ 0x01 #define VPB_LOCK_WRITE 0x02