Users sometimes post their Gentoo kernel configuration in the Gentoo forums. I frequently see: CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y It's probably wrong, especially since some users report greatly reduced performance. It seems that CPUs run with the lowest CPU frequency available if userspace governor is selected and no userspace governor is available. Where does this setting come from? I'm sure that it was not set by affected users. It must be either in the Gentoo kernel defaults - or it happens when users upgrade their Gentoo kernel. Reproducible: Always
It's been the default for x86_64 since this commit upstream: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5cb04df8d3f03e37a19f2502591a84156be71772 For the dist-kernel packages we use Fedora's config by default, which sets CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y.
Mike, thanks for your answer. What you write makes sense. I'm sure that Ingo Molnar knows what he is doing. Please close this ticket. Just for reference: here is one of the threads where a user had severe problems with the governor "userspace": https://forums.gentoo.org/viewtopic-t-1133148.html
(In reply to Michael Hofmann from comment #2) > Mike, thanks for your answer. What you write makes sense. I'm sure that Ingo > Molnar knows what he is doing. Please close this ticket. > > Just for reference: here is one of the threads where a user had severe > problems with the governor "userspace": > > https://forums.gentoo.org/viewtopic-t-1133148.html I think this is a good idea to switch to schedutil. I'm going to look deeper, but I can add this to our Gentoo Defaults set.
Yeah, I don't think the userspace governor makes much sense as a default. I'm not sure the upstream change was intentional.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=8216b19f52279d249d9233cb47bbcfff5b39fc56 commit 8216b19f52279d249d9233cb47bbcfff5b39fc56 Author: Mike Pagano <mpagano@gentoo.org> AuthorDate: 2022-01-29 20:43:23 +0000 Commit: Mike Pagano <mpagano@gentoo.org> CommitDate: 2022-01-29 20:43:23 +0000 Select CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y as default Bug: https://bugs.gentoo.org/832224 Signed-off-by: Mike Pagano <mpagano@gentoo.org> 4567_distro-Gentoo-Kconfig.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
This will go in with the kernels listed in the Whiteboard
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ced670280b0fe90b987a9221de5bac44a62bc30 commit 8ced670280b0fe90b987a9221de5bac44a62bc30 Author: Mike Pagano <mpagano@gentoo.org> AuthorDate: 2022-02-01 18:37:09 +0000 Commit: Mike Pagano <mpagano@gentoo.org> CommitDate: 2022-02-01 18:37:14 +0000 sys-kernel/gentoo-sources: Linux version bumps and genpatches Linux 5.16.5 Linux 5.15.19 Linux 5.10.96 Linux 5.4.176 Select CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y as default Closes: https://bugs.gentoo.org/832224 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Mike Pagano <mpagano@gentoo.org> sys-kernel/gentoo-sources/Manifest | 12 ++++++++++ .../gentoo-sources/gentoo-sources-5.10.96.ebuild | 28 ++++++++++++++++++++++ .../gentoo-sources/gentoo-sources-5.15.19.ebuild | 28 ++++++++++++++++++++++ .../gentoo-sources/gentoo-sources-5.16.5.ebuild | 28 ++++++++++++++++++++++ .../gentoo-sources/gentoo-sources-5.4.176.ebuild | 28 ++++++++++++++++++++++ 5 files changed, 124 insertions(+)
Is this problem really fixed? There are still users who complain that their machines run ONLY at the lowest CPU frequency, because their default scheduler is set to userspace. See: https://forums.gentoo.org/viewtopic-t-1147736.html
Please replace "default scheduler" with "default governor" in my last post. Sorry.
They would need to come here and add some more information. I don't know the steps they followed or the kernel version
Two more users who noticed a massive slowdown after upgrading to a new kernel: https://forums.gentoo.org/viewtopic-t-1147952.html At least one of the used a gentoo-source kernel. Both users report that the default governor was USERSPACE before and after the update. After the update, USERSPACE governor caused a performance degradation. Changing the default governor to schedutil or performace solved the problem.
(In reply to Michael Hofmann from comment #11) > Two more users who noticed a massive slowdown after upgrading to a new > kernel: > > https://forums.gentoo.org/viewtopic-t-1147952.html > > At least one of the used a gentoo-source kernel. > > Both users report that the default governor was USERSPACE before and after > the update. After the update, USERSPACE governor caused a performance > degradation. > > Changing the default governor to schedutil or performace solved the problem. Closing as there is not much more I can do here. It looks like we cannot "select" something that is non-boolean or tristate symbols. "Reverse dependencies can only be used with boolean or tristate symbols." https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/kbuild/kconfig-language.rst
Another user who became desperate with a very slow machine. His kernel: 5.15.26-gentoo His CPU: Intel Core i7 4790K @ 4.00GHz His frequency governor was set to "userspace". As a consequence, his CPU ran with 800 MHz only. See: https://forums.gentoo.org/viewtopic-t-1149827.html
(In reply to Michael Hofmann from comment #13) > Another user who became desperate with a very slow machine. > > His kernel: 5.15.26-gentoo > His CPU: Intel Core i7 4790K @ 4.00GHz > > His frequency governor was set to "userspace". As a consequence, his CPU ran > with 800 MHz only. > > See: https://forums.gentoo.org/viewtopic-t-1149827.html Unless you have a suggestion that will solve this, then please stop.