On 32bit x86 platform, if vmalloc() can allocate memory from either ZONE_NORMAL or ZONE_HIGHMEM, does it mean that even if I enlarge ZONE_HIGHMEM, the actual total range that vmalloc() can use is unchanged? I did a test to enlarge ZONE_HIGHMEM, the one time allocation of vmalloc() can be much bigger than before. So does it mean that vmalloc() actually allocate memory from ZONE_HIGHMEM only?
On 32bit x86 platform, if vmalloc() can allocate memory from either ZONE_NORMAL or ZONE_HIGHMEM,
Share
vmallocprefersZONE_HIGHMEM, if it exists, but can fall back toZONE_NORMAL.However, in a machine with 1GB or more (i.e. any modern machine),
vmallocis limited by virtual memory (thevmallocregion), not by physical memory.In such a case, the
vmallocregion is 128MB (unless enlarged byvmalloc_reserve), whileZONE_HIGHMEMis that plus all memory above 1GB – normally much larger.What you enlarge is actually the
vmallocvirtual memory region, and enlarging it lets youvmallocmore. This indirectly enlargesZONE_HIGHMEM, but this isn’t very impotrant.