Date: Tue, 18 May 2004 17:49:16 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 53022 for review Message-ID: <200405190049.i4J0nGh8078325@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=53022 Change 53022 by peter@peter_hammer on 2004/05/18 17:48:54 clear the kernel/direct map/recursive mapping pml4 entries and put the pml4 page in the zero queue. Move the PHYS_TO_VM_PAGE() outside the queues lock, just like on i386. Affected files ... .. //depot/projects/hammer/sys/amd64/amd64/pmap.c#67 edit Differences ... ==== //depot/projects/hammer/sys/amd64/amd64/pmap.c#67 (text+ko) ==== @@ -1287,6 +1287,8 @@ pmap_release(pmap_t pmap) { vm_page_t m; + int i; + static int j; KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", @@ -1296,12 +1298,16 @@ LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); + m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); + + pmap->pm_pml4[KPML4I] = 0; /* KVA */ + pmap->pm_pml4[DMPML4I] = 0; /* Direct Map */ + pmap->pm_pml4[PML4PML4I] = 0; /* Recursive Mapping */ + vm_page_lock_queues(); - m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I]); m->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); - /* XXX check if we can vm_page_free_zero here! */ - vm_page_free(m); + vm_page_free_zero(m); vm_page_unlock_queues(); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405190049.i4J0nGh8078325>