Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 203826
Alias:
Product:
Component:
Status: RESOLVED
Resolution: UPSTREAM
Assigned To: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Richard Walter <richard@richardwalter.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
ksoftirqd with high load top showing high load and high priority of ksoftirqd text/plain Richard Walter 2007-12-30 20:17 0000 1.58 KB Details
emerge --info emerge --info text/plain Richard Walter 2007-12-30 20:18 0000 2.95 KB Details
config.vanilla-sources .config file of sys-kernel/vanilla-sources-2.6.23.9 text/plain Richard Walter 2007-12-30 20:21 0000 19.68 KB Details
HIL-ksoftirqd-nice-level.patch Set nice level of 15 to ksoftirq when HP_MLC is set patch Guy Martin 2008-03-01 22:41 0000 590 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 203826 depends on: Show dependency tree
Bug 203826 blocks: 202391
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-12-30 20:14 0000
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 From Richard Walter 2007-12-30 20:17:54 0000 -------
Created an attachment (id=139666) [details]
top showing high load and high priority of ksoftirqd

------- Comment #2 From Richard Walter 2007-12-30 20:18:58 0000 -------
Created an attachment (id=139667) [details]
emerge --info

------- Comment #3 From Richard Walter 2007-12-30 20:21:40 0000 -------
Created an attachment (id=139668) [details]
.config file of sys-kernel/vanilla-sources-2.6.23.9

------- Comment #4 From Richard Walter 2008-02-03 23:06:53 0000 -------
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 From Richard Walter 2008-02-03 23:08:36 0000 -------
(In reply to comment #4)
Whoops, missed one word

> other threads, on this particular
machine
> these are kthreadd, kseriod, kswapd0,

------- Comment #6 From Guy Martin 2008-03-01 22:41:21 0000 -------
Created an attachment (id=145054) [details]
Set nice level of 15 to ksoftirq when HP_MLC is set

------- Comment #7 From Guy Martin 2008-03-01 22:44:02 0000 -------
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 From Guy Martin 2008-03-12 11:16:45 0000 -------
Kernel team, please commit HIL-ksoftirqd-nice-level.patch into next
gentoo-sources patchset.

------- Comment #9 From Mike Pagano 2008-03-14 17:38:02 0000 -------
Have there been any efforts to submit this patch upstream?

------- Comment #10 From Mike Pagano 2008-04-16 13:33:29 0000 -------
(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 From Guy Martin 2008-04-19 12:23:37 0000 -------
Yep I'm the author of this patch.

I've submitted this upstream. Will update bug with the outcome.

------- Comment #12 From Mike Pagano 2008-05-09 23:31:41 0000 -------
Any status on your submission? Can you tell me where and how you submitted the
patch?

------- Comment #13 From Daniel Drake 2008-07-01 02:42:36 0000 -------
any news?

------- Comment #14 From Daniel Drake 2008-07-17 13:39:20 0000 -------
Please reopen when you've had a chance to follow up with upstream

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug