Frogging-Family / linux-tkg

linux-tkg custom kernels
GNU General Public License v2.0
1.32k stars 163 forks source link

e.g. timer_freq="300" ignored #343

Closed cartesius82 closed 2 years ago

cartesius82 commented 2 years ago

Put:

timer_freq="300"

into customization.cfg, kernel rebuilds perfectly but have CONFIG_HZ_500=y, so it's ignored.

After manually changing the value "Timer frequency" via menuconfig to 300 Hz, the freshly built kernel's scheduler is 300 Hz. CFS btw.

Tk-Glitch commented 2 years ago

As detailed in the comment above that option in customization.cfg:

# Timer frequency - "100" "500", "750" or "1000" ("2000" can be set for cacule cpu sched,
and will fallback to default if set while on another schedulers) - More options available in 
kernel config prompt when left empty depending on selected cpusched with the default 
option pointed with a ">"

"300" isn't a valid option to set in the .cfg at this point in time. I'm not sure how useful it would be to have it there. Do you have a usecase making 300Hz desirable?

ptr1337 commented 2 years ago

@cartesius82 Just write no value in. it will fallback to the standard hz, which is 300 - see the config

AdelKS commented 2 years ago

Just write no value in. it will fallback to the standard hz, which is 300 - see the config

It will fallback to the linux-tkg default, which is 500Hz for every scheduler except cacule I think.

ptr1337 commented 2 years ago

https://github.com/Frogging-Family/linux-tkg/blob/725dd102b8fceff44c5d1619a2aad61c72446f65/linux-tkg-config/5.14/config.x86_64#L485

as long the script/pkgbuild does not change anything if no value is set, then 300hz will be used.

and cacule got no other fallback, its just adding 2000hz.

AdelKS commented 2 years ago

It looks like 250Hz and 300Hz should work actually: https://github.com/Frogging-Family/linux-tkg/blob/ecfb6fed4c70a2adbee80a47bfb9712bc7eb6366/linux-tkg-config/prepare#L1013

AdelKS commented 2 years ago

I just tried it on my machine with ./install.sh config and set _timer_freq=300 and got this in the resulting .config file

CONFIG_HZ_300=y
# CONFIG_HZ_500 is not set
# CONFIG_HZ_750 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=300
Tk-Glitch commented 2 years ago

Oh indeed. I forgot we're doing it with a freq list now.

AdelKS commented 2 years ago

Actually the code as it is now keeps the default value from the .config file if the _timer_freq is set to an invalid value.

AdelKS commented 2 years ago

@cartesius82 are you sure you are not using some config frags that are overwriting the timer frequency ? I just tried Fedora in VM and it works as intended :thinking:

cartesius82 commented 2 years ago

Oh, next time, must read the documentation properly :) but will test that anyway

AdelKS commented 2 years ago

Oh, next time, must read the documentation properly :) but will test that anyway

In this case you were right, the documentation was outdated with respect to what is actually offered, you should be able to get 300Hz :thinking: