[gclist] reference counting

Jeff Sturm jsturm1@home.com
Fri, 15 Sep 2000 00:30:01 -0400


Manoj Plakal wrote:
>         What you seem to need is an "overwrite-cache-line"
>         kind of store instruction which tells the cache that it
>         does not need to fetch the line in case of a miss
>         since the data is going to be over-written. Seems kind
>         of tricky for the software since it has to guarantee
>         that it will over-write a whole cache line's worth
>         of data, and make sure that there are no parts of
>         the cache line that are "left over" and which need
>         to be fetched (I guess this is where sub-blocking
>         would be useful).

Interestingly, the Compaq C compiler for Alpha appears to generate the
WH64 instruction in some situations, wrapped in a conditional to test
for overlap.  Apparently the cost of possible branch misprediction is
outweighed by savings in memory latency.  But at least its use is
transparent to the source code.

I wonder if allocating memory on exact cache boundaries would be
worthwhile for this sort of optimization.

Jeff