Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2008 22:58:33 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133825 for review
Message-ID:  <200801212258.m0LMwXIZ020576@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133825

Change 133825 by kmacy@pandemonium:kmacy:xen31 on 2008/01/21 22:58:13

	enable pmap_is_prefaultable
	change places where there is substantial opportunity for batching back to
	using the mmu hypercalls

Affected files ...

.. //depot/projects/xen31/sys/i386/xen/pmap.c#25 edit

Differences ...

==== //depot/projects/xen31/sys/i386/xen/pmap.c#25 (text+ko) ====

@@ -1173,7 +1173,7 @@
 	pt_entry_t *pte;
 
 	pte = vtopte(va);
-	pte_clear(pte);
+	PT_CLEAR_VA(pte, FALSE);
 }
 
 /*
@@ -1224,13 +1224,15 @@
 	endpte = pte + count;
 	while (pte < endpte) {
 		oldpte |= *pte;
-		pte_store(pte, VM_PAGE_TO_PHYS(*ma) | pgeflag | PG_RW | PG_V);
+		PT_SET_VA(pte, VM_PAGE_TO_PHYS(*ma) | pgeflag | PG_RW | PG_V, FALSE);
 		pte++;
 		ma++;
 	}
 	if ((oldpte & PG_V) != 0)
 		pmap_invalidate_range(kernel_pmap, sva, sva + count *
 		    PAGE_SIZE);
+	else
+		PT_UPDATES_FLUSH();
 }
 
 /*
@@ -3056,8 +3058,7 @@
 					 * accessed (referenced) bits
 					 * during the copy.
 					 */
-					*dst_pte = ptetemp & ~(PG_W | PG_M |
-					    PG_A);
+					PT_SET_VA_MA(dst_pte, ptetemp & ~(PG_W | PG_M | PG_A), FALSE);
 					dst_pmap->pm_stats.resident_count++;
 	 			} else {
 					free = NULL;
@@ -3077,6 +3078,7 @@
 	}
 	if (*PMAP1)
 		*PMAP1 = 0;
+	PT_UPDATES_FLUSH();
 	sched_unpin();
 	vm_page_unlock_queues();
 	PMAP_UNLOCK(src_pmap);
@@ -3319,8 +3321,8 @@
 					(uintmax_t)tpte));
 
 
-				pte_clear(pte);
-
+				PT_CLEAR_VA(pte, FALSE);
+				
 				/*
 				 * Update the vm_page_t clean/reference bits.
 				 */
@@ -3342,6 +3344,7 @@
 				pmap->pm_stats.resident_count--;			
 			}
 		}
+		PT_UPDATES_FLUSH();
 		if (allfree) {
 			PV_STAT(pv_entry_spare -= _NPCPV);
 			PV_STAT(pc_chunk_count--);
@@ -3408,16 +3411,8 @@
 pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr)
 {
 	pt_entry_t *pte;
-	boolean_t rv;
+	boolean_t rv = FALSE;
 
-	rv = FALSE;
-	/* XXX 
-	 * in order for writable pagetables to help, 
-	 * this has to work - check if we aren't doing 
-	 * an invlpg on the page tables linear mappings
-	 */  
-	return (rv);
-	
 	PMAP_LOCK(pmap);
 	if (*pmap_pde(pmap, addr)) {
 		pte = vtopte(addr);



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