WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost after xend

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart - Correction/Extension of change set 22000
From: "Dube, Lutz" <lutz.dube@xxxxxxxxxxxxxx>
Date: Mon, 30 Aug 2010 09:31:13 +0200
Accept-language: de-DE, en-US
Acceptlanguage: de-DE, en-US
Delivery-date: Mon, 30 Aug 2010 00:33:19 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=lutz.dube@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1283153275; x=1314689275; h=from:to:date:subject:message-id:mime-version; z=From:=20"Dube,=20Lutz"=20<lutz.dube@xxxxxxxxxxxxxx>|To: =20"xen-devel@xxxxxxxxxxxxxxxxxxx"=20<xen-devel@xxxxxxxxx source.com>|Date:=20Mon,=2030=20Aug=202010=2009:31:13=20+ 0200|Subject:=20[PATCH]=20Values=20of=20cpu_weight=20and =20cpu_cap=20are=20lost=20after=20xend=0D=0A=20restart=20 -=20Correction/Extension=20of=20change=20set=2022000 |Message-ID:=20<3958B14F314B884890EEE2F4CCDAB6A60113C1C49 51F@xxxxxxxxxxxxxxxx>|MIME-Version:=201.0; bh=rdjp80wn1TGpDrdxHkBU/GTnAE3T6ZX0KzRsqoRrQ/4=; b=BJL+Bx5PUcZeqLZ4HRuCZ8UmMI9EB4TMiau9Ztqpf5BnDEMRLqsYj4rS OgYPrB1efpgF1SU58i4USkejTZh0g036gZI9fH2Uspdd3UQ9+FrZQfhPN +IlosAsNjcL4M8YEuWuP+429FLKJx+4yqUSmYS+gHu1dV5IiMd++eDRMQ UdyGqWVQ/I+hw0UO31Y0PMSFtV+G/YNUq+9+P58ikXmvESQX2HfpcWlrD PP+TJoZp0R6C9lBq/QjlrD1UoYePp;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:Received:From:To:Date: Subject:Thread-Topic:Thread-Index:Message-ID: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:acceptlanguage:Content-Type: MIME-Version; b=kobWaerkwKX41/6yjONgJpf8qMYFRhVIkbpHseDZNeliV1UKclRuMbrX Lq//W/+7VnPsGBOFHEmSqaGMIcqt3sYK2PHcXyTEMnmeF8r+CLYezBU6k rHkkQidjJnQZUj69WhJb/YkmxPS27/prRmtpYBTuTd8M+b5dTBtAY0fha TifRJIzsmET4zgyVGbTw8jv3hQuTKTimL8Xeux9Hw3VAgOR/jA49Yedyf QizEY1DI44D+tqlJrdLJz0Bbzj1to;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: ActIFVMXnxBAgIVBSSuys2uOCENm7g==
Thread-topic: [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart - Correction/Extension of change set 22000
# HG changeset patch
# User Lutz.Dube
# Node ID 72ab023329a873e86be90c469d716cf7c9483e77
# Parent  3c4c3d48a8350994f4450314c6b759771c7ad4ef
Correction/Extension of change set 22000:4fc66044477d:
Values of cpu_weight and cpu_cap are lost after xend restart.
 
Values of cpu_weight and cpu_cap taken from managed SXP file have to
be converted from str to int.
 
Signed-off-by: Lutz Dube Lutz.Dube@xxxxxxxxxxxxxx
 
diff -r 3c4c3d48a835 -r 72ab023329a8 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Aug 26 11:16:56 2010 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Mon Aug 30 09:17:44 2010 +0200
@@ -689,9 +689,14 @@ class XendConfig(dict):
         if not cfg["vcpus_params"].has_key("weight"):
             cfg["vcpus_params"]["weight"] = \
                 int(sxp.child_value(sxp_cfg, "cpu_weight", 256))
+        else:
+            cfg["vcpus_params"]["weight"] = int(cfg["vcpus_params"]["weight"])
+           
         if not cfg["vcpus_params"].has_key("cap"):
             cfg["vcpus_params"]["cap"] = \
                 int(sxp.child_value(sxp_cfg, "cpu_cap", 0))
+        else:
+            cfg["vcpus_params"]["cap"] = int(cfg["vcpus_params"]["cap"])
 
         # Only extract options we know about.
         extract_keys = LEGACY_UNSUPPORTED_BY_XENAPI_CFG + \
 
 
---
Best regards
 
Lutz Dube
Softwareentwickler
TSP ES&S SWE OS7
 
FUJITSU TECHNOLOGY SOLUTIONS GMBH
Domagkstr. 28
D-80807 München
 
Telefon:        +49 (0)89 3222 2688
Telefax:        +49 (0)89 3222 329 2688
Email:          Lutz Dube@xxxxxxxxxxxxxx
 
Internet:        http://ts.fujitsu.com
 
 
 
 

Attachment: patch-cap_weight_corr
Description: patch-cap_weight_corr

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Values of cpu_weight and cpu_cap are lost after xend restart - Correction/Extension of change set 22000, Dube, Lutz <=