diff options
author | peter <peter@FreeBSD.org> | 2004-05-19 21:55:37 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2004-05-19 21:55:37 +0000 |
commit | acd31bc19e2a3eef101a6fc7f34a7d705d88e957 (patch) | |
tree | 4fef26903f88471aa5fa26322de506221d84b3b2 | |
parent | 148418b5da3aaa5d119b1f48c74bc70c7ce05fa6 (diff) | |
download | FreeBSD-src-acd31bc19e2a3eef101a6fc7f34a7d705d88e957.zip FreeBSD-src-acd31bc19e2a3eef101a6fc7f34a7d705d88e957.tar.gz |
Like on i386, clear the last three entries in the pml4 page when doing a
pmap_release(), and put it the free queue marked as already zeroed.
-rw-r--r-- | sys/amd64/amd64/pmap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index c052318..9564472 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1296,11 +1296,16 @@ pmap_release(pmap_t pmap) LIST_REMOVE(pmap, pm_list); mtx_unlock_spin(&allpmaps_lock); - vm_page_lock_queues(); 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->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); - vm_page_free(m); + vm_page_free_zero(m); vm_page_unlock_queues(); } |