I setted IONSIZE to 0, but free linux memory shows about 55.3mb. Where is 64 mb? Maybe difference is left to RTOS, but I do not need it. How may I change settings to build image with 64mb ram available to linux? Thank you!
I see about the same when I tried to recreate. It is plausible that you need to subtract kernel memory as well as RTOS memory from the 64 MB. But is the 8 MB drop you see excessive? How much free RAM do you observe, @kinsa?
it is stated that system has 64768K physical memory. It is becase 64768K + 768K = 65536K, where 768K is used for RTOS.
it is stated that 56468K of 64768K is available for use.
So 64768K - 56468K = 8300K is lost somewhere. This value is equal to reserved value of dmesg output. By the way it is calculated and printed in page_alloc.c file of kernel code.
It seems that these 8300K reserved is a sum of the following:
plus SWIOTLB size on some systems, but this is not a case for Milk-v.
plus cma-reserved size, which is 0 for Milk-v.
So we have explained 8059Kb = 6085Kb for kernel code and it’s data structures (handles, pipes, etc) + 1024Kb of struct page + 950Kb of min_free_bytes. And 241Kb lost for some other reasons that I cannot find.
p.s. I think that reserved wording for dmesg is incorrect and misleading. The better will be something like total used by kernel.