From nobody@FreeBSD.org  Wed Mar 11 15:04:14 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F05F91065672
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:04:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id DEABE8FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:04:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2BF4E56026796
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Mar 2009 15:04:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2BF4ErH026795;
	Wed, 11 Mar 2009 15:04:14 GMT
	(envelope-from nobody)
Message-Id: <200903111504.n2BF4ErH026795@www.freebsd.org>
Date: Wed, 11 Mar 2009 15:04:14 GMT
From: pluknet <pluknet@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] sync vm_map_lock(9) with recent locking changes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132546
>Category:       docs
>Synopsis:       [patch] sync vm_map_lock(9) with recent locking changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 11 15:10:01 UTC 2009
>Closed-Date:    Sat Jul 21 15:50:03 UTC 2012
>Last-Modified:  Sat Jul 21 15:50:03 UTC 2012
>Originator:     pluknet
>Release:        FreeBSD 8.0-CURRENT
>Organization:
RIPN
>Environment:
FreeBSD 8.0-CURRENT
>Description:
Quoting commit log to vm_map.c, v1.402:

"Resurrect shared map locks allowing greater concurrency during some map
operations, such as page faults.
[..]
MFC after:	6 weeks"

vm_map_lock(9) was not updated to reflect the reality.
>How-To-Repeat:

>Fix:
Apply the patch.



Patch attached with submission follows:

--- share/man/man9/vm_map_lock.9.orig	Wed Mar 11 17:57:55 2009
+++ share/man/man9/vm_map_lock.9	Wed Mar 11 17:59:54 2009
@@ -73,7 +73,6 @@
 .Fn vm_map_lock_read
 macro obtains a read-lock on
 .Fa map .
-Currently this is implemented as an exclusive lock.
 .Pp
 The
 .Fn vm_map_unlock_read
@@ -93,23 +92,18 @@
 .Fa map .
 It returns FALSE if the lock cannot be immediately acquired;
 otherwise return TRUE with the lock acquired.
-Currently this is implemented as an exclusive lock.
 .Pp
 The
 .Fn vm_map_lock_upgrade
 macro attempts to atomically upgrade a read-lock on
 .Fa map
 to an exclusive lock.
-As read-locks are currently implemented as exclusive locks,
-this macro is a no-op.
 .Pp
 The
 .Fn vm_map_lock_downgrade
 macro attempts to downgrade an exclusive lock on
 .Fa map
 to a read-lock.
-As read-locks are currently implemented as exclusive locks,
-this macro is a no-op.
 .Sh IMPLEMENTATION NOTES
 Currently, all of the locking macros implement their locks as sleep locks.
 .Sh SEE ALSO


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Fri Apr 3 23:56:59 UTC 2009 
State-Changed-Why:  
Patched in CURRENT, thanks! 


Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Fri Apr 3 23:56:59 UTC 2009 
Responsible-Changed-Why:  
Over to me, I'll MFC after Alan pushes the change to 7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132546 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/132546: commit references a PR
Date: Fri,  3 Apr 2009 23:53:02 +0000 (UTC)

 Author: trhodes
 Date: Fri Apr  3 23:52:47 2009
 New Revision: 190680
 URL: http://svn.freebsd.org/changeset/base/190680
 
 Log:
   Catch up with recent locking changes.
   
   PR:		132546
   Submitted by:	pluknet <pluknet@gmail.com>
   Reviewed by:	alc
 
 Modified:
   head/share/man/man9/vm_map_lock.9
 
 Modified: head/share/man/man9/vm_map_lock.9
 ==============================================================================
 --- head/share/man/man9/vm_map_lock.9	Fri Apr  3 21:13:18 2009	(r190679)
 +++ head/share/man/man9/vm_map_lock.9	Fri Apr  3 23:52:47 2009	(r190680)
 @@ -73,7 +73,6 @@ The
  .Fn vm_map_lock_read
  macro obtains a read-lock on
  .Fa map .
 -Currently this is implemented as an exclusive lock.
  .Pp
  The
  .Fn vm_map_unlock_read
 @@ -93,23 +92,18 @@ macro attempts to obtain a read-lock on
  .Fa map .
  It returns FALSE if the lock cannot be immediately acquired;
  otherwise return TRUE with the lock acquired.
 -Currently this is implemented as an exclusive lock.
  .Pp
  The
  .Fn vm_map_lock_upgrade
  macro attempts to atomically upgrade a read-lock on
  .Fa map
  to an exclusive lock.
 -As read-locks are currently implemented as exclusive locks,
 -this macro is a no-op.
  .Pp
  The
  .Fn vm_map_lock_downgrade
  macro attempts to downgrade an exclusive lock on
  .Fa map
  to a read-lock.
 -As read-locks are currently implemented as exclusive locks,
 -this macro is a no-op.
  .Sh IMPLEMENTATION NOTES
  Currently, all of the locking macros implement their locks as sleep locks.
  .Sh SEE ALSO
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Sat Jul 21 15:49:46 UTC 2012 
State-Changed-Why:  
Changes have been merged for awhile now, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132546 
>Unformatted:
