Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 203826

Summary: HPPA machine with HIL slow with kernel built from sys-kernel/gentoo-sources-2.6.23-r3 or sys-kernel/vanilla-sources-2.6.23.9
Product: Gentoo Linux Reporter: Richard Walter <richard>
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED UPSTREAM    
Severity: minor CC: hppa, luckyluke
Priority: High    
Version: unspecified   
Hardware: HPPA   
OS: Linux   
URL: http://thread.gmane.org/gmane.linux.ports.parisc/278
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 202391    
Attachments: top showing high load and high priority of ksoftirqd
emerge --info
.config file of sys-kernel/vanilla-sources-2.6.23.9
Set nice level of 15 to ksoftirq when HP_MLC is set

Description Richard Walter 2007-12-30 20:14:32 UTC
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.
Comment 1 Richard Walter 2007-12-30 20:17:54 UTC
Created attachment 139666 [details]
top showing high load and high priority of ksoftirqd
Comment 2 Richard Walter 2007-12-30 20:18:58 UTC
Created attachment 139667 [details]
emerge --info
Comment 3 Richard Walter 2007-12-30 20:21:40 UTC
Created attachment 139668 [details]
.config file of sys-kernel/vanilla-sources-2.6.23.9
Comment 4 Richard Walter 2008-02-03 23:06:53 UTC
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.
Comment 5 Richard Walter 2008-02-03 23:08:36 UTC
(In reply to comment #4)
Whoops, missed one word

> other threads, on this particular
machine
> these are kthreadd, kseriod, kswapd0,
Comment 6 Guy Martin (RETIRED) gentoo-dev 2008-03-01 22:41:21 UTC
Created attachment 145054 [details, diff]
Set nice level of 15 to ksoftirq when HP_MLC is set
Comment 7 Guy Martin (RETIRED) gentoo-dev 2008-03-01 22:44:02 UTC
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.
Comment 8 Guy Martin (RETIRED) gentoo-dev 2008-03-12 11:16:45 UTC
Kernel team, please commit HIL-ksoftirqd-nice-level.patch into next gentoo-sources patchset.
Comment 9 Mike Pagano gentoo-dev 2008-03-14 17:38:02 UTC
Have there been any efforts to submit this patch upstream?
Comment 10 Mike Pagano gentoo-dev 2008-04-16 13:33:29 UTC
(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?
Comment 11 Guy Martin (RETIRED) gentoo-dev 2008-04-19 12:23:37 UTC
Yep I'm the author of this patch.

I've submitted this upstream. Will update bug with the outcome.
Comment 12 Mike Pagano gentoo-dev 2008-05-09 23:31:41 UTC
Any status on your submission? Can you tell me where and how you submitted the patch?
Comment 13 Daniel Drake (RETIRED) gentoo-dev 2008-07-01 02:42:36 UTC
any news?
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2008-07-17 13:39:20 UTC
Please reopen when you've had a chance to follow up with upstream