|
From: Ulrich D. <dr...@re...> - 2006-11-07 07:12:54
|
In case a data set spreads two cache lines and the second cache line is=20 at index zero (i.e., the first at the highest index), the tag used for=20 the second cache line is wrong. It is one higher than the tag for the=20 first, otherwise no wrap-around would happen. Patch is attached. I've also added some optimizations. Since you already decided to keep=20 L.sets - 1 in a separate variable around you might as well use it in all=20 places. Once you do this there is no reason to keep L.sets around. So=20 I went on removing it. Which brings on the next step: now the cache_t2 structure consists of 8=20 words and the char array. If you rearrange the struct to move the tags=20 pointer before the desc_line element all commonly used elements are in=20 the first 32 or 64 bytes (for 32 or 64 byte platforms respectively). If=20 now cache_t2 is aligned for this value there is only one cache line=20 needed for L2, I1, D1. --=20 =E2=9E=A7 Ulrich Drepper =E2=9E=A7 Red Hat, Inc. =E2=9E=A7 444 Castro St = =E2=9E=A7 Mountain View, CA =E2=9D=96 |