Merge remote-tracking branch 'qubesos/pr/59'

* qubesos/pr/59:
  qmemman: actually use the dom0-mem-boost config value
This commit is contained in:
Marek Marczykowski-Górecki 2016-10-03 11:43:06 +02:00
commit e2d4ae2924
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -97,7 +97,7 @@ def refresh_meminfo_for_domain(domain, untrusted_xenstore_key):
def prefmem(domain):
#dom0 is special, as it must have large cache, for vbds. Thus, give it a special boost
if domain.id == '0':
return min(domain.mem_used*CACHE_FACTOR + 350*1024*1024, domain.memory_maximum)
return min(domain.mem_used*CACHE_FACTOR + DOM0_MEM_BOOST, domain.memory_maximum)
return max(min(domain.mem_used*CACHE_FACTOR, domain.memory_maximum), MIN_PREFMEM)
def memory_needed(domain):