From: Matthew Dillon <dillon@apollo.backplane.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Jamie Lokier <lk@tantalophile.demon.co.uk>,
Rik van Riel <riel@conectiva.com.br>,
linux-mm@kvack.org
Subject: Re: [RFC] 2.3/4 VM queues idea
Date: Fri, 26 May 2000 08:59:35 -0700 (PDT) [thread overview]
Message-ID: <200005261559.IAA89969@apollo.backplane.com> (raw)
In-Reply-To: <20000526153821.N10082@redhat.com>
:Hi,
:
:On Fri, May 26, 2000 at 04:31:29PM +0200, Jamie Lokier wrote:
:
:> You didn't mention it, but that leaves mremap. This is a fiddly one!
:
:Yes, we know this. :-)
:
:> 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.
:
:--Stephen
Basically you have two choices: Either track all the mappings to an
underlying object in such a way that you can locate all the
potential (object,index) -> (process,va) mappings, or you can
track the PTE's themselves as FreeBSD does with its PV entry junk.
I personally hate the PV entry junk in FreeBSD. It's fast, but it has
a lot of memory overhead.
I would not be afraid of adding appropriate linked-list fields to your
various tracking structures to be able to locate the potential mappings
more easily, and I'll bet dollars to donoughts that you would be able
to refine the scheme to make it just as fast as our PV entry scheme
but without the overhead.
In anycase, locating the pte's would go like this:
* physical page candidate
* direct knowledge of (object,index) for physical page (any given
physical page exists in just one VM object. I'm using a FreeBSD
style VM object as a reference here).
* scan mapping structures linked to the object for mappings that
cover (index).
* Lookup the pte associated with each such mapping (the pte may or may
not exist in the actual page table, depending on whether it has
been faulted or not, or overloaded by another VM object layer).
* done (you are able to locate all the pte's associated with a physical
page)
In FreeBSD, locating the pte's goes like this:
* physical page candidate
* (direct knowledge of (object,index) for physical page, but FreeBSD
doesn't use it for this particular operation).
* scan linked list of PV's based in physical page structure.
* each PV represents a *mapped* pte.
(Which is a lot faster and less stressful on the cache, but which
also eats a truely disgusting amount of memory having to have a
PV entry structure for each pte).
-Matt
Matthew Dillon
<dillon@backplane.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/
next prev parent reply other threads:[~2000-05-26 15:59 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-24 16:16 Matthew Dillon
2000-05-24 18:51 ` Rik van Riel
2000-05-24 20:57 ` Matthew Dillon
2000-05-24 22:44 ` Rik van Riel
2000-05-25 9:52 ` Jamie Lokier
2000-05-25 16:18 ` Matthew Dillon
2000-05-25 16:50 ` Jamie Lokier
2000-05-25 17:17 ` Rik van Riel
2000-05-25 17:53 ` Matthew Dillon
2000-05-26 11:38 ` Jamie Lokier
2000-05-26 11:08 ` Stephen C. Tweedie
2000-05-26 11:22 ` Jamie Lokier
2000-05-26 13:15 ` Stephen C. Tweedie
2000-05-26 14:31 ` Jamie Lokier
2000-05-26 14:38 ` Stephen C. Tweedie
2000-05-26 15:59 ` Matthew Dillon [this message]
2000-05-26 16:36 ` Jamie Lokier
2000-05-26 16:40 ` Stephen C. Tweedie
2000-05-26 16:55 ` Matthew Dillon
2000-05-26 17:05 ` Jamie Lokier
2000-05-26 17:35 ` Matthew Dillon
2000-05-26 17:46 ` Stephen C. Tweedie
2000-05-26 17:02 ` Jamie Lokier
2000-05-26 17:15 ` Stephen C. Tweedie
2000-05-26 20:41 ` Jamie Lokier
2000-05-28 22:42 ` Stephen Tweedie
2000-05-26 15:45 ` Matthew Dillon
2000-05-26 12:04 ` Rik van Riel
-- strict thread matches above, loose matches on Subject: below --
2000-05-24 19:37 Mark_H_Johnson
2000-05-24 20:35 ` Matthew Dillon
2000-05-24 15:11 Rik van Riel
2000-05-24 22:44 ` Juan J. Quintela
2000-05-24 23:32 ` Rik van Riel
2000-05-26 11:11 ` Stephen C. Tweedie
2000-05-26 11:49 ` Rik van Riel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200005261559.IAA89969@apollo.backplane.com \
--to=dillon@apollo.backplane.com \
--cc=linux-mm@kvack.org \
--cc=lk@tantalophile.demon.co.uk \
--cc=riel@conectiva.com.br \
--cc=sct@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox