ia64/xen-unstable

changeset 13333:717f64715f32

Do not call refreshShutdown in XendDomain for VM-list operations, as this
is unnecessary and expensive.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Jan 09 11:52:15 2007 +0000 (2007-01-09)
parents 6d6a4d5801bd
children 9518bff7c762
files tools/python/xen/xend/XendDomain.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomain.py	Tue Jan 09 10:50:46 2007 +0000
     1.2 +++ b/tools/python/xen/xend/XendDomain.py	Tue Jan 09 11:52:15 2007 +0000
     1.3 @@ -377,7 +377,7 @@ class XendDomain:
     1.4              dom0.setVCpuCount(target)
     1.5  
     1.6  
     1.7 -    def _refresh(self):
     1.8 +    def _refresh(self, refresh_shutdown = True):
     1.9          """Refresh the domain list. Needs to be called when
    1.10          either xenstore has changed or when a method requires
    1.11          up to date information (like uptime, cputime stats).
    1.12 @@ -393,7 +393,7 @@ class XendDomain:
    1.13          for dom in running:
    1.14              domid = dom['domid']
    1.15              if domid in self.domains:
    1.16 -                self.domains[domid].update(dom)
    1.17 +                self.domains[domid].update(dom, refresh_shutdown)
    1.18              elif domid not in self.domains and dom['dying'] != 1:
    1.19                  try:
    1.20                      new_dom = XendDomainInfo.recreate(dom, False)
    1.21 @@ -495,7 +495,7 @@ class XendDomain:
    1.22          """
    1.23          self.domains_lock.acquire()
    1.24          try:
    1.25 -            self._refresh()
    1.26 +            self._refresh(refresh_shutdown = False)
    1.27              dom = self.domain_lookup_nr(domid)
    1.28              if not dom:
    1.29                  raise XendError("No domain named '%s'." % str(domid))
    1.30 @@ -731,7 +731,7 @@ class XendDomain:
    1.31          
    1.32          self.domains_lock.acquire()
    1.33          try:
    1.34 -            self._refresh()
    1.35 +            self._refresh(refresh_shutdown = False)
    1.36              
    1.37              # active domains
    1.38              active_domains = self.domains.values()