Why the kernel needs `split_mem_range` to split the physical address range?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm currently studying the memory management subsystem. When I read
the code of x86_64 memory mapping initialization, I encounter a
problem and can't find answers on Google.

I wonder why the kernel needs `split_mem_range()`[0] to split physical
address range. To make this question clear, I find an example from
dmesg. The arguments of `split_mem_range` are start=0x00100000,
end=0x80000000. The splitting result is:

[mem 0x00100000-0x001FFFFF] page 4k
[mem 0x00200000-0x7FFFFFFF] page 2M

I don't know why the first 1MiB range is separated out to use 4k page
frame. I think these two ranges can be merged and let the range
[0x00100000-0x7FFFFFFF] use 2M page frame completely. I can't
understand the purpose of this range splitting. Could someone please
explain this function to me? Many Thanks!

[0] https://github.com/torvalds/linux/blob/10b84daddbec72c6b440216a69de9a9605127f7a/arch/x86/mm/init.c#L325

Regards,
Hao Lee




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux