From: Andrew Morton <akpm@digeo.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net
Subject: Re: Performance of partial object-based rmap
Date: Thu, 20 Feb 2003 19:08:19 -0800 [thread overview]
Message-ID: <20030220190819.531e119d.akpm@digeo.com> (raw)
In-Reply-To: <278890000.1045791857@flay>
"Martin J. Bligh" <mbligh@aracnet.com> wrote:
>
> ...
> Did some space consumption comparisons on make -j 256:
>
> before:
> 24116 pte_chain objects in slab cache
> after:
> 716 pte_chain objects in slab cache
>
> The vast majority of anonymous pages (for which we're using the non
> object based method) are singletons, and hence use pte_direct ...
> hence the massive space reduction.
>
OK. And that'll help the fork+exit CPU overhead too.
Let's talk about this a bit.
The problem remains that this design means that we need to walk all the vma's
which are attached to a page's address_space in an attempt to unmap that
page.
Whereas with the existing pte_chain walk, we only need to visit those pte's
which are still mapping the page.
So with 1000 processes, each holding 1000 vma's against the same file, we
need to visit 1,000,000 vma's to unmap one page. If that unmap attempt is
unsuccessful, we *still* need to walk 1,000,000 vma's next time we try to
unmap it.
Whereas with pte-based rmap, we do not need to walk over already-unmapped
pte's.
So it is easy to see how there is at least a theoretical collapse in search
complexity here. Which affects all platforms. And, of course there is a
demonstrated space consumption collapse with the existing code which affects
big ia32 machines.
It is not clear how realistic the search complexity problem really is - the
2.4 virtual scan has basically the same problem and there is not a lot of
evidence of people hurting from it. In fact we see more hurt from full rmap
than from the 1000x1000 thing.
The search complexity _may_ affect less exotic things than databases. Many
processes mapping libc, say. But in that case the number of VMA's is very
small - if this was a realistic problem then 2.4 would be in real strife.
Dave's patch is simple enough to merit serious consideration.
<scratches head>
I think the guiding principle here is that we should not optimise for the
uncommon case (as rmap is doing), and we should not allow the uncommon case
to be utterly terrible (as Dave's patch can do).
It would be overly optimistic to assume that hugetlb pages will save us here.
Any bright ideas?
next prev parent reply other threads:[~2003-02-21 2:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-20 4:25 Martin J. Bligh
2003-02-20 4:47 ` William Lee Irwin III
2003-02-20 5:14 ` Martin J. Bligh
2003-02-20 5:16 ` [Lse-tech] " William Lee Irwin III
2003-02-20 5:27 ` Martin J. Bligh
2003-02-21 1:44 ` Martin J. Bligh
2003-02-21 3:08 ` Andrew Morton [this message]
2003-02-21 3:25 ` Rik van Riel
2003-02-21 3:47 ` Andrew Morton
2003-02-21 4:25 ` Rik van Riel
2003-02-21 10:00 ` William Lee Irwin III
2003-02-21 19:15 ` [Lse-tech] " William Lee Irwin III
2003-02-21 19:27 ` William Lee Irwin III
2003-02-21 3:32 ` Martin J. Bligh
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=20030220190819.531e119d.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lse-tech@lists.sourceforge.net \
--cc=mbligh@aracnet.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
all inboxes | Powered by JetHome®