From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH][TOOLS] xend: minor ballooning cleanup Date: Tue, 10 Jun 2008 15:28:43 +0200 Message-ID: <200806101528.43603.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_LGoTIFkh9oa1lRL" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_LGoTIFkh9oa1lRL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi! In xend/balloon.py, there's only one place where dom0_start_alloc_mb is used. Attached patch moves its initialization to right before its usage. Signed-off-by: Christoph Egger =2D-=20 AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Gesch=E4ftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplement=E4r: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Gesch=E4ftsf=FChrer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy --Boundary-00=_LGoTIFkh9oa1lRL Content-Type: text/x-diff; charset="us-ascii"; name="tools_xend.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="tools_xend.diff" diff -r d77214a97e04 tools/python/xen/xend/balloon.py --- a/tools/python/xen/xend/balloon.py Tue Jun 10 13:50:31 2008 +0100 +++ b/tools/python/xen/xend/balloon.py Tue Jun 10 15:17:52 2008 +0200 @@ -96,7 +96,6 @@ def free(need_mem): xoptions = XendOptions.instance() dom0 = XendDomain.instance().privilegedDomain() xc = xen.lowlevel.xc.xc() - dom0_start_alloc_mb = get_dom0_current_alloc() / 1024 try: dom0_min_mem = xoptions.get_dom0_min_mem() * 1024 @@ -176,6 +175,7 @@ def free(need_mem): (need_mem, dom0_min_mem, dom0_min_mem, free_mem + scrub_mem + dom0_alloc - dom0_min_mem)) else: + dom0_start_alloc_mb = get_dom0_current_alloc() / 1024 dom0.setMemoryTarget(dom0_start_alloc_mb) raise VmError( ('Not enough memory is available, and dom0 cannot' --Boundary-00=_LGoTIFkh9oa1lRL Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_LGoTIFkh9oa1lRL--