public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Florian Schmidt <mista.tapas@gmx.net>
Cc: Ingo Molnar <mingo@elte.hu>,
	Paul Davis <paul@linuxaudiosystems.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>,
	mark_h_johnson@raytheon.com, Bill Huey <bhuey@lnxw.com>,
	Adam Heath <doogie@debian.org>,
	Michal Schmidt <xschmi00@stud.feec.vutbr.cz>,
	Fernando Pablo Lopez-Lezcano <nando@ccrma.stanford.edu>,
	Karsten Wiese <annabellesgarden@yahoo.de>,
	jackit-devel <jackit-devel@lists.sourceforge.net>,
	Rui Nuno Capela <rncbc@rncbc.org>
Subject: Re: [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4]
Date: Fri, 29 Oct 2004 23:36:03 -0400	[thread overview]
Message-ID: <1099107364.1551.7.camel@krustophenia.net> (raw)
In-Reply-To: <20041030003122.03bcf01b@mango.fruits.de>

On Sat, 2004-10-30 at 00:31 +0200, Florian Schmidt wrote:
> On Fri, 29 Oct 2004 23:25:45 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > will do so. btw: i think i'm a bit confused right now. What debugging
> > > features should i have enabled for this test?
> > 
> > this particular one (atomicity-checking) is always-enabled if you have
> > the -RT patch applied (it's a really cheap check).
> > 
> > for the 'application-triggered tracing' facility we talked about earlier
> > is only active if LATENCY_TRACING is enabled. In that case to turn the 
> > tracer on, call:
> [snip]
> 
> Ok,
> 
> .config attached,
> 
> running the patched jackd -R -P 60 -d alsa -p64 for a bit and provoking
> xruns via window wiggling :)
> 

Ingo, here are some of my traces with the same settings.  These do seem
to correspond to the xruns.  Many of them look tty related - could the
recent changes to the tty layer be responsible?  Possibly this has
nothing to do with RT preempt, but is an unrelated bug in -mm?  The
xruns do seem to correspond to display activity such as switching tabs
in gnome-terminal. 

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c010639b>] work_resched+0x6/0x17 (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c028465d>] down_write_mutex+0xbd/0x180 (36)
 [<c012cbf6>] __mutex_lock+0x36/0x40 (16)
 [<c012cc75>] _mutex_lock_irqsave+0x15/0x20 (16)
 [<c01f1237>] tty_ldisc_try+0x17/0x50 (20)
 [<c01f1287>] tty_ldisc_ref_wait+0x17/0xc0 (88)
 [<c01f21fd>] tty_write+0x7d/0x230 (68)
 [<c01546ac>] vfs_write+0xbc/0x110 (36)
 [<c01547b1>] sys_write+0x41/0x70 (44)
 [<c0106367>] syscall_call+0x7/0xb (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c010639b>] work_resched+0x6/0x17 (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c028465d>] down_write_mutex+0xbd/0x180 (36)
 [<c012cbf6>] __mutex_lock+0x36/0x40 (16)
 [<c012cc75>] _mutex_lock_irqsave+0x15/0x20 (16)
 [<c01f1237>] tty_ldisc_try+0x17/0x50 (20)
 [<c01f1287>] tty_ldisc_ref_wait+0x17/0xc0 (88)
 [<c01f21fd>] tty_write+0x7d/0x230 (68)
 [<c01546ac>] vfs_write+0xbc/0x110 (36)
 [<c01547b1>] sys_write+0x41/0x70 (44)
 [<c0106367>] syscall_call+0x7/0xb (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c028449c>] _down_write+0xcc/0x170 (32)
 [<c01131d3>] lock_kernel+0x23/0x30 (16)
 [<c01f22f0>] tty_write+0x170/0x230 (64)
 [<c01546ac>] vfs_write+0xbc/0x110 (36)
 [<c01547b1>] sys_write+0x41/0x70 (44)
 [<c0106367>] syscall_call+0x7/0xb (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)

jackd:1507 userspace BUG: scheduling in user-atomic context!
 [<c01069fc>] dump_stack+0x1c/0x20 (20)
 [<c02834d0>] schedule+0x70/0x100 (24)
 [<c0119cba>] do_exit+0x29a/0x500 (24)
 [<c0119f56>] sys_exit+0x16/0x20 (12)
 [<c0106367>] syscall_call+0x7/0xb (-8124)
