문제

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?

도움이 되었습니까?

해결책

vmalloc prefers ZONE_HIGHMEM, if it exists, but can fall back to ZONE_NORMAL.

However, in a machine with 1GB or more (i.e. any modern machine), vmalloc is limited by virtual memory (the vmalloc region), not by physical memory.
In such a case, the vmalloc region is 128MB (unless enlarged by vmalloc_reserve), while ZONE_HIGHMEM is that plus all memory above 1GB - normally much larger.

What you enlarge is actually the vmalloc virtual memory region, and enlarging it lets you vmalloc more. This indirectly enlarges ZONE_HIGHMEM, but this isn't very impotrant.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top