diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-08 03:23:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:14:57 -0400 |
commit | c83e44842074a87614c78eca70fa6467b0bc3c4a (patch) | |
tree | 90824b20483a9e769d038ffb47b05233838e6007 /arch/um/kernel/time.c | |
parent | f1adc05e77383017bc63ea9c48ba217da76682b8 (diff) |
uml: an idle system should have zero load average
The ever-vigilant users of linode.com noticed that an idle 2.6 UML has a
persistent load average of ~.4.
It turns out that because the UML timer handler processed softirqs before
actually delivering the tick, the tick was counted in the context of the idle
thread about half the time.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/time.c')
-rw-r--r-- | arch/um/kernel/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index cd7349de8ca6..259c49da7ff5 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
@@ -177,6 +177,8 @@ int do_settimeofday(struct timespec *tv) | |||
177 | 177 | ||
178 | void timer_handler(int sig, union uml_pt_regs *regs) | 178 | void timer_handler(int sig, union uml_pt_regs *regs) |
179 | { | 179 | { |
180 | if(current_thread->cpu == 0) | ||
181 | timer_irq(regs); | ||
180 | local_irq_disable(); | 182 | local_irq_disable(); |
181 | irq_enter(); | 183 | irq_enter(); |
182 | update_process_times(CHOOSE_MODE( | 184 | update_process_times(CHOOSE_MODE( |
@@ -184,6 +186,4 @@ void timer_handler(int sig, union uml_pt_regs *regs) | |||
184 | (regs)->skas.is_user)); | 186 | (regs)->skas.is_user)); |
185 | irq_exit(); | 187 | irq_exit(); |
186 | local_irq_enable(); | 188 | local_irq_enable(); |
187 | if(current_thread->cpu == 0) | ||
188 | timer_irq(regs); | ||
189 | } | 189 | } |