Developer Guide

  • 2021.1
  • 11/03/2021
  • Public
Contents

Cache Allocation

Currently, cache allocation library and data streams optimizer cannot be used together. This is because RTCM, an underlying component of cache allocation library, must be disabled before using the data streams optimizer for the first time and must remain disabled afterward. For more details, see Real-Time Configuration Manager (RTCM). If you combine RTCM and data streams optimizer, you may experience system hang and various errors due to offline cores. To resolve the errors, you may need to reflash the BIOS. For more details, see ../data_streams_optimizer/tcc_dev_dso_troubleshootingtcc_dev_dso_troubleshooting`.
Cache misses negatively affect the latency of real-time applications. With Intel® TCC Tools, you can reduce cache misses by allocating buffers that are less likely to be evicted from processor cache.
The system uses the
software SRAM
process to create low-latency buffers.
Software SRAM
is a software construct that uses hardware capabilities to allocate a portion of the physical address space into the cache. The addresses are less likely to be evicted by the same or other processes.
Cache is a limited and precious resource, and is used by the OS/hypervisor, the real-time application, and other applications executing on the system. Reserving a certain amount of cache for real-time applications results in the overall cache available for the rest of the system to be reduced by that size. This may impact the performance of other applications and the OS/hypervisor executing on the system. If this is a concern, Intel recommends experimenting with cache reservations in a preproduction environment to assess the impact of such a configuration on the rest of the system to determine acceptability and adjust the configuration accordingly.

Cache Allocation Workflow

  1. Use the Cache Configurator to reserve a portion of cache called
    software SRAM
    with specific properties (size, memory access latency, and CPU core) based on the requirements for the buffer that real-time applications will allocate through the cache allocation library.
    Optionally:
    partition the remaining cache among other agents, such as GPU and I/O.
  2. Prepare your real-time application to execute with specific CPU affinity based on the cache region reserved in step 1.
    Software SRAM regions in the L3 cache can be accessed from any core. Software SRAM regions in the L2 cache must only be accessed by a core local to the cache instance.
  3. Use Cache Allocation Library APIs in your real-time application to allocate memory in the cache region reserved in step 1.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.