From: lm@bitmover.com (Larry McVoy)
To: linux-kernel@vger.rutgers.edu
Subject: Re: Page coloring HOWTO [ans]
Date: Sun, 31 Jan 1999 11:24:39 -0800 [thread overview]
Message-ID: <199901311924.LAA04620@bitmover.com> (raw)
davem@redhat.com (Hey, look where Dave is :-) says:
: Page coloring, in the sense that we are talking about here,
: is %99 dealing with physically indexed secondary/third-level
: etc. caches. Virtually indexed secondary/third-level caches
: are dinosaurs
Are you sure about that? We should come to agreement on terminology.
I thought that the HyperSparc was virtually indexed and virtually tagged,
with just about everything else being virtually indexed but physically
tagged.
: The following is a distribution scheme which I found to work extremely
: well in practice and testing:
:
: Add to task_struct a member "int cur_color;"
:
: Add to inode a member "int cur_color"
:
: When giving a new address space to a process (via exec() or some
: other means, but not during fork/clone for example) set
: tsk->cur_color to zero.
:
: When allocating a new inode structure in the vfs, set
: inode->cur_color to zero.
:
: Now track page cache, page table allocation, and anonymous page
: faulting in the following way:
:
: a) At each anonymous page write fault, allocate a free page
: with color current->cur_color, and then increment this.
:
: b) At each page table page allocation, do the same as in #a
:
: c) At each addition of a new page into the page cache, allocate
: this page using the vfs object's inode->cur_color, and then
: increment.
This has some nice attributes in that it will work well if a process
chooses to touch memory at a stride of exactly cache size. However,
it's a little harder to tune for if you are an application writer because
different inputs to the program will give you different page colors.
You could argue it either way but I'm curious as to why not just use the
(pageno + pid) % cachesize alg. Did you try this and find that it gave
consistently worse results? I'd find that sort of hard to believe but
your oblique reference to mmaped shared libraries gave me a hint that you
might be onto something. Can you explain the results please?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~1999-01-31 19:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-31 19:24 Larry McVoy [this message]
1999-01-31 22:05 ` Page coloring HOWTO [ans] Steve VanDevender
1999-02-01 7:20 ` David S. Miller
[not found] <"4S1CG3.0.Tz5.-gvis"@tequila.cs.yale.edu>
1999-02-01 23:11 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
1999-01-31 8:47 Colin Plumb
1999-01-31 0:04 Larry McVoy
1999-01-31 7:25 ` David S. Miller
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=199901311924.LAA04620@bitmover.com \
--to=lm@bitmover.com \
--cc=linux-kernel@vger.rutgers.edu \
/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