Marek Marczykowski
dccc528144
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.
2011-05-12 17:36:47 +02:00
Marek Marczykowski
b57b41aafa
dom0: qmemman: Support for maxmem != physical memory ( #235 )
2011-05-12 15:20:26 +02:00
Rafal Wojtczuk
6067be29df
qmemman: add comments, make some identifiers more verbose
2011-05-04 17:58:28 +02:00
Rafal Wojtczuk
18e207cbc5
qmemman: prefix variables read from xenstore with "untrusted_"
...
Additionally move all already existing checks to an already
existing is_meminfo_suspicious procedure.
2011-05-04 17:10:01 +02:00
Rafal Wojtczuk
c411519220
qmemman: do not trim the mem-set value too much
...
We used to mem-set the domain to 0.995*calculated_value; 5 promils of 4GB
is ca 19MB, and it is too visible. Use 0.999 instead of 0.995
2010-09-16 16:40:09 +02:00
Rafal Wojtczuk
e476531b0e
Leave XEN_FREE_MEM_LEFT of Xen free memory.
...
Needed for driver domain, to be able to get contiguous memory for
its drivers.
2010-09-16 15:57:11 +02:00
Rafal Wojtczuk
7545789a26
qmemman: now parse_meminfo takes a single argument
2010-09-09 11:30:02 +02:00
Rafal Wojtczuk
9c609a23bf
qmemman: move /proc/meminfo parsing to qmemman_algo
...
Just cosmetics, to make code layout more coherent.
2010-09-09 11:24:04 +02:00
Rafal Wojtczuk
24b3baf063
qmemman: use 'Memtotal' from /proc/meminfo to calculate used memory
...
Previously, memory_actual (retrieved from xen) was used; it can be inconsistent.
'Memtotal' can be spoofed, but anyway we rely on other fields from /proc/meminfo.
2010-09-09 11:08:20 +02:00
Rafal Wojtczuk
87d1e973c7
qmemman: print balance stats only when updating
2010-09-09 10:29:35 +02:00
Rafal Wojtczuk
10408d61db
qmemman: when low on memory, do not make a VM go below prefmem
...
Now the balance() has two different cases: enough memory and low_on_memory.
In the former, distribute memory proportianally; in the former, dont do this, as this
makes a VM go below prefmem.
2010-09-01 12:40:02 +02:00
Rafal Wojtczuk
62487c0f1e
Memory management across VMs, first release
2010-08-30 11:40:19 +02:00