Updated on 2025-09-19 GMT+08:00

Setting CPU Features

You can use the user-mode tool UcpuHconfig to set CPU features. The table below lists the configuration items and examples.

The settings will be applied and retained after UcpuHconfig commands are executed and will not be removed until the OS is restarted.

Table 1 How to use UcpuHconfig

Function

How to Use

Configuration Item

Value

Example

Remarks

Whether to enable L3 cache spills

Observe the traffic of each L3 cache.

If the traffic is evenly distributed to all L3 caches, you are advised to disable cache spills. If some L3 caches are busy but others are idle, you are advised to enable cache spills.

spill

[on|off]

UcpuHconfig --spill on

-

Whether to enable write_unique_share for CPU caches

Observe service hotspots and data flows.

If data is written into multiple cache lines continuously (for example, memcpy), enable this feature to optimize the bandwidth.

write_unique_share

[on|off]

UcpuHconfig --write_unique_share on

-

Algorithm for replacing cache lines

If Top-Down analysis shows that the backend bound is higher than 50% and L3 bound stalls are further detected, try to change the algorithm of cache line replacement and compare the effectiveness of different algorithms.

cacheline

Integer (representing a policy)

UcpuHconfig --cacheline 0

0: random algorithm

1: DRRIP algorithm

2: plru

3: random algorithm

Whether to enable L3 prefetch from DDR

If Top-Down analysis shows that the backend bound is higher than 40%, L3 bound stalls are further detected, and the DDR bandwidth of a single die is higher than 20 Gbit/s, disable prefetch to reduce the DDR bandwidth.

prefetchtgt_en

[on|off]

UcpuHconfig --prefetchtgt_en on

-

Whether to notify DDR during cache eviction

If Top-Down analysis detects backend bound stalls and some L3 caches are busy but others are idle, enable the notification.

reg_evict_disable

[on|off]

UcpuHconfig --reg_evict_disable on

-

Whether to notify other CPUs during cache eviction

If Top-Down analysis shows that the backend bound is higher than 40% and L3 bound stalls are further detected, enable the notification.

reg_evict_selfsnp_disable

[on|off]

UcpuHconfig --reg_evict_selfsnp_disable on

-

Whether to enable CPU prefetch from L3

If Top-Down analysis detects backend and then L3 bound stalls and the DDR bandwidth is high, disable the prefetch.

prefetch_l3

[on|off]

UcpuHconfig --prefetch_l3 on

-

Viewing

You can check special hardware settings.

show

[Function name| all]

UcpuHconfig --show spill

UcpuHconfig --show all

-