svn commit: r248162 - user/attilio/vmobj-readlock/sys/vm
Alan Cox
alc at rice.edu
Mon Mar 11 17:05:59 UTC 2013
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;
>
More information about the svn-src-user
mailing list