From: Tim Deegan <tim@xen.org>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Ian.Campbell@citrix.com
Subject: Re: [PATCH] xen/arm: map_domain_page: reuse slots with avail == 0
Date: Fri, 27 Sep 2013 19:24:07 +0100 [thread overview]
Message-ID: <20130927182407.GA72104@ocelot.phlegethon.org> (raw)
In-Reply-To: <1380303917-30212-1-git-send-email-stefano.stabellini@eu.citrix.com>
At 18:45 +0100 on 27 Sep (1380307517), Stefano Stabellini wrote:
> If a slot has avail == 0 but still points to the right mfn, reuse it.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
> xen/arch/arm/mm.c | 15 ++++++++-------
> 1 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index 44ec0e3..cbcb769 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -232,7 +232,13 @@ void *map_domain_page(unsigned long mfn)
> i < DOMHEAP_ENTRIES;
> slot = (slot + 1) % DOMHEAP_ENTRIES, i++ )
> {
> - if ( map[slot].pt.avail == 0 )
> + if ( map[slot].pt.avail < 0xf && map[slot].pt.base == slot_mfn )
This needs to check pt.valid as well, in case this path is ever used to
map frame 0.
Tim.
next prev parent reply other threads:[~2013-09-27 18:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 17:45 [PATCH] xen/arm: map_domain_page: reuse slots with avail == 0 Stefano Stabellini
2013-09-27 18:24 ` Tim Deegan [this message]
2013-09-30 12:04 ` Stefano Stabellini
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=20130927182407.GA72104@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=Ian.Campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).