Skip to content

Allow setting different power profile for pinned cores and non-pinned cores #555

@HenryJk

Description

@HenryJk

Is your feature request related to a problem? Please describe.
On power limited platform, like intel lunar lake laptop, it is actually often better to force gpu-bottlenecked games to run on E-cores instead. So that the iGPU doesn't have to fight too hard with the CPU for power and thermal budget. Allowing the E-cores to run on "performance" profile and P-cores on "powersave" profile will unlock the most thermal and power headroom for the iGPU as well as giving better gaming battery life.

Describe the solution you'd like
Split desiredprof into desiredpinnedprof and desiredunpinnedprof. Also, split desiredgov into desiredpinnedgov and desiredunpinnedgov. Gamemode can either read its own config file to determine which cpu is pinned and which is not, or better yet, just read on /proc/$(pid)/status | grep Cpus_allowed_list to check in case users used their own taskset command.

Describe alternatives you've considered
Parking P-cores helps, but it has 2 problem for my usecase. First, CPU0 is unparkable due to it being reserved core for the kernel. The kernel doesn't expose the online/offline switch for CPU0 only. The problem is that CPU0 is one of the cores I want to use as low power as possible in my scenario as it is a P-core. Second, in case I'm gaming with external GPU, suddenly the whole situation is flipped on its head and I now wanted to use P-cores instead since the iGPU is irrelevant in this context. So, currently, I'm relying on personal scripts that is given carte-blanche sudo permission to set appropriate power profile to my desired cores via manually echoing to each of the /sys/devices/system/cpu*/cpufreq/energy_performance_preference.

Additional context
Since my situation defies standard tuning tricks, I can only give personal anecdote that in my laptop with lunar lake 268v CPU, I got 10-20% more sustained fps for games like subnautica and hollow knight through pinning on e-cores tricks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions