Re: Using large memory > 4GB in Linux Kernel

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

 



On 13:45 Sat 24 Nov     , Peter Teoh wrote:
> I have been looking for answer for this but never seem to get anywhere.
> 
> Supposed I have 16GB of physical memory, my question is, in 32bit x86
> linux, how can I use the physical memory beyond the 4GB boundary in my
> kernel drivers?
> 
> 1.   What CONFIG parameters for kernel compilation is needed (or is
> for this purpose)?

There is a "HIGHMEM" config option which can be set to off, 4GB and 64GB.

> 2.   Which are the main key functions or global variable for going
> this?   The pagetable is still the same mem_map right?

I am afraid, that I have not understood your question very well. When
turning on highmem, the address space layout changes. There is a 3GB/1GB
split of the address space on i386. This means that the lower 3GB are
used by user space programs to address virtual memory. The upper 1GB can
only be accessed in kernel mode and is directly mapped to the physical
memory. You can also choose a 2GB/2GB or 1GB/3GB layout. It you enable
highmem, a part of the kernel address space is not directly mapped to
physical memory. Instead it is used to map the high memory before
accessing it. After the access, it is unmapped. This allows addressing
more memory at the cost of higher cpu load. However, the code that
allocates/accesses the memory has to deal with highmem.

Michi
-- 
programing a layer 3+4 network protocol
see http://michaelblizek.homelinux.net


--
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