Messages in this thread | | | Date | Tue, 25 Feb 2003 19:42:21 +0100 | From | Andi Kleen <> | Subject | Re: Horrible L2 cache effects from kernel compile |
| |
> Are you sure that this will help? > With a smaller table, you might cause fewer cache misses for the table > lookup. Instead you get longer hash chains. Walking linked lists > probably causes more cache line misses than the single array lookup.
That's true when the hash table has a reasonable size. But with 1MB and bigger hash tables you are guaranteed to get a cache miss for most head bucket access, no matter how many dentries you have. The hash function is actively working against your cache here.
The dentries are actually more likely to fit into dcache because they don't get artificially spread out over the cache space.
-Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |