dom0/qmemman: distribute memory freed by deleted domain
Also wait a moment after domain list change for domain cleanup. Even if this time is not sufficient, memory will be balanced when some domain need it.
This commit is contained in:
parent
429c685f1d
commit
bd447308fe
@ -28,6 +28,7 @@ class SystemState:
|
||||
|
||||
def del_domain(self, id):
|
||||
self.domdict.pop(id)
|
||||
self.do_balance()
|
||||
|
||||
def get_free_xen_memory(self):
|
||||
return self.xc.physinfo()['free_memory']*1024
|
||||
|
@ -33,6 +33,7 @@ class XS_Watcher:
|
||||
self.watch_token_dict = {}
|
||||
|
||||
def domain_list_changed(self, param):
|
||||
time.sleep(0.05)
|
||||
curr = self.handle.ls('', '/local/domain')
|
||||
if curr == None:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user