CPU硬件特性设置
通过用户态工具 UcpuHconfig可进行CPU硬件特性设置,下表列出了各项配置参数及其对应的使用场景示例。

UcpuHconfig命令执行成功后会保存配置,os重启后自动恢复。
功能 | 使用说明 | 参数1 | 参数2 | 示例 | 备注 |
|---|---|---|---|---|---|
L3缓存是否溢出 | 观察每个L3的流量。 每个L3流量平均,建议关spill;L3流量一部分高,一部分空闲,建议开spill。 | spill | [on|off] | UcpuHconfig --spill on | - |
是否设置CPU缓存的write unique share状态 | 观察业务热点和数据流。 有连续写多cacheline的行为(例如memcpy),使能特性能优化带宽。 | write_unique_share | [on|off] | UcpuHconfig --write_unique_share on | - |
cache line替换算法 | Topdown观察到后端bound 50%以上,并且有L3 bound,尝试修改替换算法,比较各个算法的实际效果。 | cacheline | 整数(代表策略) | UcpuHconfig --cacheline 0 | 0: 随机算法 1: drrip算法 2: plru 3: 随机算法 |
L3从ddr的预取 | Topdown观察到后端bound 40%以上,并且有L3 bound,并且抓到单die DDR带宽大(20G以上)。关闭prefetch 可以节省DDR带宽。 | prefetchtgt_en | [on|off] | UcpuHconfig --prefetchtgt_en on | - |
缓存驱逐时是否通知ddr | Topdown观察到后端bound,再观察每个L3的流量,出现L3流量部分空闲部分繁忙,打开配置。 | reg_evict_disable | [on|off] | UcpuHconfig --reg_evict_disable on | - |
缓存驱逐时是否通知其他cpu | Topdown观察到后端bound 40%以上,并且有L3 bound,打开配置。 | reg_evict_selfsnp_disable | [on|off] | UcpuHconfig --reg_evict_selfsnp_disable on | - |
cpu从L3的预取 | Topdown观察到后端bound,并且有L3 bound,如果DDR带宽大,可以尝试关预取。 | prefetch_l3 | [on|off] | UcpuHconfig --prefetch_l3 on | - |
查看 | 查看硬件特殊设置情况。 | show | [功能名 | all] | UcpuHconfig --show spill UcpuHconfig --show all | - |

