C H A P T E R  34

Level 2 Cache Test (l2cachetest)

l2cachetest exercises the level2 cache in the CPU module of Sun systems. In most CPUs, the level2 cache is also the external cache, but in some cases the level2 cache is on the chip. The test writes, reads, and verifies access of multiple virtual addresses. The virtual addresses are chosen so that they cause targeted hits and misses in the level2 cache. The test dynamically determines the size and organization of the cache and tunes the test accordingly to be effective on the l2cache.



Note - The l2cachetest was previously named l2dcachetest.




l2cachetest Options

To reach the dialog box below, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system may not include the device appropriate to this test. Refer to the SunVTS User's Guide for more details.

FIGURE 34-1 l2cachetest Test Parameter Options Dialog Box

Screenshot of the l2cachetest Test Parameter Options dialog box.
TABLE 34-1 l2cachetest Options

Option

Description

Thrash Cycles

Specifies the number of thrashing cycles the test completes for the level2 cache on the system. Default value for Exclusive mode is 8.

Test Buffer Size

Sets the size of the buffer, in KBs, that the test allocates for testing. Default value is 8192.




Note - The Test Buffer Size option will not be supported in a future release of SunVTS. The reason for this is that the test will dynamically determine the size of the cache and set the buffer size appropriately.





Note - The l2cachetest is automatically bound to a processor. Users are advised to not use the Processor Affinity option for the l2cachetest.




l2cachetest Test Modes
TABLE 34-2 l2cachetest Supported Test Modes

Test Mode

Description

Connection

Performs the Connection subtest.

Exclusive

Performs only the l2cachetest (full test).



l2cachetest Command-Line Syntax

/opt/SUNWvts/bin/l2cachetest -generic_options -o
[ dev=cpu-unit
N ]
[ count=number ][ buffer=number ] ]



Note - The l2cachetest is now per CPU, and N is the CPU number (0,1,2, etc.). Therefore, if the system has five CPUs (CPUs 1, 2, 5, 6, and 7), you can perform l2cachetest on each CPU individually by specifying which CPU you want to verify when invoking the test. For example, if you want to perform l2cachetest on CPU 7, you would enter the following:
/opt/SUNWvts/bin/l2cachetest -generic_options -o dev=cpu-unit7



TABLE 34-3 l2cachetest Command-Line Syntax

Argument

Description

dev=cpu-unitN

Specifies the name of the device.

count=number

Specifies the number of thrashing cycles the test completes for the level2 cache on the system. Default value for Offline mode is 8.

buffer=number

Sets the size of the buffer, in KBs, that the test allocates for testing. Default value is 8192.