In the linux kernel, mem_map is an array that contains all the "struct page" descriptors. These pages include 128MiB of memory in lowmem for dynamic display of highmem.
Since the size of lowmem is 1GiB, so the mem_map array has only 1GiB / 4KiB = 256KiB entries. If each record size is 32 bytes, mem_map = 8MiB. But if we could use mem_map to map all 4GiB physical memory (if we have so much physical memory available on x86-32), then the mem_map array will occupy 32MiB, is that not so much kernel memory (or am I mistaken?).
So my question is: why should we use this 128MiB in low to indirectly display highmem in the first place? Or in another way, why not map all of this maximum 4GiB physical memory (if available) in the kernel directly?
Note. If my understanding of the above kernel source is incorrect, correct it. Thanks!
memory-management linux linux-kernel
jscoot
source share