PERFORCE change 29569 for review

Peter Wemm peter at FreeBSD.org
Wed Apr 23 16:52:05 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=29569

Change 29569 by peter at peter_daintree on 2003/04/23 16:51:23

	free the PDP and PML4 pages to stop the leak

Affected files ...

.. //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#24 edit

Differences ...

==== //depot/projects/hammer/sys/x86_64/x86_64/pmap.c#24 (text+ko) ====

@@ -1247,15 +1247,21 @@
 	vm_page_lock_queues();
 	for (i = 0; i < NPGPTD; i++) {
 		m = TAILQ_FIRST(&object->memq);
-#ifdef PAE
 		KASSERT(VM_PAGE_TO_PHYS(m) == (pmap->pm_pdp[i] & PG_FRAME),
 		    ("pmap_release: got wrong ptd page"));
-#endif
 		m->wire_count--;
 		atomic_subtract_int(&cnt.v_wire_count, 1);
 		vm_page_busy(m);
 		vm_page_free_zero(m);
 	}
+	/* now free pdp and pml4 */
+	for (i = 0; i < 2; i++) {
+		m = TAILQ_FIRST(&object->memq);
+		m->wire_count--;
+		atomic_subtract_int(&cnt.v_wire_count, 1);
+		vm_page_busy(m);
+		vm_page_free(m);
+	}
 	KASSERT(TAILQ_EMPTY(&object->memq),
 	    ("pmap_release: leaking page table pages"));
 	vm_page_unlock_queues();


More information about the p4-projects mailing list