svn commit: r245200 - projects/amd64_xen_pv/sys/amd64/xen
Cherry G. Mathew
cherry at FreeBSD.org
Wed Jan 9 01:18:20 UTC 2013
Author: cherry
Date: Wed Jan 9 01:18:19 2013
New Revision: 245200
URL: http://svnweb.freebsd.org/changeset/base/245200
Log:
When trying to return pages to page cache, only try to free memory we manage
Approved by: gibbs (implicit)
Modified:
projects/amd64_xen_pv/sys/amd64/xen/pmap.c
Modified: projects/amd64_xen_pv/sys/amd64/xen/pmap.c
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/xen/pmap.c Wed Jan 9 00:36:06 2013 (r245199)
+++ projects/amd64_xen_pv/sys/amd64/xen/pmap.c Wed Jan 9 01:18:19 2013 (r245200)
@@ -155,6 +155,8 @@ extern unsigned long physfree; /* from m
struct pmap kernel_pmap_store;
+#define ISBOOTVA(va) ((va) >= KERNBASE && (va) <= virtual_avail) /* XXX: keep an eye on virtual_avail */
+
uintptr_t virtual_avail; /* VA of first avail page (after kernel bss) */
uintptr_t virtual_end; /* VA of last avail page (end of kernel AS) */
@@ -1064,7 +1066,7 @@ pmap_kremove(vm_offset_t va)
PT_CLEAR_VA(pte, TRUE);
PT_UPDATES_FLUSH();
- // vtopte_release(va, &tptr);
+ vtopte_release(va, &tptr);
}
/*
@@ -1357,7 +1359,7 @@ xen_vm_vtop(uintptr_t va)
va <= VM_MAX_KERNEL_ADDRESS),
("Invalid kernel virtual address"));
- if (va >= KERNBASE && va <= virtual_avail) { /*
+ if (ISBOOTVA(va)) { /*
* Boot time page
*/
return VTOP(va);
@@ -1402,6 +1404,11 @@ static void
xen_pagezone_free(vm_offset_t page)
{
+ if (ISBOOTVA(page)) {
+ /* We don't manage this range */
+ return;
+ }
+
uma_zfree(xen_pagezone, (void *)page);
}
More information about the svn-src-projects
mailing list