comments in the page coloring options in /sys/conf/NOTES

Alan Cox alc at cs.rice.edu
Sun Jun 6 20:12:54 GMT 2004


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


More information about the freebsd-current mailing list