* [uml-devel] [PATCH 3/3] UML - An idle system should have zero load average
@ 2007-05-04 17:39 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-05-04 17:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: uml-devel, LKML, caker
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>
--
arch/um/kernel/time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.21-mm/arch/um/kernel/time.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/kernel/time.c 2007-05-04 12:40:52.000000000 -0400
+++ linux-2.6.21-mm/arch/um/kernel/time.c 2007-05-04 13:13:39.000000000 -0400
@@ -177,6 +177,8 @@ int do_settimeofday(struct timespec *tv)
void timer_handler(int sig, union uml_pt_regs *regs)
{
+ if(current_thread->cpu == 0)
+ timer_irq(regs);
local_irq_disable();
irq_enter();
update_process_times(CHOOSE_MODE(
@@ -184,6 +186,4 @@ void timer_handler(int sig, union uml_pt
(regs)->skas.is_user));
irq_exit();
local_irq_enable();
- if(current_thread->cpu == 0)
- timer_irq(regs);
}
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 3/3] UML - An idle system should have zero load average
@ 2007-05-04 17:39 ` Jeff Dike
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2007-05-04 17:39 UTC (permalink / raw)
To: Andrew Morton; +Cc: caker, LKML, uml-devel
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>
--
arch/um/kernel/time.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.21-mm/arch/um/kernel/time.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/kernel/time.c 2007-05-04 12:40:52.000000000 -0400
+++ linux-2.6.21-mm/arch/um/kernel/time.c 2007-05-04 13:13:39.000000000 -0400
@@ -177,6 +177,8 @@ int do_settimeofday(struct timespec *tv)
void timer_handler(int sig, union uml_pt_regs *regs)
{
+ if(current_thread->cpu == 0)
+ timer_irq(regs);
local_irq_disable();
irq_enter();
update_process_times(CHOOSE_MODE(
@@ -184,6 +186,4 @@ void timer_handler(int sig, union uml_pt
(regs)->skas.is_user));
irq_exit();
local_irq_enable();
- if(current_thread->cpu == 0)
- timer_irq(regs);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-05-04 17:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 17:39 [uml-devel] [PATCH 3/3] UML - An idle system should have zero load average Jeff Dike
2007-05-04 17:39 ` Jeff Dike
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.