We have a need for ensuring the total RAM available to [Xen / the kernel] at
boot is X MB because there are situations in which you wish to limit the amount
of RAM available to a box. The existing mem= option doesn't work because it
limits the maximum physical address, NOT the amount of available RAM. Many, if
not all, systems contain a substantial memory hole below 4 Gb, typically a 0.5
or 1 Gb hole from 3-4 Gb. Thus, on a system with 6 Gb of RAM, requesting
mem=4096M will yield a box with maximum physical address in the 4 Gb
neighborhood but perhaps only 3 or 3.5 actual gigs of RAM available.
So I propose to add a new kernel argument, which I call totalmem, that limits
the total amount of memory available, ignoring holes. So requesting
totalmem=4096M in the preceding example, the maximum physical address may
extend much higher depending on the size of the memory map hole. An example
patch is attached; it doesn't apply directly to xen-unstable but should provide
an example implementation for discussion; I implemented it to conform to the
changes made to the clip_to_limit function in xen-unstable.
Alternately, we could modify mem= to do this; according to documentation, it
seems that the behavior of totalmem reflects the designer's goal for mem.
However, I would be worried about issues of backwards compatibility, as people
may already be exploiting the current functionality of mem= to directly cut off
the address space. Comments? (P.S. This is my first post to xen-devel so
please be kind :)
Thanks,
Sarina
xen-add-totalmem-kernel-arg.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|