All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "K.R. Foley" <kr@cybsft.com>
Cc: Mark_H_Johnson@raytheon.com, Amit Shah <amit.shah@codito.com>,
	Karsten Wiese <annabellesgarden@yahoo.de>,
	Bill Huey <bhuey@lnxw.com>, Adam Heath <doogie@debian.org>,
	emann@mrv.com, Gunther Persoons <gunther_persoons@spymac.com>,
	linux-kernel@vger.kernel.org,
	Florian Schmidt <mista.tapas@gmx.net>,
	Fernando Pablo Lopez-Lezcano <nando@ccrma.Stanford.EDU>,
	Lee Revell <rlrevell@joe-job.com>,
	Rui Nuno Capela <rncbc@rncbc.org>,
	Shane Shrybman <shrybman@aei.ca>,
	Esben Nielsen <simlo@phys.au.dk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Subject: Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-6
Date: Fri, 10 Dec 2004 12:22:10 +0100	[thread overview]
Message-ID: <20041210112210.GC6855@elte.hu> (raw)
In-Reply-To: <41B92588.4060106@cybsft.com>


* K.R. Foley <kr@cybsft.com> wrote:

> >here's the code:
> >
> >+static inline void trace_start_sched_wakeup(task_t *p, runqueue_t *rq)
> >+{
> >+       if (TASK_PREEMPTS_CURR(p, rq) && (p != rq->curr) && 
> >_need_resched())
> >+               __trace_start_sched_wakeup(p);
> >+}
> >
> >indeed this only triggers if the woken up task has a higher priority
> >than the waker... hm. Could you try to reverse the priorities of 
> >realfeel and IRQ8, does that produce traces?
> 
> I guess I really am slow. You laid it all out for me above and I still
> didn't get it until I looked at again. I still haven't been able to
> capture an actual trace from any of these programs, but thanks to your
> addition of logging all of the max latencies in 32-14 I can see that
> the traces were there until another trace pushes them out.

wakeup tracing can only work reliably if it's a higher-prio task that is
being woken up (to which the currently executing task is obliged to
preempt). Otherwise the currently executing task (the one which wakes up
the other task) could continue to execute indefinitely, making the
wakeup latency trace much less useful. Hence the priority check and the
need_resched() check: 'is the wakee higher-prio', and 'does the current
task really have to preempt right now'.

(hm, i think the _need_resched() check is in fact buggy, especially on
SMP systems: if there's a cross-CPU wakeup then _need_resched() wont be
set for the current task! Is this perhaps what you wanted to point out? 
I've uploaded the -32-17 kernel which has the _need_resched() check
removed.)

unfortunately this issue seems to hit realfeel/rtc_wakeup too: there the
common wakeup is done from the IRQ thread, which is higher-prio than
realfeel/rtc_wakeup! So wakeup tracing/timing doesnt get activated at
all for those types of wakeups.

