[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


  • To: "Olaf Hering" <olaf@xxxxxxxxx>
  • From: "Andres Lagar-Cavilla" <andres@xxxxxxxxxxxxxxxx>
  • Date: Thu, 26 Jan 2012 02:47:20 -0800
  • Cc: andres@xxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, tim@xxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Thu, 26 Jan 2012 10:47:57 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=message-id :in-reply-to:references:date:subject:from:to:cc:reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= lagarcavilla.org; b=uie0dtvBoeNUV6Aw8WCouGZvrlzrcf4mNv/pTPusOn1y xLfIr11Zy3aTOAwqC2RejsJEteHTkw/w+PPUDHn6w+zR4gOvsKjkPrNr9bxM6GNr HiTY/6mTa4apTmhDTjvO3b6veNjkJ+3g1hSvb1qEAeDnROoZB9ejpQl98cWmCUY=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

> 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

Hi Olaf,

there is a put_page in case things go wrong, after the alloc_domheap_page
call. So doing the decrement at alloc is a bit too soon.

Thanks
Andres
>
>> 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®.