A5.6 About read allocate mode

The processor supports read allocate mode, also called write streaming mode, both for the L1 and the L2 cache.

Read allocate mode is a performance and power-saving optimization for writing a large block of data.

Read allocate mode for the L1 data cache

The L1 data cache supports only a Write-Back policy. It normally allocates a cache line on either a read miss or a write miss, although you can alter this by changing the inner cache allocation hints in the page tables. However, there are some situations where allocating on writes is not wanted, such as executing the C standard library memset() function to set a large block of memory to a known value. Writing large blocks of data like this can pollute the cache with unnecessary data. It can also waste power and reduce performance if a linefill must be performed only to discard the linefill data because the entire line was subsequently written by the memset() function. Therefore, the core includes logic to detect when the processor has written a full cache line before the linefill completed. If this situation is detected on a threshold number of consecutive linefills, the core switches to read allocate mode.

When the L1 data cache is in read allocate mode:

  • Loads behave as normal and can still cause linefills.
  • Writes still look up in the cache but if they miss, they write out to L2 rather than starting a linefill.

More than the specified number of linefills might be observed on the master interface, before the core detects that three full cache lines have been written and switches to read allocate mode.

The core continues in read allocate mode until it detects either a cacheable write burst to L2 that is not a full cache line, or there is a load to the same line as is currently being written to L2.

To configure the L1 read allocate mode threshold, use CPUACTLR.L1RADIS.

Read allocate mode for the L2 cache

The L2 cache enters read allocate mode after a threshold number of consecutive cache line sized writes to L2 are detected.

When the L2 cache is in read allocate mode:

  • Loads behave as normal and can still cause linefills.
  • Writes still lookup in the cache but if they miss, they write out to L3 rather than starting a linefill.

L2 read allocate mode continues until there is a cacheable write burst that is not a full cache line, or there is a load to the same line as is currently being written to L3.

To configure the L2 read allocate mode threshold, use CPUACTLR.RADIS.

Non-ConfidentialPDF file icon PDF versionARM 100241_0001_00_en
Copyright © 2016, 2017 ARM Limited or its affiliates. All rights reserved.