From: Pat Campbell <plc@novell.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] qemu xen-console, limit buffering
Date: Mon, 30 Jun 2008 17:31:38 -0600 [thread overview]
Message-ID: <48696CDA.70007@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
Running this script from within a PV guest without having an xm console
attached can use all dom0 memory.
while [ 1 ]; do ls -lR /usr > /dev/xvc0; done
Start of script: (1% mem usage)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10281 root 15 0 76536 14m 2448 S 2 1.0
0:00.61 qemu-dm
Couple minutes later: (17% mem usage)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10281 root 16 0 291m 231m 2448 R 15 17.0
0:16.34 qemu-dm
Much later: (72.8% mem usage)
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10281 root 15 0 1052m 989m 2448 S 10 72.8
1:13.25 qemu-dm
Attached patch sets dom->buffer.max_capacity to xend configured limit.
Please apply to xen-unstable tip.
Signed-off-by: Pat Campbell <plc@novell.com>
[-- Attachment #2: qemu-xenconsole-limit.patch --]
[-- Type: text/x-patch, Size: 1211 bytes --]
diff -r c33a40b4c22b tools/ioemu/hw/xen_console.c
--- a/tools/ioemu/hw/xen_console.c Mon Jun 30 14:19:09 2008 +0100
+++ b/tools/ioemu/hw/xen_console.c Mon Jun 30 17:06:22 2008 -0600
@@ -160,16 +160,18 @@ int xs_gather(struct xs_handle *xs, cons
static int domain_create_ring(struct domain *dom)
{
- int err, remote_port, ring_ref, rc;
+ int err, remote_port, ring_ref, limit, rc;
err = xs_gather(dom->xsh, dom->serialpath,
"ring-ref", "%u", &ring_ref,
"port", "%i", &remote_port,
+ "limit", "%i", &limit,
NULL);
if (err) {
err = xs_gather(dom->xsh, dom->conspath,
"ring-ref", "%u", &ring_ref,
"port", "%i", &remote_port,
+ "limit", "%i", &limit,
NULL);
if (err) {
fprintf(stderr, "Console: failed to find ring-ref/port yet\n");
@@ -178,7 +180,9 @@ static int domain_create_ring(struct dom
dom->use_consolepath = 1;
} else
dom->use_consolepath = 0;
- fprintf(stderr, "Console: got ring-ref %d port %d\n", ring_ref, remote_port);
+ dom->buffer.max_capacity = limit;
+ fprintf(stderr, "Console: got ring-ref %d port %d limit %d\n",
+ ring_ref, remote_port, limit);
if ((ring_ref == dom->ring_ref) && (remote_port == dom->remote_port))
goto out;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2008-06-30 23:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48696CDA.70007@novell.com \
--to=plc@novell.com \
--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.