Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jun 2004 15:12:49 -0500
From:      Alan Cox <alc@cs.rice.edu>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        current@freebsd.org
Subject:   Re: comments in the page coloring options in /sys/conf/NOTES
Message-ID:  <20040606201249.GH24461@cs.rice.edu>
In-Reply-To: <20040606142446.2900a97e@Magellan.Leidinger.net>
References:  <20040606142446.2900a97e@Magellan.Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jun 06, 2004 at 02:24:46PM +0200, Alexander Leidinger wrote:
> Hi,
> 
> the comments about the page coloring in the VM system seem to talk about
> L2/L1 cache size combinations, e.g. PQ_CACHESIZE=512 for a 512k/16k
> cache. The comment above the PQ_CACHESIZE line just talks about the size
> of the L2 cache.
> 
> If it indeed talks about L2/L1 combinations, we should make it explicit.
> And what about a 512k/8k combination?
> 
> If it just talks about the L2 cache size, what is the meaning of the
> second number?

My recent commit fixed a "syntax" error in the comments, specifically,
a reference to a missing macro.  The comments are, however, still
"semantically" broken: 

1. Cache size alone does not correctly determine the number of colors,
except for direct map caches.  The correct formula is

 (cache size in bytes / page size in bytes) / degree of cache associativity

Thus, the comments would lead one to configure his/her system with too
many colors.  (Relative to configuring a system with too few colors,
this is not so bad.)

2. The references to L1 should be removed.  They are historical
leftovers.

To conclude, I would be thrilled if someone wanted to work on
automating this.  I don't think it's reasonable to expect users to
configure this.

Alan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040606201249.GH24461>