0

I want to find out which replacement strategy my Level 1 Cache (8-way Set-associative) is using. Where can I find this information in Linux? Running dmidecode -t cache gives me all kinds of information about the cache but not this one:

Handle 0x0008, DMI type 7, 19 bytes
Cache Information
    Socket Designation: L1 Cache
    Configuration: Enabled, Not Socketed, Level 1
    Operational Mode: Write Through
    Location: Internal
    Installed Size: 32 kB
    Maximum Size: 32 kB
    Supported SRAM Types:
        Unknown
    Installed SRAM Type: Unknown
    Speed: Unknown
    Error Correction Type: Parity
    System Type: Data
    Associativity: 8-way Set-associative
  • 3
    What is your purpose? If you're into CPU engineering, you'll have to read a library on the processor specs and operations; if you're into kernel development, lots of source code is waiting patiently for you to look at; and if you're looking for FS cache, you're just looking at the wrong thing. – Julie Pelletier Jan 21 '17 at 16:10
  • The sole purpose is curiosity in this case. I thought this information should be exposed by linux in some way, so I don't have to read the processor spec to obtain it. – Simon Fromme Jan 21 '17 at 16:11
  • It does not have to have control over it to display the information in one way or the other. I guess it doesn't have control over the chassis either, yet I can obtain some information about it :) – Simon Fromme Jan 21 '17 at 16:15
  • 1
    Lets say I want to hire you to do a job, I will make sure you know what you're talking about, but I won't place electrodes in your head to analyze how it operates. It's the same thing with the operating system that uses the hardware (CPU in this case). The kernel just needs to know how to talk to the CPU, not how it operates internally. – Julie Pelletier Jan 21 '17 at 16:16
  • 1
    It seems to me that "you can't do that in Linux" is a perfectly valid answer to an on-topic question. – Michael Homer Jan 22 '17 at 0:51
1

You can't find this information in Linux (and you can't find it in Windows, or any other OS, either). And the BIOS doesn't know about it, so dmidecode won't give you this information. Nor is their any documented CPU model register where the BIOS, the OS or a user program can get this information.

The only way you can find out something about it is to read papers by Intel, where they describe ideas about replacement strategies, and the do measurements to guess what the replacement strategy of your CPU could be. Here is an example where they did something like this.

  • Although your answer is right and appropriate, it does not give a solution to OP and simply justifies that the question is off-topic. You should therefore flag it as such and place this information in a comment. – Julie Pelletier Jan 21 '17 at 19:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.