Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-04 Thread Michael Neuling
> > +#ifndef CONFIG_VIRT_CPU_ACCOUNTING > > +void account_process_tick(int user_tick) > > +{ > > + if (user_tick) { > > + account_user_time(p, jiffies_to_cputime(1)); > > + account_user_time_scaled(p, jiffies_to_cputime(1)); > > + } else { > > +

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Balbir Singh
Paul Mackerras wrote: > Balbir Singh writes: > >> So, scaled accounting will not be available if >> CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly > > No, what makes you think that? If VIRT_CPU_ACCOUNTING=y it is the > responsibility of the arch's account_process_tick to upda

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Paul Mackerras
Balbir Singh writes: > So, scaled accounting will not be available if > CONFIG_VIRT_CPU_ACCOUNTING is defined? Am I reading this correctly No, what makes you think that? If VIRT_CPU_ACCOUNTING=y it is the responsibility of the arch's account_process_tick to update the scaled stats. And the powe

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Paul Mackerras
Ingo Molnar writes: > hm, i've removed it for now because it doesnt even build due toj: *blush* New patch coming. Sending it to Linus via the scheduler tree sounds fine to me. Paul. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Ingo Molnar
* Paul Mackerras <[EMAIL PROTECTED]> wrote: > Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the > deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been > broken on powerpc, because we end up counting user time twice: once in > timer_interrupt() and once in update_process

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > * Paul Mackerras <[EMAIL PROTECTED]> wrote: > > > Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the > > deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been > > broken on powerpc, because we end up counting user time twice: onc

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-03 Thread Balbir Singh
> +#ifndef CONFIG_VIRT_CPU_ACCOUNTING > +void account_process_tick(int user_tick) > +{ > + if (user_tick) { > + account_user_time(p, jiffies_to_cputime(1)); > + account_user_time_scaled(p, jiffies_to_cputime(1)); > + } else { > + account_system_

Re: [PATCH] Restore deterministic CPU accounting on powerpc

2007-11-01 Thread Martin Schwidefsky
On Fri, 2007-11-02 at 15:48 +1100, Paul Mackerras wrote: > This also lets us simplify the s390 code a bit; it means that the s390 > timer interrupt can now call update_process_times even when > CONFIG_VIRT_CPU_ACCOUNTING is turned on, and can just implement a > suitable account_process_tick(). Jus

[PATCH] Restore deterministic CPU accounting on powerpc

2007-11-01 Thread Paul Mackerras
Since powerpc started using CONFIG_GENERIC_CLOCKEVENTS, the deterministic CPU accounting (CONFIG_VIRT_CPU_ACCOUNTING) has been broken on powerpc, because we end up counting user time twice: once in timer_interrupt() and once in update_process_times(). This fixes the problem by pulling the code in