A kernel built from sys-kernel/gentoo-sources-2.6.23-r3 or sys-kernel/vanilla-sources-2.6.23.9 leads to an abysmal overall performance on machines using HIL input devices (CONFIG_KEYBOARD_HIL=y in the kernel .config file). The HIL driver is known to put a lot of work on ksoftirqd, on this certain machine ksoftirqd eats up about 60% of the avalable CPU time on an idle system. This did not affect the performance with kernels built from the now masked sys-kernel/hppa-sources, because the default nice level of ksoftirqd was set to 19, so under situations of high system load, ksoftirqd did only use 3-4% of the CPU time. Kernels built from vanilla-sources or gentoo-sources have a default nice level of -5 for ksoftirqd which results in the situation that all other processes have to share the remaining 40% of the total CPU power and the overall system performance being cut down to less than the half of what it used to be. Reproducible: Always Steps to Reproduce: 1. Fetch a HPPA machine with HIL keyboard and/or mouse 2. Build a kernel from sys-kernel/hppa-sources (and HIL driver) to see it run at nominal speed 3. Build a kernel from sys-kernel/gentoo-sources or sys-kernel/hppa-sources to see it crawl One can work around the performance loss by renice-ing the ksoftirqd process to 19 after the system has booted up, but the system startup process is _slow_ anyway. In hppa-sources, the niceness of ksoftirqd was set in kernel/softirq.c via set_user_nice(), but in recent versions of gentoo-sources and vanilla-sources this has changed, and up to now, I did not find the corresponding snippet of code. Possible locations are kernel/workqueue.c and kernel/kthread.c, but I am unsure about this.
Created attachment 139666 [details] top showing high load and high priority of ksoftirqd
Created attachment 139667 [details] emerge --info
Created attachment 139668 [details] .config file of sys-kernel/vanilla-sources-2.6.23.9
In the meantime I worked out that the nice level of ksoftirqd is set in kernel/kthread.c. If the nice level is changed, it is also applied to some other threads, on this particular these are kthreadd, kseriod, kswapd0, cifsoplockd, cifsdnotifyd and scsi_eh_0.
(In reply to comment #4) Whoops, missed one word > other threads, on this particular machine > these are kthreadd, kseriod, kswapd0,
Created attachment 145054 [details, diff] Set nice level of 15 to ksoftirq when HP_MLC is set
Kernel team, please include this patch. This set the nice level to 15 of ksoftirqd when CONFIG_HIL_MLC is set. This must be done to avoid the HIL driver to take all the ressources. Known problem^W feature of the driver.
Kernel team, please commit HIL-ksoftirqd-nice-level.patch into next gentoo-sources patchset.
Have there been any efforts to submit this patch upstream?
(In reply to comment #8) > Kernel team, please commit HIL-ksoftirqd-nice-level.patch into next > gentoo-sources patchset. > Are you the author of this patch?
Yep I'm the author of this patch. I've submitted this upstream. Will update bug with the outcome.
Any status on your submission? Can you tell me where and how you submitted the patch?
any news?
Please reopen when you've had a chance to follow up with upstream