From: Andre Przywara <andre.przywara@amd.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Maik Hentsche <maik.hentsche@amd.com>,
xen-devel@lists.xensource.com
Subject: [PATCH] xend: fix ballooning bug
Date: Tue, 13 Jan 2009 10:37:15 +0100 [thread overview]
Message-ID: <496C60CB.6090108@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
Hi,
c/s 18960 introduced a bug when xend balloons memory. The function
balloon.free requires a reference to a XendDomainInfo object, which is
missing in one call of this function. Attached patch fixes this. Also
replaced the variable name "self" in the (classless) function with
something more descriptive.
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Reported-by: Maik Hentsche <maik.hentsche@amd.com>
Regards,
Andre.
--
Andre Przywara
AMD-Operating System Research Center (OSRC), Dresden, Germany
Tel: +49 351 277-84917
----to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Jochen Polster; Thomas M. McCoy; Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: balloon_free.patch --]
[-- Type: text/x-patch, Size: 1403 bytes --]
diff -r 5ad9fc3c896f tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Jan 12 16:39:07 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Jan 13 10:27:28 2009 +0100
@@ -1199,7 +1199,7 @@
if self.domid >= 0:
if target > memory_cur:
- balloon.free( (target-memory_cur)*1024 )
+ balloon.free((target - memory_cur) * 1024, self)
self.storeVm("memory", target)
self.storeDom("memory/target", target << 10)
xc.domain_set_target_mem(self.domid,
diff -r 5ad9fc3c896f tools/python/xen/xend/balloon.py
--- a/tools/python/xen/xend/balloon.py Mon Jan 12 16:39:07 2009 +0000
+++ b/tools/python/xen/xend/balloon.py Tue Jan 13 10:27:28 2009 +0100
@@ -67,7 +67,7 @@
raise VmError('Failed to query target memory allocation of dom0.')
return kb
-def free(need_mem ,self):
+def free(need_mem, dominfo):
"""Balloon out memory from the privileged domain so that there is the
specified required amount (in KiB) free.
"""
@@ -130,7 +130,7 @@
if physinfo['nr_nodes'] > 1 and retries == 0:
oldnode = -1
waitscrub = 1
- vcpus = self.info['cpus'][0]
+ vcpus = dominfo.info['cpus'][0]
for vcpu in vcpus:
nodenum = 0
for node in physinfo['node_to_cpu']:
[-- 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:[~2009-01-13 9:37 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=496C60CB.6090108@amd.com \
--to=andre.przywara@amd.com \
--cc=george.dunlap@eu.citrix.com \
--cc=keir.fraser@eu.citrix.com \
--cc=maik.hentsche@amd.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.