Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2013 12:05:56 -0500
From:      Alan Cox <alc@rice.edu>
To:        Attilio Rao <attilio@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   Re: svn commit: r248162 - user/attilio/vmobj-readlock/sys/vm
Message-ID:  <513E0EF4.4050304@rice.edu>
In-Reply-To: <201303111350.r2BDoeRI054744@svn.freebsd.org>
References:  <201303111350.r2BDoeRI054744@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/11/2013 08:50, Attilio Rao wrote:
> Author: attilio
> Date: Mon Mar 11 13:50:40 2013
> New Revision: 248162
> URL: http://svnweb.freebsd.org/changeset/base/248162
>
> Log:
>   The VM_ALLOC_IFCACHED case does not require any object locking as
>   it will only go through the object page cache and return.
>   Lookups in the object's page cache are correctly handled by
>   the vm_page_queue_free_mtx, which will be acquired correctly in this
>   case.
>   Relax the locking assertion.
>   

Umm, no.  The page is moving from the cache to the rtree.  Insertion
into the latter requires the object to be write locked.

>   Sponsored by:	EMC / Isilon storage division
>
> Modified:
>   user/attilio/vmobj-readlock/sys/vm/vm_page.c
>
> Modified: user/attilio/vmobj-readlock/sys/vm/vm_page.c
> ==============================================================================
> --- user/attilio/vmobj-readlock/sys/vm/vm_page.c	Mon Mar 11 13:37:18 2013	(r248161)
> +++ user/attilio/vmobj-readlock/sys/vm/vm_page.c	Mon Mar 11 13:50:40 2013	(r248162)
> @@ -1184,7 +1184,7 @@ vm_page_alloc(vm_object_t object, vm_pin
>  
>  	KASSERT((object != NULL) == ((req & VM_ALLOC_NOOBJ) == 0),
>  	    ("vm_page_alloc: inconsistent object/req"));
> -	if (object != NULL)
> +	if (object != NULL && (req & VM_ALLOC_IFCACHED) == 0)
>  		VM_OBJECT_ASSERT_WLOCKED(object);
>  
>  	req_class = req & VM_ALLOC_CLASS_MASK;
>




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