Re: 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]

 



On Sun, Apr 01, 2018 at 03:01:13PM +0800, Hao Lee wrote:
> 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!

2MB pages have to be 2MB aligned.  If you want to use the memory between
1MB and 2MB, but not the memory between 0MB and 1MB, you must split the
first 2MB range into 4kB pages.




[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