Date: Wed, 9 Jan 2013 01:18:19 +0000 (UTC) From: "Cherry G. Mathew" <cherry@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r245200 - projects/amd64_xen_pv/sys/amd64/xen Message-ID: <201301090118.r091IJTO077421@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301090118.r091IJTO077421>