From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>, Keir Fraser <keir@xen.org>
Subject: Re: [PATCH v2] x86/PoD: shorten certain operations on higher order ranges
Date: Tue, 29 Sep 2015 13:20:40 +0100 [thread overview]
Message-ID: <560A8218.90405@citrix.com> (raw)
In-Reply-To: <56096B3902000078000A63BE@prv-mh.provo.novell.com>
On 28/09/15 15:30, Jan Beulich wrote:
> Now that p2m->get_entry() always returns a valid order, utilize this
> to accelerate some of the operations in PoD code. (There are two uses
> of p2m->get_entry() left which don't easily lend themselves to this
> optimization.)
>
> Also adjust a few types as needed and remove stale comments from
> p2m_pod_cache_add() (to avoid duplicating them yet another time).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> v2: Add a code comment in p2m_pod_decrease_reservation().
>
> --- a/xen/arch/x86/mm/p2m-pod.c
> +++ b/xen/arch/x86/mm/p2m-pod.c
> @@ -119,20 +119,23 @@ p2m_pod_cache_add(struct p2m_domain *p2m
>
> unlock_page_alloc(p2m);
>
> - /* Then add the first one to the appropriate populate-on-demand list */
> - switch(order)
> + /* Then add to the appropriate populate-on-demand list. */
> + switch ( order )
> {
> + case PAGE_ORDER_1G:
> + for ( i = 0; i < (1UL << PAGE_ORDER_1G); i += 1UL << PAGE_ORDER_2M )
> + page_list_add_tail(page + i, &p2m->pod.super);
> + break;
> case PAGE_ORDER_2M:
> - page_list_add_tail(page, &p2m->pod.super); /* lock: page_alloc */
> - p2m->pod.count += 1 << order;
> + page_list_add_tail(page, &p2m->pod.super);
> break;
> case PAGE_ORDER_4K:
> - page_list_add_tail(page, &p2m->pod.single); /* lock: page_alloc */
> - p2m->pod.count += 1;
> + page_list_add_tail(page, &p2m->pod.single);
> break;
> default:
> BUG();
> }
> + p2m->pod.count += 1 << order;
1UL
Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
next prev parent reply other threads:[~2015-09-29 12:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 14:30 [PATCH v2] x86/PoD: shorten certain operations on higher order ranges Jan Beulich
2015-09-29 12:20 ` Andrew Cooper [this message]
2015-09-29 12:57 ` Jan Beulich
2015-09-29 13:03 ` Andrew Cooper
2015-09-29 12:58 ` George Dunlap
2015-09-29 16:45 ` George Dunlap
2015-09-30 12:12 ` Jan Beulich
2015-09-30 14:23 ` George Dunlap
2015-09-30 15:40 ` Jan Beulich
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=560A8218.90405@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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.