Re: [RFC] 2.3/4 VM queues idea

Jamie Lokier
2000-05-26T16:36:40Z

Stephen C. Tweedie wrote:
> > mremaps that simply expand or shrink a segment are fine by themselves.
> > mremaps that move a segment are fine by themselves.
>
> No, they are not fine. When you move a segment, you end up with pages
> which have the same offset but are now at a different VA. What that
> means is that you have no way of finding out, for a given physical page,
> what the VA of all of the mappings of that page may be. That means that
> you have no way to find all of the ptes short of scanning all the vmas
> in order.

That's ok. VA == vma->pgoff + page_offset. Move a vma and that's still
true. The ptes are found by looking at the list of all vmas referring
to all the address_spaces that refer to a page.

-- Jamie