Forums - Disabling Snapdragon Cache

2 posts / 0 new
Last post
Disabling Snapdragon Cache
carlnues
Join Date: 8 Mar 22
Posts: 1
Posted: Tue, 2022-03-08 09:47

Hello -- Does the Snapdragon Kryo ever disable memory cache during runtime?

On memory-bound workloads designed to induce cache misses and thrashing, I consistently observe long runtimes likely attributable to memory stalls.  Additionally, when run with a fixed speed CPU policy (linux userspace rather than schedutil), the runtime is sharply bimodal in the speed selected.  Benchmarks run at slower speeds (up to about 70% of max_speed) all take about 3x longer than runs done at higher speeds (above 70%, up to max_speed).

This behavior would make sense if the system is disabling one or more levels of cache -- possibly because it detects that recent history has been frequently stalling on memory, and it is trying to optimize (minimize) power usage instead.  Is this hunch correct?

This appears very device-specific behavior:  The runtime of the same memory-bound workload, when run on other, older hardware (Krait 450), is much **shorter**.  Nor is it bimodal.

None of this behavior appears with workloads that are CPU-bound.  With a compute-bound workload, runtime smoothly tracks CPU speed, as expected.  Further, runtime is faster on the Kryo than on the Krait, as expected.

Followup -- Is there a way to disable the  memory cache(s) programmatically?  Other architectures offer instructions to disable caching, and this would provide a way to evaluate the cause of the observed behavior.

  • Up0
  • Down0
m.arlynrasa.vong
Join Date: 31 Mar 23
Posts: 1
Posted: Fri, 2023-03-31 03:08

Hello,

I would like to suggest you here about this issue 

The Snapdragon Kryo CPU architecture does not disable memory cache during runtime. The cache is an essential component of the CPU and plays a critical role in improving the overall system performance by reducing the memory access time.
 
The behavior you observed could be due to several factors, such as memory bandwidth limitations, memory access patterns, or other hardware/software configurations that may impact memory performance. It is possible that the system is reducing the CPU frequency in response to thermal or power constraints, which could affect the overall system performance.
 
Regarding your follow-up question, there is no straightforward way to disable the memory cache programmatically on the Snapdragon Kryo CPU. The cache is an integral part of the CPU and is managed by hardware, not software. Some architectures may provide instructions to disable caching, but this is not a standard feature across all CPUs.
 
It may be helpful to investigate the memory access patterns of your workload and the memory hierarchy of the system to identify any potential bottlenecks. Additionally, you could try running your workload on a different system with similar specifications to see if the behavior persists. This could help isolate the issue to the specific system or hardware configuration. For more information you can visit us.
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.