a solution/workaround to this would be to 'reverse' the priorities of
the tasks: i.e. to make the IRQ thread prio 80, and to make realfeel
prio 90, and to look at the results. In theory realfeel shouldnt be
running when the next IRQ arrives, so this should produce meaningful
traces.

	Ingo

  reply	other threads:[~2004-12-10 11:22 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-09 17:22 [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-6 Mark_H_Johnson
2004-12-09 17:31 ` Ingo Molnar
2004-12-09 20:34   ` K.R. Foley
2004-12-09 22:06     ` Ingo Molnar
2004-12-09 23:16       ` K.R. Foley
2004-12-10  4:26       ` K.R. Foley
2004-12-10 11:22         ` Ingo Molnar [this message]
2004-12-10 15:26           ` K.R. Foley
  -- strict thread matches above, loose matches on Subject: below --
2004-12-13 14:10 Mark_H_Johnson
2004-12-09 21:58 Mark_H_Johnson
2004-12-09 22:55 ` Ingo Molnar
2004-12-09 20:49 Mark_H_Johnson
2004-12-09 21:56 ` Ingo Molnar
2004-12-09 20:38 Mark_H_Johnson
2004-12-09 19:54 Mark_H_Johnson
2004-12-09 19:23 Mark_H_Johnson
2004-12-09 20:04 ` Ingo Molnar
2004-12-10  5:01 ` Bill Huey
2004-12-10  5:14   ` Steven Rostedt
2004-12-10  5:58     ` Bill Huey
2004-12-09 18:15 Mark_H_Johnson
2004-12-09 20:11 ` Ingo Molnar
2004-12-09 18:10 Mark_H_Johnson
2004-12-09 19:40 ` Ingo Molnar
2004-12-09 19:58 ` Ingo Molnar
2004-12-10 23:42 ` Steven Rostedt
2004-12-11 16:59   ` john cooper
2004-12-12  4:36     ` Steven Rostedt
2004-12-13 23:45       ` john cooper
2004-12-14 13:01         ` Steven Rostedt
2004-12-14 14:28           ` john cooper
2004-12-14 16:53             ` Steven Rostedt
2004-12-11 17:59   ` Esben Nielsen
2004-12-11 18:59     ` Steven Rostedt
2004-12-11 19:50       ` Esben Nielsen
2004-12-11 22:34         ` Steven Rostedt
2004-12-13 21:55           ` Bill Huey
2004-12-13 22:15             ` Steven Rostedt
2004-12-13 22:20               ` Ingo Molnar
2004-12-13 22:31   ` Ingo Molnar
2004-12-09 16:56 Mark_H_Johnson
2004-12-09 17:28 ` Ingo Molnar
2004-12-09 17:41 ` Ingo Molnar
2004-12-09 18:26 ` Ingo Molnar
2004-12-09 19:04 ` Esben Nielsen
2004-12-09 19:58   ` john cooper
2004-12-09 20:16   ` Lee Revell
2004-12-09 15:16 Mark_H_Johnson
2004-12-09 16:17 ` Florian Schmidt
2004-12-09 17:13 ` Ingo Molnar
2004-12-09 14:46 Mark_H_Johnson
2004-12-09 14:14 Mark_H_Johnson
2004-12-07 21:41 Mark_H_Johnson
2004-11-16 13:09 [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.27-1 Ingo Molnar
2004-11-16 13:40 ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.27-3 Ingo Molnar
2004-11-17 12:42   ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.28-0 Ingo Molnar
2004-11-18 12:35     ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.28-1 Ingo Molnar
2004-11-18 16:46       ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.29-0 Ingo Molnar
2004-11-22  0:54         ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-2 Ingo Molnar
2004-11-23 17:58           ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-9 Ingo Molnar
2004-11-24 10:16             ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-10 Ingo Molnar
2004-12-03 20:58               ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.32-0 Ingo Molnar
2004-12-07 13:29                 ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-4 Ingo Molnar
2004-12-07 14:11                   ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm3-V0.7.32-6 Ingo Molnar
2004-12-08  4:31                     ` K.R. Foley
2004-12-08  8:34                       ` Ingo Molnar
2004-12-08 16:07                         ` K.R. Foley
2004-12-08 16:18                           ` Lee Revell
2004-12-08 16:52                             ` K.R. Foley
2004-12-08 16:58                               ` Lee Revell
2004-12-09  9:02                               ` Ingo Molnar
2004-12-09  2:45                           ` K.R. Foley
2004-12-09 12:11                             ` Ingo Molnar
2004-12-09 14:50                               ` K.R. Foley
2004-12-08 17:13                     ` Steven Rostedt
2004-12-08 18:14                       ` Rui Nuno Capela
2004-12-08 19:03                         ` Steven Rostedt
2004-12-08 21:39                           ` Rui Nuno Capela
2004-12-08 22:11                             ` Steven Rostedt
2004-12-09  9:32                               ` Ingo Molnar
2004-12-09 13:36                                 ` Steven Rostedt
2004-12-09  9:06                       ` 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=20041210112210.GC6855@elte.hu \
    --to=mingo@elte.hu \
    --cc=Mark_H_Johnson@raytheon.com \
    --cc=amit.shah@codito.com \
    --cc=annabellesgarden@yahoo.de \
    --cc=bhuey@lnxw.com \
    --cc=doogie@debian.org \
    --cc=emann@mrv.com \
    --cc=gunther_persoons@spymac.com \
    --cc=kr@cybsft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mista.tapas@gmx.net \
    --cc=nando@ccrma.Stanford.EDU \
    --cc=rlrevell@joe-job.com \
    --cc=rncbc@rncbc.org \
    --cc=shrybman@aei.ca \
    --cc=simlo@phys.au.dk \
    --cc=tglx@linutronix.de \
    --cc=xschmi00@stud.feec.vutbr.cz \
    /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.