High system load on 2.6.15-r1 & software raid
Hi,
Yesterday i installed the new 2.6.15-rc1 kernel to test ata passthrough to get smartctl working on my sata disks. After boot I noticed a rather high load of ~5. I checked with top, ps, but no processes where running taking up CPU, and the system was 100% idle:
Cpu0 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si Cpu1 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
After thinking about it, i realised i had 5 different software raid 1 partitions running, md0 to md4. After disabling each of them with with about 10 minutes in between, i saw the load drop by exactly 1 each time. This problem didn't happen on 2.6.14.2. Has anyone seen this problem before, maybe on another kernel ? As for smartctl, it works,but I didn't enable smartd nor mdadm when testing.
System info/config: http://www.zolder.org/raidload
Regards,
-- Frido
Quoted 10 lines · On Tuesday November 15, [email protected] wrote:
Hi,
Yesterday i installed the new 2.6.15-rc1 kernel to test ata passthrough to get smartctl working on my sata disks. After boot I noticed a rather high load of ~5. I checked with top, ps, but no processes where running taking up CPU, and the system was 100% idle:
Cpu0 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si Cpu1 : 0.0% us, 0.0% sy, 0.0% ni, 100.0% id, 0.0% wa, 0.0% hi, 0.0% si
Quoted 6 lines
After thinking about it, i realised i had 5 different software raid 1 partitions running, md0 to md4. After disabling each of them with with about 10 minutes in between, i saw the load drop by exactly 1 each time. This problem didn't happen on 2.6.14.2. Has anyone seen this problem before, maybe on another kernel ? As for smartctl, it works,but I didn't enable smartd nor mdadm when testing.
Thanks for testing -rc1 and for reporting the problem.
Yes, this is known and the fix just recently went into Linus' GIT repository, so it will be in -rc2.
For reference, the fix is below.
NeilBrown
[PATCH] md: make md threads interruptible again
Despite the fact that md threads don't need to be signalled, and won't respond to signals anyway, we need to have an 'interruptible' wait, else they stay in 'D' state and add to the load average.
(akpm: the signal_pending() test is unneeded - we'll fix that up in the next round. For now, leave it there because that's how the code used to be).
drivers/md/md.c | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-)
drivers/md/md.c +13 -4
@@ -3437,10 +3437,19 @@ static int md_thread(void * arg)allow_signal (SIGKILL );while (!kthread_should_stop ()) { -wait_event_timeout (thread->wqueue, -test_bit (THREAD_WAKEUP , &thread->flags) - ||kthread_should_stop (), - thread->timeout); +/* We need to wait INTERRUPTIBLE so that +* we don't add to the load-average. +* That means we need to be sure no signals are +* pending +*/ +if (signal_pending (current)) +flush_signals (current); + +wait_event_interruptible_timeout + (thread->wqueue, +test_bit (THREAD_WAKEUP , &thread->flags) + ||kthread_should_stop (), + thread->timeout);try_to_freeze ();clear_bit (THREAD_WAKEUP , &thread->flags);