From: Ingo Molnar <mingo@elte.hu>
To: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] Restore deterministic CPU accounting on powerpc
Date: Sat, 3 Nov 2007 10:32:40 +0100 [thread overview]
Message-ID: <20071103093240.GA22932@elte.hu> (raw)
In-Reply-To: <20071103085420.GA14551@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> * Paul Mackerras <paulus@samba.org> 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_times().
> >
> > This fixes the problem by pulling the code in update_process_times
> > that updates utime and stime into a separate function called
> > account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
> > there is a version of account_process_tick in kernel/timer.c that
> > simply accounts a whole tick to either utime or stime as before. If
> > CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
> > implement account_process_tick.
> >
> > 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().
> >
> > Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> lets push this towards Linus via the scheduler tree, ok?
hm, i've removed it for now because it doesnt even build due toj:
+#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));
Ingo
WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@elte.hu>
To: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Thomas Gleixner <tglx@linutronix.de>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Restore deterministic CPU accounting on powerpc
Date: Sat, 3 Nov 2007 10:32:40 +0100 [thread overview]
Message-ID: <20071103093240.GA22932@elte.hu> (raw)
In-Reply-To: <20071103085420.GA14551@elte.hu>
* Ingo Molnar <mingo@elte.hu> wrote:
> * Paul Mackerras <paulus@samba.org> 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_times().
> >
> > This fixes the problem by pulling the code in update_process_times
> > that updates utime and stime into a separate function called
> > account_process_tick. If CONFIG_VIRT_CPU_ACCOUNTING is not defined,
> > there is a version of account_process_tick in kernel/timer.c that
> > simply accounts a whole tick to either utime or stime as before. If
> > CONFIG_VIRT_CPU_ACCOUNTING is defined, then arch code gets to
> > implement account_process_tick.
> >
> > 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().
> >
> > Signed-off-by: Paul Mackerras <paulus@samba.org>
>
> lets push this towards Linus via the scheduler tree, ok?
hm, i've removed it for now because it doesnt even build due toj:
+#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));
Ingo
next prev parent reply other threads:[~2007-11-03 9:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-02 4:48 [PATCH] Restore deterministic CPU accounting on powerpc Paul Mackerras
2007-11-02 4:48 ` Paul Mackerras
2007-11-02 7:49 ` Martin Schwidefsky
2007-11-02 7:49 ` Martin Schwidefsky
2007-11-03 8:54 ` Ingo Molnar
2007-11-03 8:54 ` Ingo Molnar
2007-11-03 9:32 ` Ingo Molnar [this message]
2007-11-03 9:32 ` Ingo Molnar
2007-11-03 12:06 ` Paul Mackerras
2007-11-03 12:06 ` Paul Mackerras
2007-11-03 9:02 ` Balbir Singh
2007-11-03 9:02 ` Balbir Singh
2007-11-03 11:44 ` Paul Mackerras
2007-11-03 11:44 ` Paul Mackerras
2007-11-03 16:47 ` Balbir Singh
2007-11-03 16:47 ` Balbir Singh
2007-11-04 12:11 ` Michael Neuling
2007-11-04 12:11 ` Michael Neuling
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071103093240.GA22932@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=borntraeger@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=schwidefsky@de.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.