Jump to content

Talk:Cache coloring

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

[Untitled]

[edit]

Looks like this article is a slightly modified version of this: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vm-design/page-coloring-optimizations.html 70.82.141.92 18:05, 12 March 2006 (UTC)[reply]


Cache Coloring: (reference to Unix/Linux Operating Systems)

To reduce latency while accessing data, it is generally moved closer (more immediately accessible and possibly faster storage mechanism) to the client from the server/data storage mechanism. This step is referred to as caching (cacheing) of the data. The memory location where the data is stored is called Cache. A significant improvement in the overall performance of the system is generally observed when data that is often accessed is cached. A good example is cacheing proxy servers which cache commonly accessed Web Pages. The locally cached pages load much faster than it would if the caching server were to individually download the same page for each client request.

Cache Coloring : Page coloring is a kernel performance optimization technique. It is primarily designed to ensure that accesses to contiguous pages in virtual memory make the best use of the processor cache. Older more inefficient methods of caching included processor caches that tended to map virtual memory rather than physical memory. The drawbacks of this method are obvious - from worse case scenarios wherein the cache had to be cleared everytime a context switch was made to problems with data aliasing in the cache.

Modern processor caches map physical memory precisely to solve those problems. This means that two side-by-side pages in a processes address space may not correspond to two side-by-side pages in the cache. In fact, if you are not careful side-by-side pages in virtual memory could wind up using the same page in the processor cache--leading to cacheable data being thrown away prematurely and reducing CPU performance. This is true even with multi-way set-associative caches.

Removed this introductory material from article. Burschik 12:07, 11 Jan 2005 (UTC)
Removed Minor quibble. Meredith 14:34, 11 Dec 2018 (UTC)

This subject seems to be better described on the CPU cache page which is a featured article, though this article seems to be coming at the subject from the point of view of the Operating system it is bit difficult to understand without understanding how CPU caches work. Rythie 10:12, 21 March 2007 (UTC)[reply]

Maybe another (very similar) diagram would be helpful. This one has different colors, when they seem to mean the same color. Took me a long time to find out. — Preceding unsigned comment added by 2001:6B0:3A:1:924C:E5FF:FE76:D5DA (talk) 14:34, 14 November 2012 (UTC)[reply]