Changeset 1693:cb5dc562602f

Show
Ignore:
Timestamp:
07/10/08 10:30:30 (2 months ago)
Author:
klai@…
Branch:
default
Message:

Do not run vmm idle method when another operation is in progress

Location:
src/Tycoon
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/Tycoon/AuctioneerAllocator.py

    r1684 r1693  
    222222        yield self.__restore_boot_shutdown_state() 
    223223        self.__update_accounts() 
    224         yield self.__vmm.idle() 
     224        yield self.__vmm.idle(self.lock) 
    225225        yield True 
    226226 
     
    936936 
    937937        self.lock.release() 
    938         yield self.__vmm.idle() 
     938        yield self.__vmm.idle(self.lock) 
    939939        yield True 
    940940     
  • src/Tycoon/Virtualization/Xen.py

    r1683 r1693  
    215215        self.__iface_bridge = bridge 
    216216 
    217     def idle(self): 
     217    def idle(self, lock): 
    218218        # Measure recent load to see if this is a good time to fill 
    219219        # cache. 
     220        if lock.locked: 
     221            yield True 
     222            return 
    220223        info = self._xen_low_level.domain_getinfo() 
    221224        total = sum([d['cpu_time'] for d in info])