Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jul 2013 17:39:19 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r252578 - user/attilio/vmobj-readlock/sys/vm
Message-ID:  <201307031739.r63HdJfk052012@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307031739.r63HdJfk052012>