I have gone through Robert Love's Linux Kernel Development, and other sources. And everywhere it mentions that on a 32 bit x86 system the kernel owns the top 1 GB of the virtual address space, out of that upto 896 MB is mapped contiguously onto physical memory (called ZONE_NORMAL) the rest is mapped into the remaining 128 MB space as required, and may not be contiguous (ZONE_HIGHMEM).
On 64 bit, the problem of not having enough virtual address space is eliminated. And the memory map is described as,
0xffffffffffffffff +-----------+
| |
| | Kernelspace
| |
0xffff800000000000 +-----------+
| |
| |
| hole |
| |
| |
0x00007fffffffffff +-----------+
| |
| | Userspace
| |
0x0000000000000000 +———————————+
However, it is not clear, in this map how much of the kernelspace is required to be physically contiguous (as defined in ZONE_NORMAL). and how much is mapped as required.
Is the ZONE_HIGHMEM in 64 bit kernel always 0? Since all memory is quite within range of the virtual address space?
But the kernel's fixed contiguous memory (which is un-pageable) would also require to be small, since that chunk of physical memory would never be available to other user processes. So the kernel would require to use memory which need not be contiguous (like ZONE_HIGHMEM), as required. This conflicts with the ZONE_HIGHMEM being empty on 64-bit kernels.
So I am confused about how much of the kernelspace is fixed physically contiguous and how much is non-contiguous in case of 64 bit kernels.