xen/xenpaging.notify_policy_only_once.patch
Charles Arnold 5a49a4e63b - Upstream patch for python 2.7 compatibility
22045-python27-compat.patch 

Thu Nov  11 18:44:48 CST 2010 - cyliu@novell.com
- bnc#641144 - FV Xen VM running windows or linux cannot write to
  virtual floppy drive
  bdrv_default_rwflag.patch

- fate#310510 - fix xenpaging
  xenpaging.optimize_p2m_mem_paging_populate.patch
  xenpaging.HVMCOPY_gfn_paged_out.patch

- bnc#649864 - automatic numa cpu placement of xen conflicts with
  cpupools
  22326-cpu-pools-numa-placement.patch

- fate#310510 - fix xenpaging
  xenpaging.populate_only_if_paged.patch
  - revert logic, populate needs to happen unconditionally
  xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
  - invalidate current mfn only if gfn is not in flight or done
  xenpaging.mem_event_check_ring-free_requests.patch
  - print info only if 1 instead of 2 slots are free
  xenpaging.guest_remove_page.patch
  - check mfn before usage in resume function
  xenpaging.machine_to_phys_mapping.patch
  - check mfn before usage in resume function

- bnc#552115 - Remove target discovery in block-iscsi

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=82
2010-11-12 17:55:23 +00:00

56 lines
2.1 KiB
Diff

Subject: xenpaging: notify policy only on resume
If a page is requested more than once, the policy is also notified more
than once about the page-in. However, a page-in happens only once. Any
further resume will only unpause the other vcpu. The multiple notify
will put the page into the mru list multiple times and it will unlock
other already resumed pages too early. In the worst case, a page that
was just resumed can be evicted right away, causing a deadlock in the
guest.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenpaging/xenpaging.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- xen-4.0.1-testing.orig/tools/xenpaging/xenpaging.c
+++ xen-4.0.1-testing/tools/xenpaging/xenpaging.c
@@ -377,7 +377,7 @@ int xenpaging_evict_page(xenpaging_t *pa
return ret;
}
-static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp)
+static int xenpaging_resume_page(xenpaging_t *paging, mem_event_response_t *rsp, int notify_policy)
{
int ret;
@@ -387,7 +387,8 @@ static int xenpaging_resume_page(xenpagi
goto out;
/* Notify policy of page being paged in */
- policy_notify_paged_in(paging->mem_event.domain_id, rsp->gfn);
+ if ( notify_policy )
+ policy_notify_paged_in(paging->mem_event.domain_id, rsp->gfn);
/* Tell Xen page is ready */
ret = xc_mem_paging_resume(paging->xc_handle, paging->mem_event.domain_id,
@@ -619,7 +620,7 @@ int main(int argc, char *argv[])
rsp.vcpu_id = req.vcpu_id;
rsp.flags = req.flags;
- rc = xenpaging_resume_page(paging, &rsp);
+ rc = xenpaging_resume_page(paging, &rsp, 1);
if ( rc != 0 )
{
ERROR("Error resuming page");
@@ -648,7 +649,7 @@ int main(int argc, char *argv[])
rsp.vcpu_id = req.vcpu_id;
rsp.flags = req.flags;
- rc = xenpaging_resume_page(paging, &rsp);
+ rc = xenpaging_resume_page(paging, &rsp, 0);
if ( rc != 0 )
{
ERROR("Error resuming");