Cache coherency testing

71 views
Skip to first unread message

Phong Nguyen

unread,
Aug 28, 2023, 7:55:21 PM8/28/23
to stressapptest-discuss

I want to search for the right combination to stress the CPU cache. What is your suggestion to stress cross-thread data coherency? Based on the command line options, these are the two --cc_inc_count and --cc_line_count where I can play with. What are the upper limits for these two before the cache stress becomes saturated?



// Cache coherency data initialization.

  cc_test_ = false;         // Flag to trigger cc threads.

  cc_cacheline_count_ = 2;  // Two datastructures of cache line size.

  cc_cacheline_size_ = 0;   // Size of a cacheline (0 for auto-detect).

  cc_inc_count_ = 1000;     // Number of times to increment the shared variable.

  cc_cacheline_data_ = 0;   // Cache Line size datastructure.

 

//User input to overwrite the default value above

    // Set number of cache line size datastructures.

    ARG_IVALUE("--cc_inc_count", cc_inc_count_);

    // Set number of cache line size datastructures

    ARG_IVALUE("--cc_line_count", cc_cacheline_count_);

    // Override the detected or assumed cache line size.

    ARG_IVALUE("--cc_line_size", cc_cacheline_size_);

    // Flag set when cache coherency tests need to be run

    ARG_KVALUE("--cc_test", cc_test_, true);

Reply all
Reply to author
Forward
0 new messages