Hi.. On Jan 22, 2008 5:43 AM, Vegard Nossum <vegard.nossum@xxxxxxxxx> wrote: > Hi, > > I am experiencing something strange about pages and ptes on x86. I am > calling alloc_pages() with order = 1 (should be 2 pages). This returns > a struct page with virtual address c7800000 (returned by > page_address()). Now I call lookup_address() on the same address, and > the pte is located at c0438c78. So far, so good. But if I try to call > lookup_address() on the next page (i.e. address 7801000), this returns > a pte which is located at c7800004. How can this happen? Just want to stress Thomas' saying: page's data structure != page itself. The address of the related page, as you can guess, is defined inside this struct. If it's not a high mem page, it can be simply looked up in "virtual" field. if not, then it will go through somekind of array searching to see where it's (temporarily) mapped. regards, Mulyadi. -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