On Wed, Apr 26, 2000 at 06:11:15AM -0700, David S. Miller wrote:
> Doing it isn't the problem. Doing it efficiently is, if you have
> fork() and mremap() in the picture. With mremap(), you cannot assume
> that the virtual address of an anonymous page is the same in all
> processes which have the page mapped.
> Who makes that assumption?
Nobody does --- that's the point. If you _could_ make that assumption,
then looking up the vma which maps a given page in a given mm would be
easy. But because the assumption doesn't hold, you have to walk all of
> In my implementation there is no linear scan, only VMA's which
> can actually contain the anonymous page in question are scanned.
> It's called an anonymous layer, and it provides pseudo backing objects
> for VMA's which have at least one privatized anonymous page.
> Instead of talk, I'll show some code :-) The following is the
> anon layer I implemented for 2.3.x in my hacks.
OK --- I'm assuming you allow all of these address spaces to act as
swapper address spaces for the purpose of the swap cache? This looks
good, do you have the rest of the VM changes in a usable (testable)
On fork(), I assume you just leave multiple vmas attached to the same
address space? With things like mprotect, you'll still have a list
of vmas to search for in this design, I'd think.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:11 EST