All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EPT: Only sync pcpus on which a domain's vcpus might be running
@ 2009-09-17 17:51 George Dunlap
  2009-09-18  7:43 ` Keir Fraser
  0 siblings, 1 reply; 8+ messages in thread
From: George Dunlap @ 2009-09-17 17:51 UTC (permalink / raw)
  To: xen-devel, Keir Fraser, Tim Deegan, Xin Li, Jun Nakajima, Xiaohu

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

ept_sync_domain() is called whenever the p2m changes.  The current
code calls sync on all cpus; this is extremely wasteful, especially
for a single-vcpu VM on a 16-way (2x4x2) box.

This patch will only call sync on cpus where there may be dirty cpu
state.  I've done a basic test, but I'd appreciate someone from Intel
verifying that there shouldn't be any problems.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>

[-- Attachment #2: 20090917-unstable-ept-sync.diff --]
[-- Type: text/x-diff, Size: 451 bytes --]

diff -r 0814d57b5a29 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Sep 15 11:13:56 2009 +0100
+++ b/xen/arch/x86/hvm/vmx/vmx.c	Thu Sep 17 18:51:30 2009 +0100
@@ -1219,7 +1219,7 @@
     if ( d->arch.hvm_domain.hap_enabled && d->vcpu && d->vcpu[0] )
     {
         ASSERT(local_irq_is_enabled());
-        on_each_cpu(__ept_sync_domain, d, 1);
+        on_selected_cpus(&d->domain_dirty_cpumask, __ept_sync_domain, d, 1);
     }
 }
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-19 10:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-17 17:51 [PATCH] EPT: Only sync pcpus on which a domain's vcpus might be running George Dunlap
2009-09-18  7:43 ` Keir Fraser
2009-09-18  9:09   ` George Dunlap
2009-09-18 13:21     ` Keir Fraser
2009-09-18 14:55       ` George Dunlap
2009-09-18 16:51         ` Paul Durrant
2009-09-18 17:06         ` Dan Magenheimer
2009-09-19 10:34         ` Keir Fraser

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.