---------------------------
| preempt count: 00000001 ]
| 1-level deep critical section nesting:
----------------------------------------
.. [<c012e5d3>] .... print_traces+0x13/0x50
.....[<c01069fc>] ..   ( <= dump_stack+0x1c/0x20)


However the longest latency recorded during all these xruns is 40-150 usecs:


preemption latency trace v1.0.7 on 2.6.9-mm1-RT-V0.5.14
-------------------------------------------------------
 latency: 48 us, entries: 26 (26)   |   [VP:0 KP:1 SP:1 HP:1 #CPUS:1]
    -----------------
    | task: jackd/1629, uid:1000 nice:0 policy:1 rt_prio:10
    -----------------
 => started at: try_to_wake_up+0x4c/0x100 <c01126ec>
 => ended at:   finish_task_switch+0x27/0xb0 <c0112b77>
=======>
 1101 80000000 0.000ms (+0.000ms): (89) ((116))
 1101 80000000 0.000ms (+0.000ms): (1629) ((1101))
 1101 80000000 0.000ms (+0.000ms): preempt_schedule (try_to_wake_up)
 1101 80000000 0.001ms (+0.000ms): preempt_schedule (__up_write)
 1101 00000000 0.001ms (+0.000ms): preempt_schedule (up_write_mutex)
 1101 80000000 0.002ms (+0.000ms): __schedule (preempt_schedule)
 1101 80000000 0.002ms (+0.000ms): profile_hit (__schedule)
 1101 80000000 0.003ms (+0.002ms): sched_clock (__schedule)
 1629 80000000 0.005ms (+0.000ms): __switch_to (__schedule)
 1629 80000000 0.006ms (+0.000ms): (1101) ((1629))
 1629 80000000 0.006ms (+0.000ms): (116) ((89))
 1629 80000000 0.006ms (+0.000ms): finish_task_switch (__schedule)
 1629 80000000 0.007ms (+0.000ms): trace_stop_sched_switched (finish_task_switch)
 1629 80000000 0.007ms (+0.002ms): (1629) ((89))
 1629 00000000 0.010ms (+0.000ms): bad_range (free_pages_bulk)
 1629 00000000 0.010ms (+0.000ms): bad_range (free_pages_bulk)
 1629 00000000 0.011ms (+0.000ms): _mutex_unlock_irqrestore (free_pages_bulk)
 1629 00000000 0.011ms (+0.000ms): up_mutex (free_pages_bulk)
 1629 00000000 0.011ms (+0.000ms): up_write_mutex (free_pages_bulk)
 1629 00000000 0.012ms (+0.004ms): __up_write (up_write_mutex)
 1629 00000000 0.016ms (+0.000ms): sys_gettimeofday (syscall_call)
 1629 00000000 0.016ms (+0.000ms): user_trace_stop (sys_gettimeofday)
 1629 80000000 0.017ms (+0.000ms): user_trace_stop (sys_gettimeofday)
 1629 80000000 0.017ms (+0.000ms): update_max_trace (user_trace_stop)
 1629 80000000 0.018ms (+0.000ms): _mmx_memcpy (update_max_trace)
 1629 80000000 0.018ms (+0.000ms): kernel_fpu_begin (_mmx_memcpy)

We know that jackd prints from the realtime thread, and that in theory
this could be a problem, in practice it works OK.  Maybe some recent
changes to the tty layer made this problematic.

I think there was a patch posted to the JACK mailing list to print from
a separate thread, I will look into this.

Lee  



  parent reply	other threads:[~2004-10-30  3:37 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1099008264.4199.4.camel@krustophenia.net>
2004-10-29  0:57 ` [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4] Paul Davis
2004-10-29  2:10   ` Lee Revell
2004-10-29  8:02   ` Ingo Molnar
2004-10-29  8:21     ` Thomas Gleixner
2004-10-29  9:09       ` Ingo Molnar
2004-10-29 11:01         ` Paul Davis
2004-10-29 11:14           ` Ingo Molnar
2004-10-29 11:26             ` Paul Davis
2004-10-29 11:36               ` Ingo Molnar
2004-10-29 13:35                 ` Paul Davis
2004-10-29 13:55                   ` Ingo Molnar
2004-10-29 14:03                     ` Paul Davis
2004-10-29 14:15                       ` Ingo Molnar
2004-10-29 16:14             ` Ingo Molnar
2004-10-29 16:21               ` Ingo Molnar
2004-10-29 16:32               ` Florian Schmidt
2004-10-29 16:23                 ` Ingo Molnar
2004-10-29 16:31                   ` Ingo Molnar
2004-10-29 16:37                     ` Ingo Molnar
2004-10-29 16:53                       ` Ingo Molnar
2004-10-29 17:16                     ` Florian Schmidt
2004-10-29 17:02                       ` Ingo Molnar
2004-10-29 17:09                         ` Ingo Molnar
2004-10-29 17:16                           ` Ingo Molnar
2004-10-29 17:33                           ` Florian Schmidt
2004-10-29 17:21                             ` Ingo Molnar
2004-10-29 17:22                               ` Ingo Molnar
2004-10-29 18:36                                 ` Florian Schmidt
2004-10-29 20:33                                   ` Ingo Molnar
2004-10-29 20:51                                     ` Paul Davis
2004-10-29 21:11                                       ` Ingo Molnar
2004-10-30  1:06                                         ` Paul Davis
2004-10-30 11:34                                           ` Ingo Molnar
2004-11-26 17:16                                         ` [Jackit-devel] " Jack O'Quin
2004-10-29 20:42                                   ` Ingo Molnar
2004-10-29 21:31                                     ` Florian Schmidt
2004-10-29 21:25                                       ` Ingo Molnar
2004-10-29 21:42                                         ` Lee Revell
2004-10-29 21:46                                           ` Ingo Molnar
2004-10-29 21:53                                             ` Lee Revell
2004-10-29 23:12                                             ` Lee Revell
2004-10-30 11:58                                               ` Ingo Molnar
2004-10-30 17:49                                                 ` Lee Revell
2004-10-30 19:17                                                   ` Ingo Molnar
2004-10-30 19:43                                                     ` Lee Revell
2004-10-30 19:47                                                     ` Florian Schmidt
2004-10-30 19:37                                                       ` Ingo Molnar
2004-10-30 19:57                                                         ` Florian Schmidt
2004-10-30 19:52                                                       ` Lee Revell
2004-10-30 20:15                                                         ` Florian Schmidt
2004-10-30 20:26                                                           ` Lee Revell
2004-10-30 21:13                                                             ` Florian Schmidt
2004-10-30 21:26                                                               ` Lee Revell
2004-10-30 21:38                                                                 ` Florian Schmidt
2004-10-30 23:12                                                                   ` Lee Revell
2004-10-31 12:07                                                                   ` Ingo Molnar
2004-10-31 12:48                                                                     ` Ingo Molnar
2004-10-31 12:54                                                                       ` Lee Revell
2004-10-31 13:13                                                                         ` Ingo Molnar
2004-10-31 13:40                                                                           ` Ingo Molnar
2004-10-31 15:20                                                                             ` Florian Schmidt
2004-10-31 15:59                                                                               ` Florian Schmidt
2004-10-31 19:06                                                                                 ` Florian Schmidt
2004-11-01 13:42                                                                                   ` Ingo Molnar
2004-11-01 13:53                                                                                     ` Ingo Molnar
2004-11-01 14:06                                                                                       ` Ingo Molnar
2004-11-01 15:47                                                                                         ` Thomas Gleixner
2004-11-01 17:55                                                                                           ` Lee Revell
2004-11-01 17:58                                                                                             ` Thomas Gleixner
2004-11-01 18:43                                                                                             ` Ingo Molnar
2004-11-01 18:46                                                                                           ` Ingo Molnar
2004-11-01 22:30                                                                                             ` Florian Schmidt
2004-11-01 22:40                                                                                               ` Bill Huey
2004-11-01 22:51                                                                                                 ` Florian Schmidt
2004-11-01 22:59                                                                                                   ` Bill Huey
2004-11-02  8:02                                                                                                     ` Ingo Molnar
2004-11-02  8:07                                                                                               ` Ingo Molnar
2004-11-02 15:06                                                                                           ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.6.8 Ingo Molnar
2004-11-02 17:52                                                                                             ` K.R. Foley
2004-11-02 19:37                                                                                               ` Ingo Molnar
2004-11-02 19:40                                                                                                 ` K.R. Foley
2004-11-02 19:24                                                                                             ` Norberto Bensa
2004-11-02 19:35                                                                                               ` Ingo Molnar
2004-11-02 23:09                                                                                             ` Karsten Wiese
2004-11-03  1:12                                                                                               ` Ingo Molnar
2004-11-03 10:15                                                                                                 ` Karsten Wiese
2004-11-01 17:04                                                                                         ` [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4] Rui Nuno Capela
2004-11-01 17:08                                                                                           ` Thomas Gleixner
2004-11-01 20:00                                                                                             ` Rui Nuno Capela
2004-11-01 17:24                                                                                         ` K.R. Foley
2004-11-02  0:22                                                                                         ` Michal Schmidt
2004-11-01 13:54                                                                                     ` Paul Davis
2004-11-01 14:30                                                                                       ` Ingo Molnar
2004-11-01 19:30                                                                                         ` Paul Davis
2004-11-02  8:17                                                                                           ` Ingo Molnar
2004-11-01 14:03                                                                                     ` Florian Schmidt
2004-11-01 14:12                                                                                       ` Ingo Molnar
2004-11-01 15:29                                                                                       ` K.R. Foley
2004-11-02 23:41                                                                                     ` [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.6] Remi Colinet
2004-11-03  1:04                                                                                       ` Remi Colinet
2004-11-01 11:55                                                                                 ` [Fwd: Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4] Ingo Molnar
2004-11-01 12:37                                                                                   ` Ingo Molnar
2004-11-01 12:35                                                                                     ` Thomas Gleixner
2004-11-01 12:51                                                                                       ` Ingo Molnar
2004-11-01 13:15                                                                                         ` Ingo Molnar
2004-11-01 13:40                                                                                           ` Florian Schmidt
2004-11-01 13:48                                                                                             ` Ingo Molnar
2004-11-01 16:47                                                                                   ` Rui Nuno Capela
2004-10-31 23:16                                                                             ` Michal Schmidt
2004-11-01  0:05                                                                             ` Magnus Määttä
2004-10-31 13:11                                                                       ` Ingo Molnar
2004-10-31 14:11                                                                       ` Florian Schmidt
2004-10-31 13:22                                                                         ` Ingo Molnar
2004-10-31 14:28                                                                           ` Florian Schmidt
2004-10-31 13:30                                                                         ` Ingo Molnar
2004-10-31 21:58                                                                     ` Rui Nuno Capela
2004-10-31 22:11                                                                     ` K.R. Foley
2004-10-31  2:20                                                               ` Lee Revell
2004-10-31 10:00                                                                 ` Florian Schmidt
2004-10-31 12:09                                                                   ` Lee Revell
2004-10-31 12:19                                                                     ` Ingo Molnar
2004-10-31 12:35                                                                       ` Lee Revell
2004-10-31 12:39                                                                         ` Ingo Molnar
2004-10-30 20:05                                                       ` Lee Revell
2004-10-30 20:29                                                         ` Florian Schmidt
2004-10-30  0:15                                             ` Lee Revell
2004-10-29 22:31                                         ` Florian Schmidt
2004-10-29 22:50                                           ` Florian Schmidt
2004-10-30 13:15                                             ` Ingo Molnar
2004-10-30 17:53                                               ` Florian Schmidt
2004-10-30  3:36                                           ` Lee Revell [this message]
2004-10-30  3:48                                             ` Lee Revell
2004-10-30 11:16                                               ` Ingo Molnar
2004-10-30 17:44                                                 ` Lee Revell
2004-10-30 11:28                                             ` Ingo Molnar
2004-10-30 11:33                                               ` Ingo Molnar
2004-10-30 13:16                                               ` Florian Schmidt
2004-10-30  1:10                                         ` Lee Revell
2004-10-30  1:15                                         ` Lee Revell
2004-10-29  8:59     ` Ingo Molnar
2004-10-29  9:29       ` Ingo Molnar
2004-10-29 13:48     ` Ingo Molnar
2004-10-29 14:19       ` Paul Davis
2004-10-29 14:27         ` Ingo Molnar
2004-10-29 14:31         ` Ingo Molnar
2004-10-29 14:38           ` Paul Davis
2004-10-29 19:33     ` Lee Revell
2004-10-29 19:35       ` Thomas Gleixner
2004-11-01 14:32 Mark_H_Johnson
2004-11-01 14:36 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-11-01 16:34 Mark_H_Johnson
2004-11-01 18:48 ` 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=1099107364.1551.7.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=annabellesgarden@yahoo.de \
    --cc=bhuey@lnxw.com \
    --cc=doogie@debian.org \
    --cc=jackit-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark_h_johnson@raytheon.com \
    --cc=mingo@elte.hu \
    --cc=mista.tapas@gmx.net \
    --cc=nando@ccrma.stanford.edu \
    --cc=paul@linuxaudiosystems.com \
    --cc=rncbc@rncbc.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox