From: Daniel Phillips <phillips@arcor.de>
To: Andrew Morton <akpm@zip.com.au>
Cc: linux-kernel@vger.kernel.org, wli@holomorphy.com,
Rik van Riel <riel@conectiva.com.br>
Subject: Re: [PATCH] Rmap speedup
Date: Wed, 7 Aug 2002 22:17:31 +0200 [thread overview]
Message-ID: <E17cXFM-0004si-00@starship> (raw)
In-Reply-To: <3D5177CB.D8CA77C2@zip.com.au>
On Wednesday 07 August 2002 21:40, Andrew Morton wrote:
> Daniel Phillips wrote:
> > What stands out for me is that rmap is now apparently at parity with
> > (virtual scanning) 2.4.19 for a real application, i.e., parallel make.
> > I'm sure we'll still see the raw setup/teardown overhead if we make a
> > point of going looking for it, but it would be weird if we didn't.
> >
> > So can we tentatively declare victory of the execution overhead issue?
>
> err, no. It's still adding half a millisecond or so to each fork/exec/exit
> cycle. And that is arising from, apparently, an extra two cache misses
> per page. Doubt if we can take this much further.
But that overhead did not show up in the kernel build timings you posted,
which do a realistic amount of forking. So what is the worry, exactly?
> > ...
> > Vectoring up the pte chain nodes as
> > you do here doesn't help much because the internal fragmentation
> > roughly equals the reduction in link fields.
>
> Are you sure about that? The vectoring is only a loss for very low
> sharing levels, at which the space consumption isn't a problem anyway.
> At high levels of sharing it's almost a halving.
Your vector will only be half full on average.
> > So coalescing is the next big evil problem to tackle. It occurs to me
> > that defragging pte chain node pages is actually easy and local.
>
> If we are forced to actively defragment pte_chain pages then
> it's all just getting too much, surely.
The algorithm I showed is pretty simple. Active defragmentation is just
something we should be doing, where we can. Fragmentation does happen,
and there are too many places where we're just trying to pretend that it
doesn't, or fiddling with allocation policy in the hopes it will magically
go away, which it never does.
> > Rmap is clearly going to help a lot with swapout on heavily shared
> > pages by giving us active unmapping, so we don't have to leave large
> > numbers of pages sitting around half in memory and half in swap. But
> > rmap doesn't help a bit with that same nasty behaviour on swapin; we
> > still have to wait patiently for every sharer to get around to
> > faulting in the page, and in my mind, that makes it very easy to
> > construct a test case that turns all of swap into a useless appendage,
> > full of half swapped-in pages.
>
> Is it useful to instantiate the swapped-in page into everyone's
> pagetables, save some minor faults?
That's what I was thinking, then we just have to figure out how to find
all those swapped-out ptes efficiently.
> > So I'd suggest just forgetting about the collapse-to-direct feature. With
> > pte chain coalescing we'll eventually get the memory back.
>
> I implemented Rik's suggestion. The collapse back to direct representation
> happens in page_referenced(). So it happens only in response to page reclaim
> activity, when the system needs memory. Nice, yes?
Yes, nice.
--
Daniel
next prev parent reply other threads:[~2002-08-07 20:12 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-02 19:42 [PATCH] Rmap speedup Daniel Phillips
2002-08-02 20:20 ` Andrew Morton
2002-08-02 21:40 ` William Lee Irwin III
2002-08-03 0:14 ` Rik van Riel
2002-08-03 0:31 ` Andrew Morton
2002-08-03 0:52 ` William Lee Irwin III
2002-08-03 0:56 ` Rik van Riel
2002-08-03 3:47 ` Daniel Phillips
2002-08-03 5:24 ` Andrew Morton
2002-08-03 18:43 ` Daniel Phillips
2002-08-03 21:40 ` Andrew Morton
2002-08-03 21:54 ` Rik van Riel
2002-08-03 22:49 ` Daniel Phillips
2002-08-03 23:55 ` Gerrit Huizenga
2002-08-04 0:47 ` Andrew Morton
2002-08-04 1:01 ` Daniel Phillips
2002-08-04 14:11 ` Thunder from the hill
2002-08-04 14:47 ` Zwane Mwaikambo
2002-08-04 16:55 ` Tobias Ringstrom
2002-08-03 23:36 ` Daniel Phillips
2002-08-04 0:44 ` Andrew Morton
2002-08-03 21:05 ` Rik van Riel
2002-08-03 21:36 ` Daniel Phillips
2002-08-03 21:43 ` Andrew Morton
2002-08-03 21:41 ` Daniel Phillips
2002-08-03 21:24 ` [PATCH] Rmap speedup... call for testing Daniel Phillips
2002-08-03 22:05 ` [PATCH] Rmap speedup Daniel Phillips
2002-08-03 22:39 ` Andrew Morton
2002-08-03 22:35 ` Daniel Phillips
2002-08-04 23:33 ` Andrew Morton
2002-08-05 0:35 ` Daniel Phillips
2002-08-05 7:05 ` Andrew Morton
2002-08-05 13:48 ` Daniel Phillips
2002-08-05 13:57 ` Rik van Riel
2002-08-05 18:16 ` Andrew Morton
2002-08-07 18:59 ` Daniel Phillips
2002-08-07 19:40 ` Andrew Morton
2002-08-07 20:17 ` Daniel Phillips [this message]
2002-08-07 20:34 ` Andrew Morton
2002-08-07 20:51 ` Daniel Phillips
2002-08-07 20:54 ` Rik van Riel
2002-08-07 22:21 ` Daniel Phillips
2002-08-07 22:48 ` Andrew Morton
2002-08-07 20:39 ` Daniel Phillips
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=E17cXFM-0004si-00@starship \
--to=phillips@arcor.de \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=wli@holomorphy.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