From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xensource.com
Subject: [PATCH 1/6] xenpaging: correct dropping pages to avoid full ring buffer
Date: Sun, 16 Jan 2011 17:32:30 +0100 [thread overview]
Message-ID: <20110116163229.462846702@aepfle.de> (raw)
In-Reply-To: 20110116163229.044047464@aepfle.de
[-- Attachment #1: xen-unstable.xenpaging.guest_remove_page.slow_path.patch --]
[-- Type: text/plain, Size: 1869 bytes --]
xenpaging uses the mem_event ring buffer, which expects request/response
pairs to make progress. The previous patch, which tried to establish a
one-way communication from Xen to xenpaging, stalled the guest once the
buffer was filled up with requests. A simple fix is to take the slow path
and let p2m_mem_paging_resume() consume the response from xenpaging.
This makes room for yet another request/response pair and avoids hanging
guests.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
tools/xenpaging/xenpaging.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
--- xen-unstable.hg-4.1.22764.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22764/tools/xenpaging/xenpaging.c
@@ -653,19 +653,19 @@ int main(int argc, char *argv[])
ERROR("Error populating page");
goto out;
}
+ }
- /* Prepare the response */
- rsp.gfn = req.gfn;
- rsp.p2mt = req.p2mt;
- rsp.vcpu_id = req.vcpu_id;
- rsp.flags = req.flags;
+ /* Prepare the response */
+ rsp.gfn = req.gfn;
+ rsp.p2mt = req.p2mt;
+ rsp.vcpu_id = req.vcpu_id;
+ rsp.flags = req.flags;
- rc = xenpaging_resume_page(paging, &rsp, 1);
- if ( rc != 0 )
- {
- ERROR("Error resuming page");
- goto out;
- }
+ rc = xenpaging_resume_page(paging, &rsp, 1);
+ if ( rc != 0 )
+ {
+ ERROR("Error resuming page");
+ goto out;
}
/* Evict a new page to replace the one we just paged in */
next prev parent reply other threads:[~2011-01-16 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-16 16:32 [PATCH 0/6] xenpaging changes for xen-4.1 Olaf Hering
2011-01-16 16:32 ` Olaf Hering [this message]
2011-01-16 16:32 ` [PATCH 2/6] xenpaging: prevent page-out of first 16MB Olaf Hering
2011-01-16 16:32 ` [PATCH 3/6] xenpaging: update machine_to_phys_mapping[] during page deallocation Olaf Hering
2011-01-16 16:32 ` [PATCH 4/6] xenpaging: handle HVMCOPY_gfn_paged_out in copy_from/to_user Olaf Hering
2011-01-16 16:32 ` [PATCH 5/6] xenpaging: start xenpaging via config option Olaf Hering
2011-01-16 16:32 ` [PATCH 6/6] xenpaging: document outstanding features Olaf Hering
2011-01-16 16:50 ` [PATCH 0/6] xenpaging changes for xen-4.1 Keir Fraser
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=20110116163229.462846702@aepfle.de \
--to=olaf@aepfle.de \
--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 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.