From: Daniel Walker <dwalker@mvista.com>
To: mingo@elte.hu
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
linux-rt-users@vger.kernel.org
Subject: [PATCH -rt 8/8] stop critical timing in idle.
Date: Tue, 28 Aug 2007 14:37:56 -0700 [thread overview]
Message-ID: <20070828213802.338192076@mvista.com> (raw)
In-Reply-To: 20070828213748.790253419@mvista.com
[-- Attachment #1: fix-idle-latency-tracing.patch --]
[-- Type: text/plain, Size: 1656 bytes --]
without this the idle routine still gets traced.. This is done already
for ACPI idle , but it should also be done for other idle routines.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
---
arch/i386/kernel/process.c | 9 +++++++++
arch/x86_64/kernel/process.c | 10 ++++++++++
2 files changed, 19 insertions(+)
Index: linux-2.6.22/arch/i386/kernel/process.c
===================================================================
--- linux-2.6.22.orig/arch/i386/kernel/process.c
+++ linux-2.6.22/arch/i386/kernel/process.c
@@ -197,8 +197,17 @@ void cpu_idle(void)
if (cpu_is_offline(cpu))
play_dead();
+ /*
+ * We have irqs disabled here, so stop latency tracing
+ * at this point and restart it after we return:
+ */
+ stop_critical_timing();
+
__get_cpu_var(irq_stat).idle_timestamp = jiffies;
idle();
+
+ touch_critical_timing();
+
}
local_irq_disable();
trace_preempt_exit_idle();
Index: linux-2.6.22/arch/x86_64/kernel/process.c
===================================================================
--- linux-2.6.22.orig/arch/x86_64/kernel/process.c
+++ linux-2.6.22/arch/x86_64/kernel/process.c
@@ -223,8 +223,18 @@ void cpu_idle (void)
* Otherwise, idle callbacks can misfire.
*/
local_irq_disable();
+
+ /*
+ * We have irqs disabled here, so stop latency tracing
+ * at this point and restart it after we return:
+ */
+ stop_critical_timing();
+
enter_idle();
idle();
+
+ touch_critical_timing();
+
/* In many cases the interrupt that ended idle
has already called exit_idle. But some idle
loops can be woken up without interrupt. */
--
next prev parent reply other threads:[~2007-08-28 21:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-28 21:37 [PATCH -rt 1/8] introduce PICK_FUNCTION Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 2/8] spinlocks/rwlocks: use PICK_FUNCTION() Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 3/8] seqlocks: use PICK_FUNCTION Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 4/8] fork: desched_thread comment rework Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 5/8] latency tracing: use now() consistently Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 6/8] preempt_max_latency in all modes Daniel Walker
2007-08-28 21:37 ` [PATCH -rt 7/8] latency hist: add resetting for all timing options Daniel Walker
2007-08-28 21:37 ` Daniel Walker [this message]
2007-08-28 23:44 ` [PATCH -rt 1/8] introduce PICK_FUNCTION Nick Piggin
2007-08-28 23:54 ` Daniel Walker
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=20070828213802.338192076@mvista.com \
--to=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
/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.