[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Remove tab indents



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1258959155 0
# Node ID bcc6cd1122ea5ba01c6067c5197e5935caf2423d
# Parent  218e9e47fa507acae30cf0e62b6ba33861a7be4a
xend: Remove tab indents

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py    |   88 ++++++++++++++---------------
 tools/python/xen/xend/XendNode.py          |    8 +-
 tools/python/xen/xend/XendXSPolicyAdmin.py |    2 
 3 files changed, 49 insertions(+), 49 deletions(-)

diff -r 218e9e47fa50 -r bcc6cd1122ea tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Nov 23 06:48:14 2009 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Nov 23 06:52:35 2009 +0000
@@ -2653,50 +2653,50 @@ class XendDomainInfo:
 
     def _freeDMAmemory(self, node):
 
-       # If we are PV and have PCI devices the guest will
-       # turn on a SWIOTLB. The SWIOTLB _MUST_ be located in the DMA32
-       # zone (under 4GB). To do so, we need to balloon down Dom0 to where
-       # there is enough (64MB) memory under the 4GB mark. This balloon-ing
-       # might take more memory out than just 64MB thought :-(
-       if not self.info.is_pv_and_has_pci():
-               return
-
-       retries = 2000
-       ask_for_mem = 0;
-       need_mem = 0
-       try:            
-           while (retries > 0):
-               physinfo = xc.physinfo()
-               free_mem = physinfo['free_memory']
-               nr_nodes = physinfo['nr_nodes']
-               node_to_dma32_mem = physinfo['node_to_dma32_mem']
-               if (node > nr_nodes):
-                    return;
-               # Extra 2MB above 64GB seems to do the trick.
-               need_mem = 64 * 1024 + 2048 - node_to_dma32_mem[node]
-               # our starting point. We ask just for the difference to
-               # be have an extra 64MB under 4GB.
-               ask_for_mem = max(need_mem, ask_for_mem);
-               if (need_mem > 0):
-                    log.debug('_freeDMAmemory (%d) Need %dKiB DMA memory. '
-                              'Asking for %dKiB', retries, need_mem,
-                              ask_for_mem)
-
-                    balloon.free(ask_for_mem, self)
-                    ask_for_mem = ask_for_mem + 2048;
-               else:
-                    # OK. We got enough DMA memory.
-                    break
-               retries  = retries - 1
-       except:
-           # This is best-try after all.
-           need_mem = max(1, need_mem);
-           pass
-
-       if (need_mem > 0):
-           log.warn('We tried our best to balloon down DMA memory to '
-                    'accomodate your PV guest. We need %dKiB extra memory.',
-                    need_mem)
+        # If we are PV and have PCI devices the guest will
+        # turn on a SWIOTLB. The SWIOTLB _MUST_ be located in the DMA32
+        # zone (under 4GB). To do so, we need to balloon down Dom0 to where
+        # there is enough (64MB) memory under the 4GB mark. This balloon-ing
+        # might take more memory out than just 64MB thought :-(
+        if not self.info.is_pv_and_has_pci():
+            return
+
+        retries = 2000
+        ask_for_mem = 0
+        need_mem = 0
+        try:
+            while (retries > 0):
+                physinfo = xc.physinfo()
+                free_mem = physinfo['free_memory']
+                nr_nodes = physinfo['nr_nodes']
+                node_to_dma32_mem = physinfo['node_to_dma32_mem']
+                if (node > nr_nodes):
+                    return
+                # Extra 2MB above 64GB seems to do the trick.
+                need_mem = 64 * 1024 + 2048 - node_to_dma32_mem[node]
+                # our starting point. We ask just for the difference to
+                # be have an extra 64MB under 4GB.
+                ask_for_mem = max(need_mem, ask_for_mem);
+                if (need_mem > 0):
+                    log.debug('_freeDMAmemory (%d) Need %dKiB DMA memory. '
+                              'Asking for %dKiB', retries, need_mem,
+                              ask_for_mem)
+
+                    balloon.free(ask_for_mem, self)
+                    ask_for_mem = ask_for_mem + 2048
+                else:
+                    # OK. We got enough DMA memory.
+                    break
+                retries = retries - 1
+        except:
+            # This is best-try after all.
+            need_mem = max(1, need_mem)
+            pass
+
+        if (need_mem > 0):
+            log.warn('We tried our best to balloon down DMA memory to '
+                     'accomodate your PV guest. We need %dKiB extra memory.',
+                     need_mem)
 
     def _setSchedParams(self):
         if XendNode.instance().xenschedinfo() == 'credit':
diff -r 218e9e47fa50 -r bcc6cd1122ea tools/python/xen/xend/XendNode.py
--- a/tools/python/xen/xend/XendNode.py Mon Nov 23 06:48:14 2009 +0000
+++ b/tools/python/xen/xend/XendNode.py Mon Nov 23 06:52:35 2009 +0000
@@ -896,10 +896,10 @@ class XendNode:
         info['total_memory'] = info['total_memory'] / 1024
         info['free_memory']  = info['free_memory'] / 1024
         info['node_to_cpu']  = self.format_node_to_cpu(info)
-        info['node_to_memory'] = self.format_node_to_memory(info,
-                                       'node_to_memory')
-        info['node_to_dma32_mem'] = self.format_node_to_memory(info,
-                                       'node_to_dma32_mem')
+        info['node_to_memory'] = \
+            self.format_node_to_memory(info, 'node_to_memory')
+        info['node_to_dma32_mem'] = \
+            self.format_node_to_memory(info, 'node_to_dma32_mem')
 
         ITEM_ORDER = ['nr_cpus',
                       'nr_nodes',
diff -r 218e9e47fa50 -r bcc6cd1122ea tools/python/xen/xend/XendXSPolicyAdmin.py
--- a/tools/python/xen/xend/XendXSPolicyAdmin.py        Mon Nov 23 06:48:14 
2009 +0000
+++ b/tools/python/xen/xend/XendXSPolicyAdmin.py        Mon Nov 23 06:52:35 
2009 +0000
@@ -79,7 +79,7 @@ class XSPolicyAdmin:
         rc = 0
         if security.on() == xsconstants.XS_POLICY_ACM:
             rc |= xsconstants.XS_POLICY_ACM
-       else:
+        else:
             rc |= xsconstants.XS_POLICY_FLASK
         return rc
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.