changeset: 24586:7a28b8b2d3ea user: Andres Lagar-Cavilla date: Thu Jan 26 13:21:27 2012 +0000 files: xen/arch/x86/mm/p2m.c description: x86/mm: Properly account for paged out pages If we hit the page after nominate but before paging it out, don't decrement the domain count of paged out pages. Signed-off-by: Andres Lagar-Cavilla Acked-by: Tim Deegan Committed-by: Tim Deegan --- xen/arch/x86/mm/p2m.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: xen-4.1.3-testing/xen/arch/x86/mm/p2m.c =================================================================== --- xen-4.1.3-testing.orig/xen/arch/x86/mm/p2m.c +++ xen-4.1.3-testing/xen/arch/x86/mm/p2m.c @@ -3156,7 +3156,8 @@ int p2m_mem_paging_prep(struct p2m_domai set_p2m_entry(p2m, gfn, mfn, 0, p2m_ram_paging_in, a); audit_p2m(p2m, 1); - atomic_dec(&p2m->domain->paged_pages); + if ( !page_extant ) + atomic_dec(&p2m->domain->paged_pages); ret = 0; out: