All About the Cache Memory in Linux

For Linux users, a lot of information about the cache memory is available in
the directory '/sys/devices/system/cpu/cpuX/cache', where 'X' is the core number (takes values 0,1,2,...).

Here I discuss the entries present in this and subdirectories.

1. indexN 
    - There can be several directories of the form index0, index1, index2, and so on. Each directory represents a cache that is visible from the cpu core (cpuX).

2. indexN/coherency_line_size
   - This contains the cache line size (generally 64 bytes)

3. indexN/level
   - Contains the cache level (ie. either 1 for L1, 2 for L2, or 3 for L3)

4. indexN/number_of_sets

5. indexN/shared_cpu_list
    - Contains the list of cpus that share this cache memory

6. indexN/shared_cpu_map
    - Contains a bitmap of the cpus that can access this cache memory

7. indexN/size

8. indexN/type
    - Can be either data, instruction, or unified.

9. indexN/ways_of_associativity
     

No comments:

Post a Comment

Followers