From: Richard Henderson <rth@twiddle.net>
To: axp-list@redhat.com
Subject: Re: rpcc
Date: Tue, 12 Jan 1999 11:27:51 -0800 [thread overview]
Message-ID: <19990112112751.A5014@piglet.twiddle.net> (raw)
In-Reply-To: <278f407d.u10t12e.e7d00-axp@amazing.ch>; from Christoph Dworzak on Tue, Jan 12, 1999 at 04:59:00PM +0000
On Tue, Jan 12, 1999 at 04:59:00PM +0000, Christoph Dworzak wrote:
> > (2) page colouring. this affects the efficiency of the caches.
> > there is no way under linux to control your page colour.
>
> What is page colouring? Could you explain this or do you
> know where I can read about it?
It should be found in most operating system or system architecture
textbooks, in the location in which they talk about memory caches.
Caches work by indexing off the middle bits of an address, also
referred to as the address' `colour'. The exact range of middle bits
has to do with the cache line size on the low end, and the size of
the cache / set associativeness of the cache on the high end.
If the high bits of two addresses are different, but their colours
are the same, the two addresses alias. The set associativeness
of the cache determines how many aliases we can have in the cache
at one time.
If the physical memory for a process is all contiguous, we get the
maximal distribution of colours, and so optimal cache efficiency.
This rarely happens in practice.
What does happen is that, due to physical memory fragmentation, the
kernel uses a page from here and a page from there. On a system
that has been up a while, the colour any particular page a process
owns is effectively random.
Worst case, one could receive a set of pages all with the same colour.
In this case the process would spend a great deal of its time waiting
on main memory because cache efficiency would be abysmal. This also
rarely happens in practice.
DaveM experimented with page colouring allocator -- one that would
be more likely to give a maximal distribution of colours -- midway
through the 2.1 series. But on top of the buddy-system page allocation
system we have, that lead to serious memory fragmentation, fell over
and died in low memory situations.
Perhaps it will be revisited in the 2.3 series; who knows. It's only
a real issue for benchmarks, when one wants to have reproducible numbers,
so it's a fairly low-priority thing.
r~
next prev parent reply other threads:[~1999-01-12 19:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-12 3:55 rpcc Christoph Dworzak
1999-01-12 3:20 ` rpcc Peter Petrakis
1999-01-12 4:59 ` rpcc Richard Henderson
[not found] ` <rth@twiddle.net>
1999-01-12 16:59 ` rpcc Christoph Dworzak
1999-01-12 19:27 ` Richard Henderson [this message]
1999-01-12 21:06 ` rpcc Wes Bauske
1999-01-13 2:16 ` rpcc Richard Henderson
1999-01-14 16:17 ` Alpha 21264 Christoph Dworzak
1999-01-14 15:46 ` Greg Lindahl
1999-01-14 17:27 ` Richard Henderson
1999-10-24 15:04 ` patch_v2: (on Alpha) emulating missing instructions Christoph Dworzak
1999-10-25 9:47 ` Phil Carmody
-- strict thread matches above, loose matches on Subject: below --
1999-01-13 14:10 Alpha 21264 Andy Almond
1999-01-13 16:36 ` Jeff Sturm
1999-01-14 6:50 ` Richard Henderson
1999-10-18 14:46 patch_v2: (on Alpha) emulating missing instructions Robert Harley
1999-10-18 15:31 ` Phil Carmody
1999-10-23 20:39 ` Richard Henderson
1999-10-21 16:23 ` patch_v3: emulating missing instructions on Alpha Luke Deller
1999-10-23 20:55 ` Richard Henderson
1999-10-24 0:28 ` Daniel Potts
1999-10-25 1:22 ` Luke Deller
1999-10-28 23:34 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox