From: Karsten Wiese <fzu@wemgehoertderstaat.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH -rt 3/3] Make trace_freerunning work; Take 2: change reset_trace_idx()
Date: Wed, 6 Dec 2006 16:26:38 +0100 [thread overview]
Message-ID: <200612061626.38945.fzu@wemgehoertderstaat.de> (raw)
In-Reply-To: <200612061618.51150.fzu@wemgehoertderstaat.de>
Move atomic_set(&tr->underrun, 0) and atomic_set(&tr->overrun, 0)
occurrences into reset_trace_idx().
Note this leads to under/overrun being reset more often than before:
- in the trace_all_cpus case.
- from under check_critical_timing()
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
--- rt6-kw/kernel/latency_trace-tk2.2.c 2006-12-06 14:58:44.000000000 +0100
+++ rt6-kw/kernel/latency_trace.c 2006-12-06 15:37:08.000000000 +0100
@@ -1695,10 +1695,17 @@ __setup("preempt_thresh=", setup_preempt
static inline void notrace reset_trace_idx(int cpu, struct cpu_trace *tr)
{
if (trace_all_cpus)
- for_each_online_cpu(cpu)
- cpu_traces[cpu].trace_idx = 0;
- else
+ for_each_online_cpu(cpu) {
+ tr = cpu_traces + cpu;
+ tr->trace_idx = 0;
+ atomic_set(&tr->underrun, 0);
+ atomic_set(&tr->overrun, 0);
+ }
+ else{
tr->trace_idx = 0;
+ atomic_set(&tr->underrun, 0);
+ atomic_set(&tr->overrun, 0);
+ }
}
#ifdef CONFIG_CRITICAL_TIMING
@@ -1842,8 +1849,6 @@ __start_critical_timing(unsigned long ei
tr->critical_sequence = max_sequence;
tr->preempt_timestamp = get_monotonic_cycles();
tr->critical_start = eip;
- atomic_set(&tr->underrun, 0);
- atomic_set(&tr->overrun, 0);
reset_trace_idx(cpu, tr);
tr->latency_type = latency_type;
_trace_cmdline(cpu, tr);
@@ -2221,8 +2226,6 @@ void __trace_start_sched_wakeup(struct t
tr->preempt_timestamp = get_monotonic_cycles();
tr->latency_type = WAKEUP_LATENCY;
tr->critical_start = CALLER_ADDR0;
- atomic_set(&tr->underrun, 0);
- atomic_set(&tr->overrun, 0);
_trace_cmdline(raw_smp_processor_id(), tr);
atomic_dec(&tr->disabled);
// }
@@ -2332,8 +2335,6 @@ long user_trace_start(void)
tr->critical_sequence = max_sequence;
tr->preempt_timestamp = get_monotonic_cycles();
tr->critical_start = CALLER_ADDR0;
- atomic_set(&tr->underrun, 0);
- atomic_set(&tr->overrun, 0);
_trace_cmdline(cpu, tr);
mcount();
next prev parent reply other threads:[~2006-12-06 15:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20061205220257.1AECF3E2420@elvis.elte.hu>
2006-12-05 22:10 ` [PATCH -rt 2/3] Make trace_freerunning work Ingo Molnar
2006-12-06 15:08 ` [PATCH -rt 0/3] Make trace_freerunning work; Take 2 Karsten Wiese
2006-12-06 15:12 ` [PATCH -rt 1/3] Make trace_freerunning work; Take 2: Off by 1 tweaks Karsten Wiese
2006-12-06 15:18 ` [PATCH -rt 2/3] Make trace_freerunning work; Take 2: Add atomic_t underrun Karsten Wiese
2006-12-06 15:26 ` Karsten Wiese [this message]
2006-12-06 15:54 ` [PATCH -rt 0/3] Make trace_freerunning work; Take 2 Ingo Molnar
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=200612061626.38945.fzu@wemgehoertderstaat.de \
--to=fzu@wemgehoertderstaat.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®