Changeset 1693:cb5dc562602f
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1684
|
r1693
|
|
| 222 | 222 | yield self.__restore_boot_shutdown_state() |
| 223 | 223 | self.__update_accounts() |
| 224 | | yield self.__vmm.idle() |
| | 224 | yield self.__vmm.idle(self.lock) |
| 225 | 225 | yield True |
| 226 | 226 | |
| … |
… |
|
| 936 | 936 | |
| 937 | 937 | self.lock.release() |
| 938 | | yield self.__vmm.idle() |
| | 938 | yield self.__vmm.idle(self.lock) |
| 939 | 939 | yield True |
| 940 | 940 | |
-
|
r1683
|
r1693
|
|
| 215 | 215 | self.__iface_bridge = bridge |
| 216 | 216 | |
| 217 | | def idle(self): |
| | 217 | def idle(self, lock): |
| 218 | 218 | # Measure recent load to see if this is a good time to fill |
| 219 | 219 | # cache. |
| | 220 | if lock.locked: |
| | 221 | yield True |
| | 222 | return |
| 220 | 223 | info = self._xen_low_level.domain_getinfo() |
| 221 | 224 | total = sum([d['cpu_time'] for d in info]) |