Re: why choose 896MB to the start point of ZONE_HIGHMEM

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

 



I think for some architectures, the position of highmem is constrained by hardware as well.  It is not always a kernel decision and not always configurable as in case of x86.

In case of MIPS32, low memory is between 0 and 512 MB and high memory starts above 512 MB. Also the user space is of size 2 GB. 

Please see the definition of macros PAGE_OFFSET and HIGHMEM_START at :
http://lxr.linux.no/linux+v2.6.33/arch/mips/include/asm/mach-generic/spaces.h

This is because MIPS32 processors have KSEG0 and KSEG1 segments lying between 0 and 512 MB and KSEG2/3 lies above it. 

May be someone on the group can confirm this.

~Himanshu


On Wed, Apr 7, 2010 at 6:20 PM, Chetan Nanda <chetannanda@xxxxxxxxx> wrote:


On Wed, Apr 7, 2010 at 5:40 PM, Xianghua Xiao <xiaoxianghua@xxxxxxxxx> wrote:
On Wed, Apr 7, 2010 at 12:48 AM, Venkatram Tummala
<venkatram867@xxxxxxxxx> wrote:
> I completely agree with you. I was just trying to clarify Xianghua's
> statement "last 128 MB is used for HIGHMEM". I got the feeling that he
> thought that last 128MB can be used for vmalloc, IO and for HIGHMEM. So, i
> was clarifying that last 128MB is not "used for highmem" but it is used to
> support highmem.(among many other things). That was what i intended.
>
> On Tue, Apr 6, 2010 at 7:09 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
>>
>> On 04/06/2010 07:04 PM, Venkatram Tummala wrote:
>> > Hey Xiao,
>> >
>> > last 128MB is not used for highmem. last 128MB is used for data
>> > structures(page tables etc.) to support highmem .  Highmem is not
>> > something which is "INSIDE" Kernel's Virtual Address space. Highmem
>> > refers to a region of "Physical memory" which can be mapped into
>> > kernel's virtual address space through page tables.
>> >
>> > Regards,
>> > Venkatram Tummala
>> >
>>
>> Not quite.
>>
>> The vmalloc region is for *anything which is dynamically mapped*, which
>> includes I/O, vmalloc, and HIGHMEM (kmap).
>>
>>        -hpa
>>
>> --
>> H. Peter Anvin, Intel Open Source Technology Center
>> I work for Intel.  I don't speak on their behalf.
>>
>
>

Thanks Venkatram, do these sound right:

1. All HIGHMEM(physical address beyond 896MB) are kmapped back into
the last 128MB kernel "virtual" address space(using page tables stored
in the last 128MB physical address). That also implies it's a very
limited virtual space for large memory system and need do kunmap when
you're done with it(so you can kmap other physical memories in).
I'm not familiar with large-memory systems, not sure how kmap cope
with that using this limited 128M window assuming kernel is 1:3 split.
 
Small correction here,  page-table is not store in last 128MB of physical memory. Instead the complete page table for 4GB virtual address space is stored in kernel data-structures (kernel data section).

~cnanda

2. The last 128MB physical address can be used for page tables(kmap),
vmalloc, IO,etc

Regards,
Xianghua

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