An OS solution to partition LLC for each core
Since both physical memory accesses and cache accesses share the same memory
address althouth their formats are different. For a given memory address
from most significant bits to least significant bits, a physical memory
page address is represented by page index bits +
its page offset bits, while
a cache block address is represented by
tag bits + cache set index bits + cache block
block offset bits. For each memory page allocation, OS also knows where this
page is physically allocalted in the cache because the cache can be partitioned
into multiple pages as if the cache block offset is set to a page size.
Page coloring is a technique for OS to allocate memory pages by considering
its cache locations. In this way, LLC can be partitioned statically and
dynamically among cores by OS. The LLC cache conflict issue can be addressed
by OS with page coloring. A group of
methods are implemented in Linux OS and achieve high performance for multicore
systems, and the results are published in HPCA'08.
The Usage of the OS solution
The OS solution in HPCA'08 and its open source Linux code have been
quickly adopted by Intel Software Solution Group (SSG) for their multicore
products and applications.