在閱讀 SU 上的一些答案時,我看到這個答案提到使用以下命令
cat /proc/pal/cpu0/cache_info
在Linux系統上(答案中沒有提到發行版)來獲取有關係統上快取的詳細信息,如下所示。
但是我的 Ubuntu 10.04 32 位元系統上沒有這個檔案系統 /cpu/pal/ ?有什麼指示以及如何在 Ubuntu 上獲得如此詳細的資訊快取嗎?
Cache levels : 3
Unique caches : 5
Data Cache level 1:
Size : 16384 bytes
Attributes : WriteThrough
Associativity : 4
Line size : 64 bytes
Stride : 128 bytes
Store latency : 0 cycle(s)
Load latency : 1 cycle(s)
Store hints :
Load hints : [Temporal, level 1]
Alias boundary : 4096 byte(s)
Tag LSB : 12
Tag MSB : 49
Instruction Cache level 1:
Size : 16384 bytes
Attributes :
Associativity : 4
Line size : 64 bytes
Stride : 128 bytes
Store latency : N/A
Load latency : 1 cycle(s)
Store hints :
Load hints : [Temporal, level 1]
Alias boundary : 4096 byte(s)
Tag LSB : 12
Tag MSB : 49
Data Cache level 2:
Size : 262144 bytes
Attributes : WriteBack
Associativity : 8
Line size : 128 bytes
Stride : 128 bytes
Store latency : 7 cycle(s)
Load latency : 5 cycle(s)
Store hints : [Temporal, level 1][Non-temporal, all levels]
Load hints : [Temporal, level 1][Non-temporal, level 1][Non-temporal, all levels]
Alias boundary : 4096 byte(s)
Tag LSB : 15
Tag MSB : 49
Instruction Cache level 2:
Size : 524288 bytes
Attributes :
Associativity : 8
Line size : 128 bytes
Stride : 128 bytes
Store latency : N/A
Load latency : 7 cycle(s)
Store hints :
Load hints : [Temporal, level 1][Non-temporal, level 1][Non-temporal, all levels]
Alias boundary : 4096 byte(s)
Tag LSB : 16
Tag MSB : 49
Data/Instruction Cache level 3:
Size : 4194304 bytes
Attributes : Unified WriteBack
Associativity : 8
Line size : 128 bytes
Stride : 128 bytes
Store latency : 7 cycle(s)
Load latency : 14 cycle(s)
Store hints : [Temporal, level 1]
Load hints : [Temporal, level 1][Non-temporal, level 1]
Alias boundary : 4096 byte(s)
Tag LSB : 19
Tag MSB : 49