(I'm not too familiar with how this caching stuff works, so if anyone could
give me a URL describing it to a relative newbie, i'd be quite grateful)
So lemme see if I got this straight from what you and Larry have told me:
For the direct map deal:
For every byte (probably page?) in the CPU's cache, say byte(page) 0x31337
can be used to cache the bytes(pages) at:
0x00031337, 0x00131337, 0x00231337, ... 0xfff31337
So, if a program ran, and happened to have its pages #0-4095 mapped to
physical pages:
0x00031337, 0x00131337, 0x00231337, ... 0xfff31337
and the program went through an array and accessed each of those pages in
sequence, every successive iteration would have to replace the previous
page in the cache with the new one; i.e. exactly one of those pages would
be in cache at any given time. Which would obviously make the program's
performance suck majorly.
For the n-way associative deal:
Don't quite get it enough to make an example yet ;)
-- Stevie-OReal programmers use COPY CON PROGRAM.EXE
- 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/