From: William Lee Irwin III <wli@holomorphy.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: page_add/remove_rmap costs
Date: Tue, 23 Jul 2002 23:48:13 -0700 [thread overview]
Message-ID: <20020724064813.GE25028@holomorphy.com> (raw)
In-Reply-To: <3D3E4A30.8A108B45@zip.com.au>
On Tue, Jul 23, 2002 at 11:33:20PM -0700, Andrew Morton wrote:
> So I don't know why the pte_chain_unlock() is so expensive in there.
> But even if it could be fixed, we're still too slow.
> My gut feel here is that this will be hard to tweak - some algorithmic
> change will be needed.
Atomic operation on a cold/unowned/falsely shared cache line. The
operation needs to be avoided when possible.
On Tue, Jul 23, 2002 at 11:33:20PM -0700, Andrew Morton wrote:
> The pte_chains are doing precisely zilch but chew CPU cycles with this
> workload. The machine has 2G of memory free. The rmap is pure overhead.
> Would it be possible to not build the pte_chain _at all_ until it is
> actually needed? Do it lazily? So in the page reclaim code, if the
> page has no rmap chain we go off and build it then? This would require
> something like a pfn->pte lookup function at the vma level, and a
> page->vmas_which_own_me lookup.
The space overhead of keeping them up to date can be mitigated, but this
time overhead can't be circumvented so long as strict per-pte updates
are required. I'm uncertain about lazy construction of them; I suspect
it will raise OOM issues (allocating in order to evict) and often be
constructed only never to be used again, but am not sure.
On Tue, Jul 23, 2002 at 11:33:20PM -0700, Andrew Morton wrote:
> Nice thing about this is that a) we already have page->flags
> exclusively owned at that time, so the pte_chain_lock() _should_ be
> cheap. And b) if the rmap chain is built in this way, all the
> pte_chain structures against a page will have good
> locality-of-reference, so the chain walk will involve far fewer cache
> misses.
This is a less invasive proposal than various others that have been
going around, and could probably be tried and tested quickly.
Cheers,
Bill
--
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-mm.org/
next prev parent reply other threads:[~2002-07-24 6:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-24 6:33 Andrew Morton
2002-07-24 6:48 ` William Lee Irwin III [this message]
2002-07-24 16:24 ` Rik van Riel
2002-07-24 20:15 ` Andrew Morton
2002-07-24 20:21 ` Rik van Riel
2002-07-24 20:28 ` Andrew Morton
2002-07-25 2:35 ` Rik van Riel
2002-07-25 3:08 ` William Lee Irwin III
2002-07-25 3:14 ` Martin J. Bligh
2002-07-25 4:21 ` Andrew Morton
2002-07-25 2:45 ` William Lee Irwin III
2002-07-25 4:50 ` William Lee Irwin III
2002-07-25 5:14 ` Andrew Morton
2002-07-25 5:15 ` John Levon
2002-07-25 5:30 ` William Lee Irwin III
2002-07-25 5:47 ` Andrew Morton
2002-07-25 5:42 ` William Lee Irwin III
2002-07-25 5:59 ` Andrew Morton
2002-07-25 7:09 ` Andrew Morton
2002-07-26 7:33 ` 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=20020724064813.GE25028@holomorphy.com \
--to=wli@holomorphy.com \
--cc=akpm@zip.com.au \
--cc=linux-mm@kvack.org \
/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