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

No Subject



> > Is there an inverse page table implemented in Linux?
>
> no
>
> > If not, how does a physical page maps to a virtual page?
>
> the system only has virtual -> physical mappings
>

Thanks for your quick response Rik.  But to me, it seems that there must be
some kind of mechanism similar to an inverted page table so the kernel knows
which physical memory maps to which virtual memory.  If that's not the case,
when the kswapd swaps out a page in physical memory, how would it know how
to update page table entries to reflect this change?


> > I'm asking this question because I'm looking for a way to
> > declare a range of physical memory as void by relocate
> > everything in this range of memory to either another location in
> > memory or to the disk, so I need to find a way to map physical
> > page to virtual page to update this change.
>
> Impossible. Suppose there is kernel memory in the range
> of kernel memory you want to free, and there are pointers
> in other places of the kernel that point to these areas...

I'm only moving these data from a particular range to some other areas -
either to some other memory area or to the disk, but regardless they can
still be accessed.  So if the page tables are updated correctly, then if
there are pointers to this range of memory I just swapped out, it can still
find them.  Is this correct or is am I misunderstood something?


Thank you

-
Hai


-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.surriel.com/kernelnewbies.shtml