[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6 of 8] x86/mm: Properly account for paged out pages



On Wed, Jan 25, Andres Lagar-Cavilla wrote:

>  xen/arch/x86/mm/p2m.c |  3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> 
> If we hit the page after nominate but before paging it out, don't decrement 
> the
> domain count of paged out pages.

The meaning of paged_pages is to track released pages.
In p2m_mem_paging_evict() it gets incremented once the page is removed
from the domain, and in p2m_mem_paging_prep() it should be decremented
right after the alloc_domheap_page() call.
So the patch should move the atomic_dec() call after successful page
allocation.

Olaf

> diff -r c41436e555cd -r d4336e35f0bc xen/arch/x86/mm/p2m.c
> --- a/xen/arch/x86/mm/p2m.c
> +++ b/xen/arch/x86/mm/p2m.c
> @@ -1041,7 +1041,8 @@ int p2m_mem_paging_prep(struct domain *d
>                      p2m_ram_rw, a);
>      set_gpfn_from_mfn(mfn_x(mfn), gfn);
>  
> -    atomic_dec(&d->paged_pages);
> +    if ( !page_extant )
> +        atomic_dec(&d->paged_pages);
>  
>      ret = 0;
>  

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.