From fdf82ef9cfb84888e76e303fe6c9ee30fbc21d1e Mon Sep 17 00:00:00 2001 From: attilio Date: Tue, 21 May 2013 20:38:19 +0000 Subject: o Relax locking assertions for vm_page_find_least() o Relax locking assertions for pmap_enter_object() and add them also to architectures that currently don't have any o Introduce VM_OBJECT_LOCK_DOWNGRADE() which is basically a downgrade operation on the per-object rwlock o Use all the mechanisms above to make vm_map_pmap_enter() to work mostl of the times only with readlocks. Sponsored by: EMC / Isilon storage division Reviewed by: alc --- sys/powerpc/aim/mmu_oea.c | 2 ++ sys/powerpc/aim/mmu_oea64.c | 2 ++ sys/powerpc/booke/pmap.c | 2 ++ 3 files changed, 6 insertions(+) (limited to 'sys/powerpc') diff --git a/sys/powerpc/aim/mmu_oea.c b/sys/powerpc/aim/mmu_oea.c index 3c024de..17dcf66 100644 --- a/sys/powerpc/aim/mmu_oea.c +++ b/sys/powerpc/aim/mmu_oea.c @@ -1217,6 +1217,8 @@ moea_enter_object(mmu_t mmu, pmap_t pm, vm_offset_t start, vm_offset_t end, vm_page_t m; vm_pindex_t diff, psize; + VM_OBJECT_ASSERT_LOCKED(m_start->object); + psize = atop(end - start); m = m_start; rw_wlock(&pvh_global_lock); diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 709501b..df91892 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -1360,6 +1360,8 @@ moea64_enter_object(mmu_t mmu, pmap_t pm, vm_offset_t start, vm_offset_t end, vm_page_t m; vm_pindex_t diff, psize; + VM_OBJECT_ASSERT_LOCKED(m_start->object); + psize = atop(end - start); m = m_start; while (m != NULL && (diff = m->pindex - m_start->pindex) < psize) { diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index a4de230..7e3c29e 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -1716,6 +1716,8 @@ mmu_booke_enter_object(mmu_t mmu, pmap_t pmap, vm_offset_t start, vm_page_t m; vm_pindex_t diff, psize; + VM_OBJECT_ASSERT_LOCKED(m_start->object); + psize = atop(end - start); m = m_start; rw_wlock(&pvh_global_lock); -- cgit v1.1