linux 系统下查看CPU信息时有个clflush size 64项,请问clflush size这项指的是什么?中文意思?

linux 系统下查看CPU信息时有个clflush size 64项,请问clflush size这项指的是什么?中文意思?,第1张

Cache Line flush size

就是系统cache line的大小,单位为bytes,一般为32/64 bytes,这个是硬件决定的,和操作系统位数无关。

i686的 cache line flush size为32 bytes

x86-64的cache line flush size为64bytes

你试试:

less /proc/cpuinfo

model name : Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz

会输出类似一以下信息,不一定行。

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 78

model name : Intel(R) Core(TM) i7-6660U CPU @ 2.40GHz

stepping: 3

microcode : 0xae

cpu MHz : 2400.000

cache size : 4096 KB

physical id : 0

siblings: 2

core id : 0

cpu cores : 2

apicid : 0

initial apicid : 0

fpu : yes

fpu_exception : yes

cpuid level : 22

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm arat pln pts dtherm fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 invpcid adx xsaveopt

bogomips: 4800.00

clflush size: 64

cache_alignment : 64

address sizes : 36 bits physical, 48 bits virtual

power management:

Linux查看CPU基本信息,可以使用命令:

cat /proc/cpuinfo

例如笔者的虚拟机:

[root@promote ~]# cat /proc/cpuinfo

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 37

model name : Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz

stepping : 5

cpu MHz : 2394.049

cache size : 3072 KB

fpu : yes

fpu_exception : yes

cpuid level : 11

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up arch_perfmon pebs bts xtopology tsc_reliable nonstop_tsc aperfmperf unfair_spinlock pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 x2apic popcnt aes hypervisor lahf_lm ida arat dts

bogomips : 4788.09

clflush size : 64

cache_alignment : 64

address sizes : 40 bits physical, 48 bits virtual

power management:

可见,笔者这台虚拟机,有一个逻辑CPU,主频是2.4。

延伸:

processor 逻辑处理器的id。

physical id 物理封装的处理器的id。

core id 每个核心的id。

cpu cores 位于相同物理封装的处理器中的内核数量。

siblings 位于相同物理封装的处理器中的逻辑处理器的数量。

# 总核数 = 物理CPU个数 X 每颗物理CPU的核数

# 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数

# 查看物理CPU个数

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

# 查看每个物理CPU中core的个数(即核数)

cat /proc/cpuinfo| grep "cpu cores"| uniq

# 查看逻辑CPU的个数

cat /proc/cpuinfo| grep "processor"| wc -l

查看CPU信息(型号)

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c


欢迎分享,转载请注明来源:夏雨云

原文地址:https://www.xiayuyun.com/zonghe/68503.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-03-01
下一篇2023-03-01

发表评论

登录后才能评论

评论列表(0条)

    保存