Re: Page Physical Address and pte

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

 



<quote sender="Kuas (gmane)">
> >If you want to access the page content of a page, do it with the virtual 
> >adress. Th adress will be automaticely translated in a physical adress. 
> >This job is done by the MMU.
> 
> But I am in a kernel mode. How do I use MMU? And I want to scan the 
> whole pages not just accessing a particular address.

you might want to check vmscan to see how walkthrough of pages are done.
i believe what he meant is to walk through/scan the linear/virtual
addresses of the pages. that is how you access those pages.

you don't intentionally "use" MMU. the kernel does that for you. you
just use the kernel api when necessary.

> >>How do I know the size of the page that's filled though? I can't see 
> >>that information from the page struct.
> >>
> >A page on Linux i386 is always 4ko long.
> 
> I don't think they are always filled 4 kb right? Are the rest of the 
> page zeroed out before they are filled? So a partial filled page would 
> have the rest of the page filled with zero. So I can still look to it 
> wihtout any error just 0x00.

the size of a x86 page is 4kb. whether it is filled or not, depends on
the type of page it is. if it is a file/device backed page, then it is
usually filled with driver data. if the page is an anonymous page, and 
you are writing to it, then the page is allocated, zeroed, before it is 
used/reclaimed to be used.

Eugene

-- 
Eugene TEO -  <eugeneteo%null!cc!uic!edu> <http://www.anomalistic.org/>
1024D/14A0DDE5 print D851 4574 E357 469C D308  A01E 7321 A38A 14A0 DDE5
main(i) { putchar(182623909 >> (i-1) * 5&31|!!(i<7)<<6) && main(++i); }


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