From 9ed6b94d63aedd54c37ba3570007179a6fd0797d Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Tue, 7 Jun 2011 15:56:11 +0200 Subject: [PATCH] dom0/qmemman: Check for memory_maximum also for dom0 --- dom0/qmemman/qmemman_algo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dom0/qmemman/qmemman_algo.py b/dom0/qmemman/qmemman_algo.py index 22c3feb5..e64c76de 100755 --- a/dom0/qmemman/qmemman_algo.py +++ b/dom0/qmemman/qmemman_algo.py @@ -60,7 +60,7 @@ def prefmem(domain): CACHE_FACTOR = 1.3 #dom0 is special, as it must have large cache, for vbds. Thus, give it a special boost if domain.id == '0': - return domain.mem_used*CACHE_FACTOR + 350*1024*1024 + return min(domain.mem_used*CACHE_FACTOR + 350*1024*1024, domain.memory_maximum) return min(domain.mem_used*CACHE_FACTOR, domain.memory_maximum) def memory_needed(domain):