All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: William Weston <weston@sysex.net>
Cc: "K.R. Foley" <kr@cybsft.com>,
	linux-kernel@vger.kernel.org,
	"Eugeny S. Mints" <emints@ru.mvista.com>,
	Daniel Walker <dwalker@mvista.com>
Subject: Re: [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00
Date: Tue, 28 Jun 2005 10:10:53 +0200	[thread overview]
Message-ID: <20050628081053.GC7368@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.58.0506272001190.5720@echo.lysdexia.org>

[-- Attachment #1: Type: text/plain, Size: 2688 bytes --]


* William Weston <weston@sysex.net> wrote:

> OK.  Running on -50-25 now.  The burnP6 starvation doesn't seem to 
> affect the whole system, but comes close enough to require the reset 
> button every time.  I usually, but not always, lose network, X, the 
> keyboard, mouse, and serial console.  I'm still unable to get any sort 
> of a trace from these lockups, since it's looking more like a bunch of 
> processes starving than a kernel crash or a full lockup.
> 
> Once, with VLC (viewing a 5mbit/s mcast/udp stream) and two burnP6 
> instances running, I was able to fire up top on the serial console and 
> found out that the IRQ thread for the ns83820 nic was using 99% of one 
> CPU.

aha! that's an important clue. It seems you've got a screaming interrupt 
or some other loop in ns83820 irq handling. Could you do this:

	chrt -o 0 -p `pidof 'IRQ 18'`

(assuming your ns83820 device is still on IRQ18) To check the command 
was effective, enter the following command:

	chrt -o -p `pidof 'IRQ 18'`

and you should see output like:

	pid 748's current scheduling policy: SCHED_OTHER
	pid 748's current scheduling priority: 0

i.e. the thread is not SCHED_FIFO anymore.

this will not fix the ns83820 problem for you, but will make it more 
debuggable - you will still probably lose networking, but keyboard and 
the local console should work fine. You should see a 99% CPU-time 
looping ns83820 IRQ thread when the condition triggers. To debug the 
condition further, could you do something like:

	vmstat 1

what kind of interrupt rate ('in' field) does it report? If it's very 
high then it's a screaming interrupt, if it's low then the IRQ thread is 
looping for some other reason. (but both would be bugs of the -RT 
kernel.)

also, could you try to get a trace of what the IRQ thread is doing. I've 
attached trace-it.c, just run it as root (on a LATENCY_TRACING-enabled 
-RT kernel) to get a finegrained trace of what's going on in the system. 
Whenever the thread-spinning occurs, just run this utility:

	trace-it > trace.txt

and you should get a couple of milliseconds worth of system activity.  
The trace output should look like a really long latency-trace. (The 
latency traces usually compress really well with bzip2 -9, so you can 
attach it to public replies too, if compressed - that way others can 
have a look too.)

> Once, with a normal desktop load and a yum update, this came across on 
> the serial console:
> 
> cat/2100[CPU#1]: BUG in update_out_trace at kernel/latency.c:587

on SMP this could occur if the TSCs of different CPUs are too apart from 
each other. I'll probably put an automatic check for this into the 
/proc/latency_trace code.

	Ingo

[-- Attachment #2: trace-it.c --]
[-- Type: text/plain, Size: 1183 bytes --]


/*
 * Copyright (C) 1999, Ingo Molnar <mingo@redhat.com>
 */

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/wait.h>
#include <linux/unistd.h>

int main (int argc, char **argv)
{
	int ret;

	if (getuid() != 0) {
		fprintf(stderr, "needs to run as root.\n");
		exit(1);
	}
	ret = system("cat /proc/sys/kernel/mcount_enabled >/dev/null 2>/dev/null");
	if (ret) {
		fprintf(stderr, "CONFIG_LATENCY_TRACING not enabled?\n");
		exit(1);
	}
	system("echo 1 > /proc/sys/kernel/trace_all_cpus");
	system("echo 1 > /proc/sys/kernel/trace_enabled");
	system("echo 0 > /proc/sys/kernel/trace_freerunning");
	system("echo 0 > /proc/sys/kernel/trace_print_at_crash");
	system("echo 1 > /proc/sys/kernel/trace_user_triggered");
	system("echo 0 > /proc/sys/kernel/trace_verbose");
	system("echo 0 > /proc/sys/kernel/preempt_max_latency");
	system("echo 0 > /proc/sys/kernel/preempt_thresh");
	system("[ -e /proc/sys/kernel/wakeup_timing ] && echo 0 > /proc/sys/kernel/wakeup_timing");
	system("echo 1 > /proc/sys/kernel/mcount_enabled");

	gettimeofday(0, 1);
	usleep(100000);
	gettimeofday(0, 0);

	system("cat /proc/latency_trace");

	return 0;
}



[-- Attachment #3: trace-it --]
[-- Type: application/octet-stream, Size: 6183 bytes --]

  reply	other threads:[~2005-06-28  8:39 UTC|newest]

Thread overview: 139+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-08 11:28 [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00 Ingo Molnar
2005-06-08 14:18 ` Michal Schmidt
2005-06-08 14:40   ` Keith Owens
2005-06-08 14:41   ` Paulo Marques
2005-06-08 15:04     ` Michal Schmidt
2005-06-08 15:23       ` Keith Owens
2005-06-08 15:56         ` Paulo Marques
2005-06-08 14:32 ` Michal Schmidt
2005-06-08 15:48 ` K.R. Foley
2005-06-08 16:08   ` K.R. Foley
2005-06-08 16:26     ` K.R. Foley
2005-06-08 17:26   ` K.R. Foley
2005-06-08 19:18     ` Ingo Molnar
2005-06-09 11:39       ` Ingo Molnar
2005-06-10 13:34         ` K.R. Foley
2005-06-09  8:47     ` Serge Noiraud
2005-06-09 11:55       ` Ingo Molnar
2005-06-09 15:12         ` Serge Noiraud
2005-06-09 16:34           ` Daniel Walker
2005-06-13  8:53             ` Serge Noiraud
2005-06-13  9:07               ` Ingo Molnar
2005-06-08 17:51 ` Michal Schmidt
2005-06-09 11:45   ` Ingo Molnar
2005-06-09 12:09     ` Michal Schmidt
2005-06-09 12:13       ` Ingo Molnar
2005-06-09 12:48         ` Michal Schmidt
2005-06-10  8:56         ` Esben Nielsen
2005-06-08 19:58 ` Daniel Walker
2005-06-09 21:24 ` Michal Schmidt
2005-06-09 21:34   ` Michal Schmidt
2005-06-11  7:32   ` Ingo Molnar
2005-06-11  8:10     ` Ingo Molnar
2005-06-11 16:35 ` Peter Zijlstra
2005-06-11 18:48   ` Ingo Molnar
2005-06-11 21:14     ` Peter Zijlstra
2005-06-12  1:40     ` Gene Heskett
2005-06-12  6:49       ` Ingo Molnar
2005-06-12  9:02         ` Gene Heskett
2005-06-12 10:35           ` Ingo Molnar
2005-06-12 13:40             ` Gene Heskett
2005-06-12 13:49               ` Ingo Molnar
2005-06-12 14:23                 ` Gene Heskett
2005-06-13  2:11                 ` Gene Heskett
2005-06-13  6:09                   ` Ingo Molnar
2005-06-13  8:37                     ` Gene Heskett
2005-06-14 18:24 ` K.R. Foley
2005-06-14 18:54   ` Ingo Molnar
2005-06-14 22:45     ` Daniel Walker
2005-06-15  6:12       ` Ingo Molnar
2005-06-15  9:13         ` Esben Nielsen
2005-06-14 20:37 ` Paul E. McKenney
2005-06-16  3:51 ` K.R. Foley
2005-06-16  7:29   ` Ingo Molnar
2005-06-16 11:22     ` K.R. Foley
2005-06-16 17:32       ` Ingo Molnar
2005-06-16 17:59         ` K.R. Foley
2005-06-16 20:37           ` K.R. Foley
2005-06-17 11:08             ` Ingo Molnar
2005-06-16 20:43           ` Ingo Molnar
2005-06-17  2:06             ` Gene Heskett
2005-06-17  4:53             ` Gene Heskett
2005-06-17 11:18             ` Ingo Molnar
2005-06-17 14:12               ` K.R. Foley
2005-06-17 15:33               ` K.R. Foley
2005-06-17 19:28         ` William Weston
2005-06-17 21:30           ` William Weston
2005-06-18 12:28             ` Ingo Molnar
2005-06-21  1:18               ` William Weston
2005-06-23  2:05               ` William Weston
2005-06-23  7:56                 ` Ingo Molnar
2005-06-23 13:45                   ` Gene Heskett
2005-06-21 13:10           ` Ingo Molnar
2005-06-21 19:08             ` William Weston
2005-06-21 20:17             ` Benjamin LaHaise
2005-06-21 20:37               ` William Weston
2005-06-21 20:48                 ` Benjamin LaHaise
2005-06-22  2:42               ` Gene Heskett
2005-06-22  7:40                 ` Ingo Molnar
2005-06-22 13:27                   ` Gene Heskett
2005-06-22 13:51                     ` Gene Heskett
2005-06-22 14:08                       ` Gene Heskett
2005-06-25  4:41                     ` Ingo Molnar
2005-06-25  4:47                       ` Ingo Molnar
2005-06-25  5:39                         ` Gene Heskett
2005-06-25  7:26                           ` Gene Heskett
2005-06-25  9:12                             ` Ingo Molnar
2005-06-25 13:19                               ` Gene Heskett
2005-06-25 14:39                                 ` Gene Heskett
2005-06-27 19:01                                   ` Real-Time Preemption, -RT-2.6.12-final-V0.7.50-24 Chuck Harding
2005-06-27 19:42                                     ` Chuck Harding
2005-06-27 21:08                                       ` Gene Heskett
2005-06-27 20:09                                     ` Daniel Walker
2005-06-27 20:28                                       ` Chuck Harding
2005-06-28  0:50                                         ` Daniel Walker
2005-06-28  7:53                                       ` Steven Rostedt
2005-06-28  8:18                                         ` Ingo Molnar
2005-06-28  8:34                                           ` Steven Rostedt
2005-06-28  9:12                                           ` Ingo Molnar
2005-06-28 15:26                                             ` Michal Schmidt
2005-06-28 15:31                                               ` Ingo Molnar
2005-06-28 18:50                                                 ` Chuck Harding
2005-06-28 22:16                                             ` Chuck Harding
2005-06-29  0:32                                               ` Chuck Harding
2005-06-28 15:54                                         ` Daniel Walker
2005-06-21 13:12           ` [patch] Real-Time Preemption, -RT-2.6.12-rc6-V0.7.48-00 Ingo Molnar
     [not found]             ` <Pine.LNX.4.58.0506211228210.16701@echo.lysdexia.org>
2005-06-22  8:03               ` Ingo Molnar
2005-06-22  8:24               ` Ingo Molnar
2005-06-22 10:08                 ` Ingo Molnar
2005-06-22 21:53                 ` William Weston
2005-06-22 22:00                   ` Ingo Molnar
2005-06-22 23:06                     ` William Weston
2005-06-23  0:10                       ` Ingo Molnar
2005-06-23 22:11                         ` William Weston
2005-06-24  1:46                           ` William Weston
2005-06-24  7:06                             ` Ingo Molnar
2005-06-24 22:31                               ` William Weston
2005-06-25  4:14                                 ` Ingo Molnar
2005-06-27  4:21                                   ` William Weston
2005-06-27  8:15                                     ` Ingo Molnar
2005-06-28  3:32                                       ` William Weston
2005-06-28  8:10                                         ` Ingo Molnar [this message]
2005-06-28 11:15                                           ` Ingo Molnar
     [not found]                                           ` <Pine.LNX.4.58.0506281745040.10406@echo.lysdexia.org>
2005-06-29 12:54                                             ` Ingo Molnar
2005-06-30  0:29                                               ` William Weston
2005-06-27  5:43                                   ` Gene Heskett
2005-06-27  8:17                                     ` Ingo Molnar
2005-06-27 17:29                                       ` Gene Heskett
2005-06-27 19:54                                         ` Ingo Molnar
2005-06-27 21:17                                           ` Gene Heskett
2005-06-28  8:28                                             ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2005-06-08 14:02 kus Kusche Klaus
2005-06-08 14:14 ` Thomas Gleixner
2005-06-08 15:49 ` Daniel Walker
2005-06-08 15:50   ` Ingo Molnar
2005-06-08 16:23     ` Thomas Gleixner
2005-06-08 17:29     ` Daniel Walker
2005-06-08 19:24       ` Ingo Molnar
2005-06-12  9:29 Zoltan Boszormenyi
2005-06-12 10:39 ` 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=20050628081053.GC7368@elte.hu \
    --to=mingo@elte.hu \
    --cc=dwalker@mvista.com \
    --cc=emints@ru.mvista.com \
    --cc=kr@cybsft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weston@sysex.net \
    /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.