Re: kernel address space question

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

 



Hi All,
I have a query regarding the kernel virtual memory. In this thread
some people said the physical address for the kernel virtual address
can be obtained by subtracting it from 3G.
  Physical address = Virtual Address - 3G.

Take a simple Case:
I have physical memory for eg 128 MB. And I want to access the virtual
address 3GB + 256MB.
The physical address would be 3GB + 256MB - 3GB which will be 256MB.
But the RAM size is just 128 MB. So how will i read the physical
memory 256MB because the physical memory i have is just 128MB.

Please clarify this to me..
Thanks,
Suresh

On 9/8/05, Rahul Iyer <idlisambar@xxxxxxxxx> wrote:
> srinivas bakki wrote:
> 
> >
> >
> >
> >     One feature of page tables is that each page table entry has an
> >     associated Global 'G' flag set on it. when this is done, those
> >     entries
> >     are not flushed even when the CR3 is loaded. I think the kernel can be
> >     put up using those flags. Also the kernel code is placed in two 4MB
> >     pages on x86 which supports PSE (Page Size Extensions). This reduces
> >     TLB misses of kernel code as well as reduces contention for 4K page
> >     TLB (since 4MB has a separate TLB).
> >
> >
> >
> > IIRC on loading the CR3 there has to be a flush on the TLBs. or is it
> > that the cachlelines have this G bit to recognise the page not to be
> > flushed ?
> 
> Bingo! that's what the G bit is for! :) G stands for Global... meaning
> global across all processes (all page tables)
> -r
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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