1
0

dom0: qmemman: distribute memory only if there are VMs which can accept it

This prevent potential inifinite loop in qmemman when free memory cannot be
assigned to any VM (because of static max). Practically this will never happen,
because dom0 can always accept memory.
Dieser Commit ist enthalten in:
Marek Marczykowski 2011-05-12 17:36:47 +02:00
Ursprung b57b41aafa
Commit dccc528144

Datei anzeigen

@ -126,7 +126,7 @@ def balance_when_enough_memory(domain_dictionary, xen_free_memory, total_mem_pre
acceptors_count += 1 acceptors_count += 1
target_memory[i] = target target_memory[i] = target
# distribute left memory across all acceptors # distribute left memory across all acceptors
while left_memory > 0: while left_memory > 0 and acceptors_count > 0:
print ' left_memory:', left_memory, 'acceptors_count:', acceptors_count print ' left_memory:', left_memory, 'acceptors_count:', acceptors_count
new_left_memory = 0 new_left_memory = 0
for i in target_memory.keys(): for i in target_memory.keys():