xen/xenpaging.optimize_p2m_mem_paging_populate.patch
Charles Arnold 9a05aa7fc4 - bnc#658704 - SLES11 SP1 Xen boot panic in x2apic mode
22707-x2apic-preenabled-check.patch
- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed:
  Cannot allocate memory"
  7434-qemu-rlimit-as.patch
- Additional or upstream patches from Jan
  22693-fam10-mmio-conf-base-protect.patch
  22694-x86_64-no-weak.patch
  22708-xenctx-misc.patch
  21432-4.0-cpu-boot-failure.patch
  22645-amd-flush-filter.patch
  qemu-fix-7433.patch

- Maintain compatibility with the extid flag even though it is
  deprecated for both legacy and sxp config files.
  hv_extid_compatibility.patch 

- bnc#649209-improve suspend eventchn lock
  suspend_evtchn_lock.patch

- Removed the hyper-v shim patches in favor of using the upstream 
  version. 

- bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap
  failed: Cannot allocate memory" 
  qemu-rlimit-as.patch

- Upstream c/s 7433 to replace qemu_altgr_more.patch
  7433-qemu-altgr.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
2011-01-14 18:24:51 +00:00

47 lines
1.5 KiB
Diff

Subject: xenpaging: optimize p2m_mem_paging_populate
p2m_mem_paging_populate will always put another request in the ring. To
reduce pressure on the ring, place only required requests in the ring.
If the gfn was already processed by another thread, and the current vcpu
does not need to be paused, p2m_mem_paging_resume will do nothing with
the request. And also xenpaging will drop the request if the vcpu does
not need a wakeup.
(xen-unstable changeset: 22444:7fe9cad00e15)
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
xen/arch/x86/mm/p2m.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- xen-4.0.1-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-4.0.1-testing/xen/arch/x86/mm/p2m.c
@@ -2567,12 +2567,12 @@ void p2m_mem_paging_populate(struct doma
mem_event_request_t req;
p2m_type_t p2mt;
- memset(&req, 0, sizeof(req));
-
/* Check that there's space on the ring for this request */
if ( mem_event_check_ring(d) )
return;
+ memset(&req, 0, sizeof(req));
+
/* Fix p2m mapping */
/* XXX: It seems inefficient to have this here, as it's only needed
* in one case (ept guest accessing paging out page) */
@@ -2590,6 +2590,11 @@ void p2m_mem_paging_populate(struct doma
vcpu_pause_nosync(v);
req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
}
+ else if ( p2mt != p2m_ram_paging_out && p2mt != p2m_ram_paged )
+ {
+ /* gfn is already on its way back and vcpu is not paused */
+ return;
+ }
/* Send request to pager */
req.gfn = gfn;