rickysarraf / laptop-mode-tools

Power Savings tool for Linux
https://www.researchut.com/tags/laptop-mode-tools/
GNU General Public License v2.0
553 stars 47 forks source link

Implement "efficient cores only" on cpuhotplug plugin #206

Open nwildner opened 10 months ago

nwildner commented 10 months ago

Hello,

I'm submitting this feature where if DISABLE_AVAILABLE_CPU="performance" is set, the cores with higher maximum frequencies(Performance Cores) and their hyperthreading cores will be disabled, keeping only the ones with lower max frequencies(Efficient cores) enabled. To play safe here, I'll not hotplug cpu0 and cpu1 since they could be running kernel stuff(and cpu1 is usually HT of cpu0, have to confirm with lscpu -e)

In my case, I have a Intel Core i7-12650H, and when this is configured, the only cores enabled on battery will be cpu0, cpu1, cpu12, cpu13, cpu14, cpu15. The last four are Efficient and work at a max of 3.5GHz, while the other cores work at 4.7GHz

Already tested on my laptop and this is what I get when using this setting:

ecores

There are some processors which have cores with Max Boost and have like 3 different max frequencies(4.9, 4.7 and 4.0Ghz for example). This plugin update will only enable the lower max frequency cores, if more than 2 are provided.

nwildner commented 10 months ago

@rickysarraf , what do you think? I'm using this for the last week and it seems pretty stable so far :)