From: Gerrit Huizenga <gerrit@us.ibm.com>
To: Ben LaHaise <bcrl@redhat.com>
Cc: Chuck Lever <Charles.Lever@netapp.com>, linux-mm@kvack.org
Subject: Re: 2.5 page cache improvement idea
Date: Mon, 26 Feb 2001 19:26:18 -0800 [thread overview]
Message-ID: <200102270326.f1R3QII16835@eng1.sequent.com> (raw)
In-Reply-To: Your message of Mon, 26 Feb 2001 21:49:22 EST. <Pine.LNX.4.30.0102262142500.9589-100000@today.toronto.redhat.com>
If you are considering NUMA architectures as a case of frequently
accesses pages, e.g. glibc or text pages of commonly used executables,
it is probably better to do page replication per node on demand than
to worry about optimizing the page lookups for limited bus traffic.
Most NUMA machines are relatively rich in physical memory, and cross
node traffic is relatively expensive. As a result, wasting a small
number of physical pages on duplicate read-only pages cuts down node
to node traffic in most cases. Many NUMA systems have a cache for
remote memory (some cache only remote pages, some cache local and remote
pages in the same cache - icky but cheaper). As that cache cycles,
it is cheaper to replace read-only text pages from the local node
rather than the remote. So, for things like kernel text (e.g. one of
the SGI patches) and for glibc's text, as well as the text of other
common shared libraries, it winds up being a significant win to replicate
those text pages (on demand!) in local memory.
gerrit
> On Mon, 26 Feb 2001, Chuck Lever wrote:
>
> > didn't andrea archangeli try this with red-black trees a couple of years
> > ago?
>
> Yes. However, keep in mind that red-black are not particularly well
> suited to the cache design of most modern cpus.
>
> > instead of hashing or b*trees, let me recommend self-organizing data
> > structures. using a splay tree might improve locality of reference and
> > optimize the tree so that frequently used pages appear close to the
> > root.
>
> splay trees might well be an option, however keep in mind the benefits of
> the hybrid hash/b*tree structure: for the typical case of a small number
> of entries (ie a small file), the hash buckets will provide optimal O(1)
> performance. Once we move into larger data files, the operation becomes
> slightly more overhead (but still tunable according by increasing the hash
> size) but still relatively low (2 cache misses for a two level b*tree
> which maps a *lot* of data). The problem with something like a splay tree
> is that it will generate bus traffic for the common case of reading from
> the data file, which is something we don't want for a frequently accessed
> mapping like glibc on a NUMA system. B*trees, while originally designed
> for use on disks, apply quite well to modern cache heirarchies.
>
> -ben
>
> --
> 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/
>
--
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:[~2001-02-27 3:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-26 23:46 Ben LaHaise
2001-02-27 0:41 ` Christoph Hellwig
2001-02-27 2:42 ` Chuck Lever
2001-02-27 2:49 ` Ben LaHaise
2001-02-27 3:26 ` Gerrit Huizenga [this message]
2001-02-27 5:47 ` Kanoj Sarcar
2001-02-27 9:05 ` Gerrit Huizenga
2001-02-27 9:21 ` Kanoj Sarcar
2001-02-27 13:42 ` Andrea Arcangeli
2001-02-27 11:52 ` Stephen C. Tweedie
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=200102270326.f1R3QII16835@eng1.sequent.com \
--to=gerrit@us.ibm.com \
--cc=Charles.Lever@netapp.com \
--cc=bcrl@redhat.com \
--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