Hello,
On 17.01.2013 15:19, ??? wrote:
Samsung Enterprise Portal mySingle
Dear. Genode .
I saw a issue when i build demo program with linux_x86 mode.
See bold text at following printed text.
I think that init process of genode is always received 79 MB memory space when genode started.
I want to manipulate memory size up to about 500 MB.
Could you please advice me to solve this issue.
int main():153: --- create local services --- int main():204: --- start init --- int main():227: *transferred 79 MB to init* int main():234: --- init created, waiting for exit condition --- [init] parent provides [init] service "ROM" [init] service "RAM" [init] service "IRQ" [init] service "IO_MEM" [init] service "IO_PORT" [init] service "CAP" [init] service "PD" [init] service "RM" [init] service "CPU"
Best regards.
Eunseok
you can change this memory limit in the file 'base-linux/src/core/platform.cc', it's the line which says:
static char _core_mem[80*1024*1024];
Christian
I find this value quite big on my 1 Gb computer while make run/sdl on Linux 64b: spawn ./core int main(): --- create local services --- int main(): --- start init --- int main(): transferred 17592186044415 MB to init int main(): --- init created, waiting for exit condition --- Quota exceeded! amount=4096, size=4096, consumed=4096 [init] upgrading quota donation for SIGNAL session [init -> test-sdl] Starting ldso ... [init -> test-sdl] Starting application ... environ: 7fff62b3f338
17592186044415 MB ... that would be ... 17592186044 GB ?
Hi Paul,
On 18/01/13 14:47, Paul Dufresne wrote:
I find this value quite big on my 1 Gb computer while make run/sdl on
Linux 64b:
spawn ./core int main(): --- create local services --- int main(): --- start init --- int main(): transferred 17592186044415 MB to init int main(): --- init created, waiting for exit condition ---
[…]
platfrom()->ram_alloc()->avail() currently returns ~0 on base-linux, which is used to calculate the init_quota. At first sight it actually should match the size of _core_mem[].
Josef
Hello,
I find this value quite big on my 1 Gb computer while make run/sdl on
Linux 64b:
spawn ./core int main(): --- create local services --- int main(): --- start init --- int main(): transferred 17592186044415 MB to init int main(): --- init created, waiting for exit condition ---
[…]
platfrom()->ram_alloc()->avail() currently returns ~0 on base-linux, which is used to calculate the init_quota. At first sight it actually should match the size of _core_mem[].
let me try out to shed some light on the confusing message and the role of '_core_mem'.
The static array (originally called '_some_mem') was used to mimic the physical memory model in line with the L4 base platforms. So core's allocators would operate on it similarly of how core on L4 operates on the physical RAM. Hence, the size of the array used to implicitly define the initial quota of the init process. However, the static array was just as a hackish solution cranked out at the very beginning of Genode's development. It just stayed there because Genode on Linux was solely used as a development vehicle by ourselves.
The original approach had several limitations. The most important being that it artificially constraints the memory usable by the Genode system - as just observed by Eunseok. Also, on Linux, Genode's quotas are actually not at all effective. Because each Genode process is just a Linux process, nobody is stopping it from allocating as much anonymous memory (using mmap) as it wants - regardless of the quotas defined by Genode.
Now, with observing that Genode on Linux actually grows in popularity, I revisited the code and abandoned the original static array. Here is the patch:
https://github.com/genodelabs/genode/commit/f081733f4b6f67b7365e9e739f722563...
Because Genode's quotas do not make too much sense on Linux anyway, I decided to set the quota to the maximum value possible (~0). On 64-bit systems, this looks a bit funny. So maybe we should use a more sensible value instead. But in any case, it is pretty arbitrary.
So why is there still the '_core_mem' array? This one has actually nothing to do with Genode's quota anymore. It is simply the backing store for meta data allocated by core.
Apparently, the output Paul just posted is generated by a Genode version newer than the patch. In contrast, the output Eunseok posted comes from a version older than the patch.
The confusion is just perfect. ;-)
Cheers Norman