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-changelog

[Xen-changelog] [xen-unstable] Revert 20066:135b350496fb

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert 20066:135b350496fb
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 16 Aug 2009 01:00:16 -0700
Delivery-date: Sun, 16 Aug 2009 01:00:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250408630 -3600
# Node ID 5079dd1ff24c3b6b89310553bcdd74dd0e63d1e3
# Parent  5619bed51ec49b371a38b9922eaa76cabc4abd6c
Revert 20066:135b350496fb
---
 tools/python/README.sxpcfg            |    1 
 tools/python/xen/xend/server/blkif.py |   43 ++--------------------------------
 2 files changed, 3 insertions(+), 41 deletions(-)

diff -r 5619bed51ec4 -r 5079dd1ff24c tools/python/README.sxpcfg
--- a/tools/python/README.sxpcfg        Fri Aug 14 17:26:23 2009 +0100
+++ b/tools/python/README.sxpcfg        Sun Aug 16 08:43:50 2009 +0100
@@ -82,7 +82,6 @@ vbd
   - uname
   - dev (ioemu:, .. etc)
   - mode (r, w. w!)
-  - credit
 
 vif
   - type
diff -r 5619bed51ec4 -r 5079dd1ff24c tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     Fri Aug 14 17:26:23 2009 +0100
+++ b/tools/python/xen/xend/server/blkif.py     Sun Aug 16 08:43:50 2009 +0100
@@ -42,37 +42,6 @@ class BlkifController(DevController):
 
         return os.access(auxbin.scripts_dir() + '/block-%s' % protocol, 
os.X_OK)
 
-    def _calculateRateLimit(self, credstr):
-        """Calculate the rate limit, given a string like: 5000/s@50ms.
-        If this fails, the limit is unlimited.
-        """
-        credit_per_interval = 0xffffffffL
-        interval_usecs = 0L
-
-        credit_re = re.compile("^([0-9]+)/s(@([0-9]+)([mu]?)s)?$")
-
-        m = credit_re.match(credstr)
-        if m:
-            credit_per_sec = m.group(1)
-
-            if m.group(2) is None:
-                interval_usecs = 50000L      # 50ms default
-            else:
-                interval_usecs = long(m.group(5))
-                if m.group(3) == '':
-                    interval_usecs *= 1000 * 1000
-                elif m.group(3) == 'm':
-                    interval_usecs *= 1000
-
-            credit_per_interval = (credit_per_sec * interval_usecs) / 1000000L
-
-            # overflow / underflow checking: default to unlimited rate
-            if credit_per_interval == 0 or credit_per_interval > 0xffffffffL 
or \
-               interval_usecs == 0 or interval_usecs > 0xffffffffL:
-                credit_per_interval = 0xffffffffL
-                interval_usecs     = 0L
-
-        return "%lu,%lu" % (credit_per_interval, interval_usecs)
 
     def getDeviceDetails(self, config):
         """@see DevController.getDeviceDetails"""
@@ -121,10 +90,6 @@ class BlkifController(DevController):
 
         if security.on() == xsconstants.XS_POLICY_USE:
             self.do_access_control(config, uname)
-
-        cred = config.get('credit', '')
-        if cred:
-            back['credit'] = self._calculateRateLimit(cred)
 
         (device_path, devid) = blkif.blkdev_name_to_number(dev)
         if devid is None:
@@ -188,12 +153,12 @@ class BlkifController(DevController):
         config = DevController.getDeviceConfiguration(self, devid, transaction)
         if transaction is None:
             devinfo = self.readBackend(devid, 'dev', 'type', 'params', 'mode',
-                                       'uuid', 'bootable', 'credit')
+                                       'uuid', 'bootable')
         else:
             devinfo = self.readBackendTxn(transaction, devid,
                                           'dev', 'type', 'params', 'mode', 
'uuid',
-                                          'bootable', 'credit')
-        dev, typ, params, mode, uuid, bootable, credit = devinfo
+                                          'bootable')
+        dev, typ, params, mode, uuid, bootable = devinfo
         
         if dev:
             if transaction is None:
@@ -213,8 +178,6 @@ class BlkifController(DevController):
             config['uuid'] = uuid
         if bootable != None:
             config['bootable'] = int(bootable)
-        if credit:
-            config['credit'] = credit
 
         proto = self.readFrontend(devid, 'protocol')
         if proto:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Revert 20066:135b350496fb, Xen patchbot-unstable <=