From: Olaf Hering <olaf@aepfle.de>
To: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Cc: andres@gridcentric.ca, xen-devel@lists.xensource.com,
tim@xen.org, adin@gridcentric.ca
Subject: Re: [PATCH 6 of 8] x86/mm: Properly account for paged out pages
Date: Thu, 26 Jan 2012 10:54:01 +0100 [thread overview]
Message-ID: <20120126095401.GC21629@aepfle.de> (raw)
In-Reply-To: <d4336e35f0bcb4fcb060.1327550010@xdev.gridcentric.ca>
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;
>
next prev parent reply other threads:[~2012-01-26 9:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-26 3:53 [PATCH 0 of 8] x86/mm fixes Andres Lagar-Cavilla
2012-01-26 3:53 ` [PATCH 1 of 8] x86/mm: Fix paging_load Andres Lagar-Cavilla
2012-01-26 9:46 ` Olaf Hering
2012-01-26 10:49 ` Andres Lagar-Cavilla
2012-01-26 12:05 ` Olaf Hering
2012-01-26 12:23 ` Andres Lagar-Cavilla
2012-01-26 12:43 ` Olaf Hering
2012-01-26 3:53 ` [PATCH 2 of 8] x86/mm: Fix p2m teardown locking Andres Lagar-Cavilla
2012-01-26 3:53 ` [PATCH 3 of 8] x86/mm: Allow foreign read-only mappings of shared pages Andres Lagar-Cavilla
2012-01-26 3:53 ` [PATCH 4 of 8] x86/mm: Output domain count of paged pages in console Andres Lagar-Cavilla
2012-01-26 9:47 ` Olaf Hering
2012-01-26 3:53 ` [PATCH 5 of 8] x86/mm: Remove stale variable from debugtrace printk in p2m audit Andres Lagar-Cavilla
2012-01-26 3:53 ` [PATCH 6 of 8] x86/mm: Properly account for paged out pages Andres Lagar-Cavilla
2012-01-26 9:54 ` Olaf Hering [this message]
2012-01-26 10:47 ` Andres Lagar-Cavilla
2012-01-26 12:11 ` Olaf Hering
2012-01-26 12:26 ` Andres Lagar-Cavilla
2012-01-26 13:08 ` Olaf Hering
2012-01-26 3:53 ` [PATCH 7 of 8] x86/mm: clean use of p2m unlocked queries Andres Lagar-Cavilla
2012-01-26 3:53 ` [PATCH 8 of 8] x86/mm: Avoid spurious deadlock panic trigger Andres Lagar-Cavilla
2012-01-26 13:31 ` [PATCH 0 of 8] x86/mm fixes Tim Deegan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120126095401.GC21629@aepfle.de \
--to=olaf@aepfle.de \
--cc=adin@gridcentric.ca \
--cc=andres@gridcentric.ca \
--cc=andres@lagarcavilla.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.