From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH 1/9] ia64: VIRT_CPU_ACCOUNTING (accurate cpu time accounting)
Date: Tue, 16 Oct 2007 13:33:59 +0000 [thread overview]
Message-ID: <4714BDC7.1070702@jp.fujitsu.com> (raw)
> [1/9] ia64_add_config_virt_cpu_accounting.patch
The VIRT_CPU_ACCOUNTING option is already implemented s390
and powerpc archs.
By enabling this option, the arch can hook a function named
account_system_vtime() to irq_enter(), irq_exit(), and
head and tail of do_softirq().
This patch just add the Kconfig option to ia64, and enable
to hook ia64 specific account_system_vtime() function,
currently nop as generic one.
Thanks,
H.Seto
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
---
arch/ia64/Kconfig | 11 +++++++++++
arch/ia64/kernel/time.c | 13 +++++++++++++
include/asm-ia64/system.h | 4 ++++
3 files changed, 28 insertions(+)
Index: linux-2.6.23/arch/ia64/Kconfig
=================================--- linux-2.6.23.orig/arch/ia64/Kconfig
+++ linux-2.6.23/arch/ia64/Kconfig
@@ -257,6 +257,17 @@
default "17" if HUGETLB_PAGE
default "11"
+config VIRT_CPU_ACCOUNTING
+ bool "Deterministic task and CPU time accounting"
+ default y
+ help
+ Select this option to enable more accurate task and CPU time
+ accounting. This is done by reading a CPU counter on each
+ kernel entry and exit and on transitions within the kernel
+ between system, softirq and hardirq state, so there is a
+ small performance impact.
+ If in doubt, say Y here.
+
config SMP
bool "Symmetric multi-processing support"
help
Index: linux-2.6.23/arch/ia64/kernel/time.c
=================================--- linux-2.6.23.orig/arch/ia64/kernel/time.c
+++ linux-2.6.23/arch/ia64/kernel/time.c
@@ -59,6 +59,19 @@
};
static struct clocksource *itc_clocksource;
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+
+/*
+ * Account time for a transition between system, hard irq
+ * or soft irq state.
+ */
+void account_system_vtime(struct task_struct *tsk)
+{
+
+}
+
+#endif /* CONFIG_VIRT_CPU_ACCOUNTING */
+
static irqreturn_t
timer_interrupt (int irq, void *dev_id)
{
Index: linux-2.6.23/include/asm-ia64/system.h
=================================--- linux-2.6.23.orig/include/asm-ia64/system.h
+++ linux-2.6.23/include/asm-ia64/system.h
@@ -264,6 +264,10 @@
void default_idle(void);
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING
+extern void account_system_vtime(struct task_struct *);
+#endif
+
#endif /* __KERNEL__ */
#endif /* __ASSEMBLY__ */
next reply other threads:[~2007-10-16 13:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 13:33 Hidetoshi Seto [this message]
2007-11-01 20:29 ` [PATCH 1/9] ia64: VIRT_CPU_ACCOUNTING (accurate cpu time accounting) Tony Luck
2007-11-02 3:15 ` Hidetoshi Seto
2007-11-07 6:59 ` Luck, Tony
2007-11-07 9:46 ` Kenji Kaneshige
2007-11-19 4:34 ` Simon Horman
2007-11-19 5:17 ` Hidetoshi Seto
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=4714BDC7.1070702@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=linux-ia64@vger.kernel.org \
/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.