LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2012, 06:56 PM   #1
kronus
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Rep: Reputation: Disabled
Page Table Addressing


Hello,

I was reading about four level page tables implementation and I am not clear about one thing. Whether addresses stored in pud and pmd, are physical addresses or linear addresses.

I mean as far as I know, kernel itself cant de-reference a physical addresses directly. Correct??
 
Old 09-15-2012, 11:08 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by kronus View Post
Whether addresses stored in pud and pmd, are physical addresses or linear addresses.
Physical

Quote:
I mean as far as I know, kernel itself cant de-reference a physical addresses directly. Correct??
Correct, but maybe you are reading more into "de-reference ... directly" than is really there (if you see some contradiction between the answers to these two distantly related questions.
 
Old 09-17-2012, 01:40 PM   #3
kronus
LQ Newbie
 
Registered: Sep 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by johnsfine View Post
Physical



Correct, but maybe you are reading more into "de-reference ... directly" than is really there (if you see some contradiction between the answers to these two distantly related questions.
Thanks for your reply. However my point was, I see in code of pud_walk and pmd_walk that first thing these functions do is convert the received physical address into a linear address. So my point is, what is the advantage of storing physical addresses, when system has to convert it to logical address to access location content.

(pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
 
Old 09-17-2012, 02:20 PM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181Reputation: 1181
Quote:
Originally Posted by kronus View Post
what is the advantage of storing physical addresses, when system has to convert it to logical address to access location content.
The page table structure is not a design choice in Linux in most architectures. The structure is defined by the CPU microcode. The main purpose of the whole thing is to communicate mapping information from the kernel to the portion of CPU microcode that handles TLB misses. That information must consist of physical addresses.

Linux itself sometimes also reads that information. But that is a secondary purpose. It is mainly written by the kernel to be read by the TLB miss microcode.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing Page Table , Process Table prabagaranvt Linux - Kernel 1 06-22-2011 08:35 PM
page table rajaram123 Linux - Newbie 2 02-22-2011 10:03 PM
kernel page table lqu Linux - Kernel 5 10-03-2009 12:55 AM
access paging table memory using another page table via MMU? valpa Linux - Kernel 8 08-26-2008 04:26 PM
three- level page table in linux 2.6 mehrotraamit-2 Linux - Newbie 1 11-15-2005 11:19 AM


All times are GMT -5. The time now is 11:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration