From 966cbc602a2e6deb5c02871f57635e0b0bce90ee Mon Sep 17 00:00:00 2001 From: alc Date: Wed, 5 May 2010 07:47:40 +0000 Subject: [PATCH] Use an OBJT_PHYS object and thus PG_UNMANAGED pages to implement the TSB. The TSB is not a pageable structure, so there is no point in using managed pages. Reviewed by: kib --- sys/sparc64/sparc64/pmap.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 4a2853ca7b0c..daba4b7fb326 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -1091,7 +1091,7 @@ pmap_pinit(pmap_t pm) * Allocate an object for it. */ if (pm->pm_tsb_obj == NULL) - pm->pm_tsb_obj = vm_object_allocate(OBJT_DEFAULT, TSB_PAGES); + pm->pm_tsb_obj = vm_object_allocate(OBJT_PHYS, TSB_PAGES); VM_OBJECT_LOCK(pm->pm_tsb_obj); for (i = 0; i < TSB_PAGES; i++) { @@ -1152,16 +1152,10 @@ pmap_release(pmap_t pm) KASSERT(obj->ref_count == 1, ("pmap_release: tsbobj ref count != 1")); while (!TAILQ_EMPTY(&obj->memq)) { m = TAILQ_FIRST(&obj->memq); - vm_page_lock_queues(); - if (vm_page_sleep_if_busy(m, FALSE, "pmaprl")) - continue; - KASSERT(m->hold_count == 0, - ("pmap_release: freeing held tsb page")); m->md.pmap = NULL; m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); vm_page_free_zero(m); - vm_page_unlock_queues(); } VM_OBJECT_UNLOCK(obj); pmap_qremove((vm_offset_t)pm->pm_tsb, TSB_PAGES);