[知其然不知其所以然-11] turbo功能如果没有在所有的cpu上都使能会怎么样?

来源:互联网 发布:js new做了什么 编辑:程序博客网 时间:2024/06/05 04:29
 最近我们在bugzilla上遇到一个跟cpu不同策略设置相关的问题:

https://bugzilla.kernel.org/show_bug.cgi?id=107821

我们发现系统的sysfs no_turbo字段,一会是1,一会是0,

原因就是因为出问题的环境是numa,no_turbo的值是MSR misc_enable(0x1a0)寄存器,

而通过rdmsr读到的值,可能是在不同的numa节点(misc_enable寄存器是package内共享的,

而numa节点可能跨package),因此就读到不同package上的寄存器值了,这就是问题

所在:intel_pstate驱动缺乏对每个cpu的处理,复现方法也很简单:

# for i in $(seq 0 31); do numactl -C $i cat> /sys/devices/system/cpu/intel_pstate/no_turbo ; done> 1> 1> 1> 1> 1> 1> 1> 1> 0> 0> 0> 0> 0> 0> 0> 0> 1> 1> 1> 1> 1> 1> 1> 1> 0> 0> 0> 0> 0> 0> 0> 0

除了这个问题,intel_pstate还有几个问题:

1. There is no need to run the timer if it is in performance mode
2. misc_enable might be different on different packages
3. how to show the cpu min/max if HWP is enabled
4. pstate scaling when clock modulation is enabled

5. 在非hwp模式下,cpuinfo_cur_freq和cpuinfo_max_freq差了100Mhz


0 0
原创粉丝点击