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

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

 



Hey Chetan,

Exactly.You are absolutely correct! But I thought that as the conversion is platform specific & in most cases, we can do away with page tables in the identity mapped segment if it is as simple as adding an offset, which is a kind of a performance hack. We can look at the arch specific __pa(..) and __va(..) implementation in the kernel to have a better idea.

For example, if we look at arch specific IA64 code, __pa and __va are defined as follows :

FILE : arch/IA64/include/asm/page.h
.
#ifdef __ASSEMBLY__
# define __pa(x) ((x) - PAGE_OFFSET)
# define __va(x) ((x) + PAGE_OFFSET)
#else /* !__ASSEMBLY */

So, in this case no page tables were used. This is what i meant.

On Tue, Apr 6, 2010 at 11:48 PM, Chetan Nanda <chetannanda@xxxxxxxxx> wrote:


On Wed, Apr 7, 2010 at 11:50 AM, Venkatram Tummala <venkatram867@xxxxxxxxx> wrote:
Can you please explain the last statement. My understanding was - the exact conversion formula of virtual address to physical address in identity mapped segment is platform specific and in most cases, this is as simple as the addition of an offset. So we can do away with page tables to access memory mapped in identity mapped segment.
 
Hi Venkat,

That is what I was trying to point out. even the address that are generated by kernel are virtual address and they still goes through page table for mapping to actual physical address.
And this is done by MMU (via page table), so MMU must be configured to do the same.

~cnanda

Am i missing something?

Regards,
Venkatram Tummala


On Tue, Apr 6, 2010 at 11:04 PM, H. Peter Anvin <hpa@xxxxxxxxx> wrote:
On 04/06/2010 10:57 PM, Venkatram Tummala wrote:
> Just a note Chetan.
>
> We can't exactly say that we require "page table settings" to map that
> 896 MB of physical ram. It is an identity mapped segment (1-1 mapping).
> So, we dont require the "page tables".  Virtual address will be equal to
> Physical Address + Page Offset. It is just an addition of offset
>

No, we still need page tables for the identity-mapped segment.

       -hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.





[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