On Wed, 30 Mar 2005 08:09:25 +0530, Raj <rajagopalan.duraisamy@xxxxxxxxx> wrote: > The Kernel maps the physical address starting from PAGE_OFFSET in > Virtual Address Space that is why we subtract PAGE_OFFSET to get the > physical address from VA. According to my understanding this will be > valid only in Kernel address space and not in user address space. > > Again as far as I know, to access the virtual address for a given > physical address, you need to access the rmap structure in the struct > page. This how you can do it, > > physical address >> PAGE_SHIFT , this gives you the pfn > > node_mem_map + pfn gives the struct page pointer value. can you explain bit more about node_mem_map and mem_map ? What does these two represent ? > Acess the rmap structure in the page structure. This is a list of all > the virtual addresses where this page is mapped. what does rmap represents ? Please explain bit more, how can we convert the physical address to the user virtual address ? For converting from virtual to physical, we need to use process page tables. I know that page tables are specific to processes, wanted to know is there any data structure either specific to process ot global, which can convert the physical address to virtual address of any process ? Gaurav > Please correct me if I am wrong. > > -------------- > Raj. > > > On Wed, 30 Mar 2005 09:37:54 +0800, P.F. Tsai <yeltek@xxxxxxxxx> wrote: > > the first 3GB in VA is left for process itself, and the fourth gigabyte is > > left for kernel...... > > -- > 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/