Re: what does the kernel do with "high memory"?

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

 



On Tue, 2007-05-15 at 13:40 -0400, Robert P. J. Day wrote:
> from different sources, i seem to be reading conflicting
> explanations about what happens with "high memory" on an x86 -- the
> physical memory in the range 896M-1G.
> 
>   as i read it, the normal ranges are:
> 
>   ZONE_DMA:	0-16M
>   ZONE_NORMAL:	16M-896M
>   ZONE_HIGHMEM:	896M-1G
> 
>   now, what *exactly* does the kernel do with the 128M available in
> ZONE_HIGHMEM?  one source tells me that that area is reserved
> exclusively for various kernel data structures, like memory map and
> page table info.  but is that *all* it's used for?
> 
>   certainly, if the kernel needs to access any physical memory beyond
> 1G, it needs to be mapped into the kernel virtual address space first.
> but must that memory be mapped *only* into ZONE_NORMAL, or could it
> also be mapped into ZONE_HIGHMEM and share that area with the kernel
> data structures if there's room?

Physical memory beyond 896M is always mapped temporarily in the last
128M of kernel virtual memory(in case of 3G/1G split). This virtual
memory size would be exactly equal to the total memory mapped by one
page table(i.e. 1024 pte's). This is the window kernel has, in order to
map/unmap >896M physical memory.

Apart from this, the last 128M is majorly used as vmalloc area.
> 
> rday
> 
> p.s.  where in the kernel is the beginning of ZONE_HIGHMEM defined
> anyway?  is it configurable?  thanks for any clarification.

You can certainly increase the kernel virtual memory size(and as an
effect the ZONE_NORMAL size) by using a 2G/2G memory model. And, the
ZONE_HIGHMEM start will always be at the end of ZONE_NORMAL. Which
usually is decided by a variable defined in arch/i386/mm/init.c as

	unsigned int __VMALLOC_RESERVE = 128 << 20;

cheers,
sandeep



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux