From: Gianluca Guida <glguida@gmail.com>
To: xen-devel@lists.xensource.com, Keir Fraser <keir@xen.org>
Cc: Tim Deegan <tim@xen.org>, Jan Beulich <JBeulich@suse.com>,
Gianluca Guida <gianluca.guida@citrix.com>
Subject: [PATCH] [shadow] Disable higher level pagetables early unshadow only when the "process dying" hypercall is used.
Date: Wed, 16 Nov 2011 05:44:50 -0800 [thread overview]
Message-ID: <CAKpvNa2tp7Ha=8kOsYyTjnWyo46YPQU678iS9aq=CfbzDOf17A@mail.gmail.com> (raw)
This patch fixes a performance problem in fully virtualized guests.
Should be backported to xen-4.0 and xen-4.1. This patch applies (with
slightly different offsets) to all three versions.
Signed-off-by: Gianluca Guida <gianluca.guida@citrix.com>
Tested-by: Jan Beulich <jbeulich@suse.com>
diff -r 068d3d55ce6e xen/arch/x86/mm/shadow/multi.c
--- a/xen/arch/x86/mm/shadow/multi.c Tue Nov 01 19:03:38 2011 +0000
+++ b/xen/arch/x86/mm/shadow/multi.c Wed Nov 16 14:30:57 2011 -0800
@@ -2723,8 +2723,9 @@
|| ( !v->domain->arch.paging.shadow.pagetable_dying_op
&&
v->arch.paging.shadow.last_emulated_mfn_for_unshadow == mfn_x(gmfn) )
)
&& sh_mfn_is_a_page_table(gmfn)
- && !(mfn_to_page(gmfn)->shadow_flags
- & (SHF_L2_32|SHF_L2_PAE|SHF_L2H_PAE|SHF_L4_64)) )
+ && (!v->domain->arch.paging.shadow.pagetable_dying_op ||
+ !(mfn_to_page(gmfn)->shadow_flags
+ & (SHF_L2_32|SHF_L2_PAE|SHF_L2H_PAE|SHF_L4_64))) )
{
perfc_incr(shadow_early_unshadow);
sh_remove_shadows(v, gmfn, 1, 0 /* Fast, can fail to unshadow */ );
next reply other threads:[~2011-11-16 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 13:44 Gianluca Guida [this message]
2011-12-14 15:58 ` [PATCH] [shadow] Disable higher level pagetables early unshadow only when the "process dying" hypercall is used George Dunlap
2011-12-14 16:19 ` Gianluca Guida
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='CAKpvNa2tp7Ha=8kOsYyTjnWyo46YPQU678iS9aq=CfbzDOf17A@mail.gmail.com' \
--to=glguida@gmail.com \
--cc=JBeulich@suse.com \
--cc=gianluca.guida@citrix.com \
--cc=keir@xen.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 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).