* [POWERPC] Fix duplicate time accounting
@ 2007-10-29 2:50 Paul Mackerras
2007-10-29 3:16 ` Olof Johansson
2007-10-29 13:56 ` Sergei Shtylyov
0 siblings, 2 replies; 3+ messages in thread
From: Paul Mackerras @ 2007-10-29 2:50 UTC (permalink / raw)
To: linuxppc-dev
Currently, process user and system times are advancing twice as fast
as they should because they are being accounted in two places - in the
generic code and in timer_interrupt. This fixes it by removing the
call to account_process_time in timer_interrupt.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9eb3284..5e253d6 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -599,16 +599,6 @@ void timer_interrupt(struct pt_regs * regs)
get_lppaca()->int_dword.fields.decr_int = 0;
#endif
- /*
- * We cannot disable the decrementer, so in the period
- * between this cpu's being marked offline in cpu_online_map
- * and calling stop-self, it is taking timer interrupts.
- * Avoid calling into the scheduler rebalancing code if this
- * is the case.
- */
- if (!cpu_is_offline(cpu))
- account_process_time(regs);
-
if (evt->event_handler)
evt->event_handler(evt);
else
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [POWERPC] Fix duplicate time accounting
2007-10-29 2:50 [POWERPC] Fix duplicate time accounting Paul Mackerras
@ 2007-10-29 3:16 ` Olof Johansson
2007-10-29 13:56 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Olof Johansson @ 2007-10-29 3:16 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
On Mon, Oct 29, 2007 at 01:50:34PM +1100, Paul Mackerras wrote:
> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt. This fixes it by removing the
> call to account_process_time in timer_interrupt.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Olof Johansson <olof@lixom.net>
Thanks for fixing it!
-Olof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [POWERPC] Fix duplicate time accounting
2007-10-29 2:50 [POWERPC] Fix duplicate time accounting Paul Mackerras
2007-10-29 3:16 ` Olof Johansson
@ 2007-10-29 13:56 ` Sergei Shtylyov
1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2007-10-29 13:56 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
Hello.
Paul Mackerras wrote:
> Currently, process user and system times are advancing twice as fast
> as they should because they are being accounted in two places - in the
> generic code and in timer_interrupt. This fixes it by removing the
> call to account_process_time in timer_interrupt.
But will the deterministic accounting option continue to work with such fix?
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 9eb3284..5e253d6 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -599,16 +599,6 @@ void timer_interrupt(struct pt_regs * regs)
> get_lppaca()->int_dword.fields.decr_int = 0;
> #endif
>
> - /*
> - * We cannot disable the decrementer, so in the period
> - * between this cpu's being marked offline in cpu_online_map
> - * and calling stop-self, it is taking timer interrupts.
> - * Avoid calling into the scheduler rebalancing code if this
> - * is the case.
> - */
> - if (!cpu_is_offline(cpu))
> - account_process_time(regs);
> -
> if (evt->event_handler)
> evt->event_handler(evt);
> else
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-29 13:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-29 2:50 [POWERPC] Fix duplicate time accounting Paul Mackerras
2007-10-29 3:16 ` Olof Johansson
2007-10-29 13:56 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).