Re: Memory Management Question

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

 



Hi.....

On Sat, Nov 28, 2009 at 11:25 PM, Mohammed Gamal <m.gamal005@xxxxxxxxx> wrote:
>Now I do understand that a virtual address will
> eventually map into a PTE and an offset that represent the physical
> memory address, so how does that fit in with struct page, what it is
> used for and how are its flags different from those of a PTE. Does any
> kind of mapping exist between PTEs and 'struct page's, and where is
> that mapping held?

First thing first, make sure you take a closer look at struct page at
include/linux/mm_types.h.

In short, struct page describe what's in the page and who's using it
(via reverse mapping, IIRC).

regarding relationship between struct page and PTEs, I guess it lies
in "virtual" field of page. As you can see, it holds the kernel
virtual address of related page. Thus, from there (I guess via a bit
of maths) you can derive with PTE that point to this page.
-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

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