linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
@ 2004-10-25 18:55 Mark_H_Johnson
  2004-10-25 21:01 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Mark_H_Johnson @ 2004-10-25 18:55 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Alexander Batyrshin, Bill Huey, Adam Heath, K.R. Foley,
	linux-kernel, Florian Schmidt, Fernando Pablo Lopez-Lezcano,
	Lee Revell, Rui Nuno Capela, Thomas Gleixner, Michal Schmidt

OK. Am now trying with -V0.2, it works better but locks up in more
mysterious ways.... The modprobe messages are gone - thanks.

Was able (once) to get the X server up and started some of my tests
but the machine locked up (no mouse movement, no response to keyboard)
and had to use the hardware reset to recover. Only significant message
in the system log was

BUG: sleeping function called from invalid context hdparm(3606) at
kernel/mutex.c
in_atomic():0 [00000000], irqs_disabled():1
... will send stack traceback separately ...
when setting udma2 mode in hdparm.

Also noticed a "14 minute gap" in the log file, presumably when I was
running my real time test. I could not get control back until the first
test had run to completion (but heard the audio - so the machine was
working...). Machine locked up within the next 4 minutes.

The second try, the X server came up but the system froze when I tried
to login (according to the splash screen, was reloading my environment).
Messages in the log file were normal until the failure.

Third try, booting with selinux=0. Froze up again, this time the X
server did not make it all the way up. Last image is the blue background
with the hourglass cursor (frozen in center).

I will send what I can, please advise any further tests or data you
need for analysis.

--Mark H Johnson
  <mailto:Mark_H_Johnson@raytheon.com>


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 18:55 [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Mark_H_Johnson
@ 2004-10-25 21:01 ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 21:01 UTC (permalink / raw)
  To: Mark_H_Johnson
  Cc: Alexander Batyrshin, Bill Huey, Adam Heath, K.R. Foley,
	linux-kernel, Florian Schmidt, Fernando Pablo Lopez-Lezcano,
	Lee Revell, Rui Nuno Capela, Thomas Gleixner, Michal Schmidt


* Mark_H_Johnson@raytheon.com <Mark_H_Johnson@raytheon.com> wrote:

> BUG: sleeping function called from invalid context hdparm(3606) at
> kernel/mutex.c
> in_atomic():0 [00000000], irqs_disabled():1
> ... will send stack traceback separately ...
> when setting udma2 mode in hdparm.

i suspect the patch below will fix the hdparm message - but i dont think
it's related to the other problems you have reported. 

	Ingo

--- linux/drivers/ide/ide-iops.c.orig
+++ linux/drivers/ide/ide-iops.c
@@ -783,13 +783,11 @@ int ide_driveid_update (ide_drive_t *dri
 		printk("%s: CHECK for good STATUS\n", drive->name);
 		return 0;
 	}
-	local_irq_save(flags);
-	SELECT_MASK(drive, 0);
 	id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC);
-	if (!id) {
-		local_irq_restore(flags);
+	if (!id)
 		return 0;
-	}
+	local_irq_save(flags);
+	SELECT_MASK(drive, 0);
 	ata_input_data(drive, id, SECTOR_WORDS);
 	(void) hwif->INB(IDE_STATUS_REG);	/* clear drive IRQ */
 	local_irq_enable();

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 21:01                                         ` Bill Huey
@ 2004-10-28  7:11                                           ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-28  7:11 UTC (permalink / raw)
  To: Bill Huey
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton


* Bill Huey <bhuey@lnxw.com> wrote:

> On Wed, Oct 27, 2004 at 01:54:45PM -0700, Bill Huey wrote:
> > It was originally mean to go in between the irq-thread wake attempt and
> > the actual running of the thread body itself. Somehow this is breaking
> > in my effort to integrate this logic into Ingo's (your) stuff. Brain
> > farting severely right now.
> 
> Another note, it's not meant to be a high resolution latency stats
> patch as much as giving a general feel of irq latency in the system.
> That information is just useful to have in general, but won't be
> sufficient enough to track down specific problems in the kernel.
> Extending this code to track all wake ups is beyond the original
> intention of these measurements. [...]

yeah, the wakeup-tracing we have now is mostly for debugging, it doesnt
generate a histogram at the moment. But you could extend it to be that -
the trace_start_sched_wakeup() and trace_stop_sched_switched() hooks in
the latest patch are precisely that. Note the magic done there, it is
important to establish that only the _highest prio_ task's wakeup
latency counts, and the tests in those functions do just that. 
(otherwise we'd have to do nested latency tracing which is quite
elaborous. I've done it before and it's neither fun, nor truly useful.)

So i think you can put a histogram generator into check_wakeup_timing()
(without needing any outside code), the 'latency' variable established
there is precisely the latency you want to track.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 20:09                                         ` Andrew Morton
@ 2004-10-27 21:43                                           ` K.R. Foley
  0 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 21:43 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Ingo Molnar, rlrevell, linux-kernel, rncbc, Mark_H_Johnson,
	bhuey, doogie, mista.tapas, tglx, xschmi00, nando

Andrew Morton wrote:
> Ingo Molnar <mingo@elte.hu> wrote:
> 
>>>Here is a more up to date version of the rtc-debug patch:
>>
>> > 
>> > http://lkml.org/lkml/2004/9/9/307
>> > 
>> > There is still a bit of 2.4 cruft in there but it works well.  Maybe
>> > this could be included in future patches.
>>
>> the most natural point of inclusion would be Andrew's -mm tree i think
>> :-)
> 
> 
> It's 'orrid.  And iirc it breaks normal use of the RTC.
> 
It definitely changes the output of /dev/rtc if anything uses that.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 19:47                                                 ` Lee Revell
@ 2004-10-27 21:40                                                   ` K.R. Foley
  0 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 21:40 UTC (permalink / raw)
  To: Lee Revell
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Lee Revell wrote:
> On Wed, 2004-10-27 at 12:43 -0500, K.R. Foley wrote:
> 
>>OH! And thanks. :)
>>
> 
> 
> Well I tried it and it does not seem to work exactly right.  This might
> be because I enabled the HPET so the RTC is not getting used.  When I
> run amlat for a few minutes I get a histogram with only 38 samples.
> Does this work for you?
> 
> Lee
> 
> 
Sorry it took a while to get back to you. Yes I did try it a little 
earlier and did seem to be getting reasonable numbers. I wouldn't want 
to publish those numbers yet because I haven't done anything with 
priorities and I was seeing some higher numbers. I don't have the HPET 
turned on myself.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 20:54                                       ` Bill Huey
@ 2004-10-27 21:01                                         ` Bill Huey
  2004-10-28  7:11                                           ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Bill Huey @ 2004-10-27 21:01 UTC (permalink / raw)
  To: Bill Huey
  Cc: Ingo Molnar, K.R. Foley, linux-kernel, Lee Revell,
	Rui Nuno Capela, Mark_H_Johnson, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Andrew Morton

On Wed, Oct 27, 2004 at 01:54:45PM -0700, Bill Huey wrote:
> It was originally mean to go in between the irq-thread wake attempt and
> the actual running of the thread body itself. Somehow this is breaking
> in my effort to integrate this logic into Ingo's (your) stuff. Brain
> farting severely right now.

Another note, it's not meant to be a high resolution latency stats patch
as much as giving a general feel of irq latency in the system. That
information is just useful to have in general, but won't be sufficient
enough to track down specific problems in the kernel. Extending this code
to track all wake ups is beyond the original intention of these
measurements. A method like this only applies to thread of high system
priority with a near RT scheduling class or similar.

bill


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 20:49                                     ` Bill Huey
@ 2004-10-27 20:54                                       ` Bill Huey
  2004-10-27 21:01                                         ` Bill Huey
  0 siblings, 1 reply; 76+ messages in thread
From: Bill Huey @ 2004-10-27 20:54 UTC (permalink / raw)
  To: Bill Huey
  Cc: Ingo Molnar, K.R. Foley, linux-kernel, Lee Revell,
	Rui Nuno Capela, Mark_H_Johnson, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Andrew Morton

On Wed, Oct 27, 2004 at 01:49:35PM -0700, Bill Huey wrote:
> I've got a latency/histogram patch here, but I've been having problems
> trying to integrate it into Ingo's irq-threads and getting that simple
> subtraction returning something sensible. The basic logic works otherwise.
> 
> Maybe another pair of eyes can figure this out, since I could have missed
> something pretty simple...

It was originally mean to go in between the irq-thread wake attempt and
the actual running of the thread body itself. Somehow this is breaking
in my effort to integrate this logic into Ingo's (your) stuff. Brain
farting severely right now.

bill


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:05                                   ` Ingo Molnar
  2004-10-27 15:13                                     ` Lee Revell
  2004-10-27 15:16                                     ` K.R. Foley
@ 2004-10-27 20:49                                     ` Bill Huey
  2004-10-27 20:54                                       ` Bill Huey
  2 siblings, 1 reply; 76+ messages in thread
From: Bill Huey @ 2004-10-27 20:49 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Andrew Morton

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

On Wed, Oct 27, 2004 at 05:05:48PM +0200, Ingo Molnar wrote:
> 
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> > I use the rtc-debug and amlat to generate histograms of latencies
> > which is what I was trying to do when I found the rtc problem the
> > first time.  I believe that rtc-debug/amlat is much more accurate for
> > generating histograms of latencies than realfeel is because the
> > instrumentation is in the kernel rather than a userspace program.
> 
> ah, ok - nice. So rtc-debug+amlat is the only known-reliable way to
> produce latency histograms?
> 
> Btw., rtc-debug's latency results could now be cross-validated with
> -V0.4's wakeup tracer (and vice versa), because the two are totally
> independent mechanisms.

I've got a latency/histogram patch here, but I've been having problems
trying to integrate it into Ingo's irq-threads and getting that simple
subtraction returning something sensible. The basic logic works otherwise.

Maybe another pair of eyes can figure this out, since I could have missed
something pretty simple...

bill


[-- Attachment #2: s.diff --]
[-- Type: text/plain, Size: 14363 bytes --]

diff -rwu linux.voluntary.virgin/arch/i386/Kconfig linux.voluntary/arch/i386/Kconfig
--- linux.voluntary.virgin/arch/i386/Kconfig	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/arch/i386/Kconfig	2004-10-21 22:35:53.000000000 -0700
@@ -586,6 +586,17 @@
 	  system.
 	  Say N if you are unsure.
 
+config NOTE_LATENCY
+	bool "Note irq-thread wake latency"
+	depends on PREEMPT_HARDIRQS && HPET
+	default n
+	help
+	  This options timestamp marks exception frame wake events to the
+	  irq-thread in question and shoves it into a statistically scalable
+	  histogram. Timestamp events can be "zoomed" in that are of interest
+	  with compile time changes to the struct describing the ranges of
+	  band(s) being saved.
+
 config X86_UP_APIC
 	bool "Local APIC support on uniprocessors" if !SMP
 	depends on !(X86_VISWS || X86_VOYAGER)
diff -rwu linux.voluntary.virgin/arch/i386/kernel/irq.c linux.voluntary/arch/i386/kernel/irq.c
--- linux.voluntary.virgin/arch/i386/kernel/irq.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/arch/i386/kernel/irq.c	2004-10-21 22:36:10.000000000 -0700
@@ -54,6 +54,7 @@
 	u32 *isp;
 #endif
 
+
 	irq_enter();
 	__trace((unsigned long)do_IRQ, regs.eip);
 	__trace((unsigned long)do_IRQ, irq);
@@ -101,6 +102,12 @@
 		);
 	} else
 #endif
+
+#ifdef CONFIG_NOTE_LATENCY
+//	irq_desc_t *desc = irq_desc + irq;
+	irq_desc[irq].timestamp = get_cycles();
+#endif
+
 		__do_IRQ(irq, &regs);
 
 	irq_exit();
diff -rwu linux.voluntary.virgin/arch/i386/kernel/kgdb_stub.c linux.voluntary/arch/i386/kernel/kgdb_stub.c
--- linux.voluntary.virgin/arch/i386/kernel/kgdb_stub.c	2004-10-21 21:52:18.000000000 -0700
+++ linux.voluntary/arch/i386/kernel/kgdb_stub.c	2004-10-21 22:36:17.000000000 -0700
@@ -365,8 +365,8 @@
 
 #ifdef CONFIG_SMP
 static int in_kgdb_called;
-static spinlock_t waitlocks[MAX_NO_CPUS] =
-    {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED };
+static raw_spinlock_t waitlocks[MAX_NO_CPUS] =
+    {[0 ... MAX_NO_CPUS - 1] = RAW_SPIN_LOCK_UNLOCKED };
 /*
  * The following array has the thread pointer of each of the "other"
  * cpus.  We make it global so it can be seen by gdb.
@@ -374,9 +374,9 @@
 volatile int in_kgdb_entry_log[MAX_NO_CPUS];
 volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS];
 /*
-static spinlock_t continuelocks[MAX_NO_CPUS];
+static raw_spinlock_t continuelocks[MAX_NO_CPUS];
 */
-spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED;
+raw_spinlock_t kgdb_spinlock = RAW_SPIN_LOCK_UNLOCKED;
 /* waiters on our spinlock plus us */
 static atomic_t spinlock_waiters = ATOMIC_INIT(1);
 static int spinlock_count = 0;
@@ -2404,7 +2404,7 @@
 void
 kgdb_tstamp(int line, char *source, int data0, int data1)
 {
-	static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED;
+	static raw_spinlock_t ts_spin = RAW_SPIN_LOCK_UNLOCKED;
 	int flags;
 	kgdb_local_irq_save(flags);
 	spin_lock(&ts_spin);
diff -rwu linux.voluntary.virgin/arch/i386/kernel/timers/timer_hpet.c linux.voluntary/arch/i386/kernel/timers/timer_hpet.c
--- linux.voluntary.virgin/arch/i386/kernel/timers/timer_hpet.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/arch/i386/kernel/timers/timer_hpet.c	2004-10-26 14:11:31.000000000 -0700
@@ -49,7 +49,8 @@
 	cyc2ns_scale = (1000 << CYC2NS_SCALE_FACTOR)/cpu_mhz;
 }
 
-static inline unsigned long long cycles_2_ns(unsigned long long cyc)
+//static inline
+unsigned long long cycles_2_ns(unsigned long long cyc)
 {
 	return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
 }
diff -rwu linux.voluntary.virgin/arch/i386/kernel/traps.c linux.voluntary/arch/i386/kernel/traps.c
--- linux.voluntary.virgin/arch/i386/kernel/traps.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/arch/i386/kernel/traps.c	2004-10-21 22:36:25.000000000 -0700
@@ -117,6 +117,7 @@
 	unsigned long addr, prev_frame;
 
 #ifdef CONFIG_KGDB
+#error
 extern void sysenter_past_esp(void);
 #include <asm/kgdb.h>
 #include <linux/init.h>
@@ -785,8 +786,9 @@
 		 * that really belongs to user space.  Others are
 		 * "Ours all ours!"
 		 */
-		if (((regs->xcs & 3) == 0) && ((void *)regs->eip == sysenter_past_esp))
+/*		if (((regs->xcs & 3) == 0) && ((void *)regs->eip == sysenter_past_esp))
 			goto clear_TF_reenable;
+		--billh	*/ 
 #else
 		if ((regs->xcs & 3) == 0)
 			goto clear_TF_reenable;
diff -rwu linux.voluntary.virgin/arch/i386/lib/kgdb_serial.c linux.voluntary/arch/i386/lib/kgdb_serial.c
--- linux.voluntary.virgin/arch/i386/lib/kgdb_serial.c	2004-10-21 21:52:18.000000000 -0700
+++ linux.voluntary/arch/i386/lib/kgdb_serial.c	2004-10-21 22:36:33.000000000 -0700
@@ -104,9 +104,9 @@
  * but we will just depend on the uart status to help keep that straight.
 
  */
-static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED;
+static raw_spinlock_t uart_interrupt_lock = RAW_SPIN_LOCK_UNLOCKED;
 #ifdef CONFIG_SMP
-extern spinlock_t kgdb_spinlock;
+extern raw_spinlock_t kgdb_spinlock;
 #endif
 
 static int
@@ -343,7 +343,7 @@
  */
 int kgdb_in_isr = 0;
 int kgdb_in_lsr = 0;
-extern spinlock_t kgdb_spinlock;
+extern raw_spinlock_t kgdb_spinlock;
 
 /* Caller takes needed protections */
 
@@ -381,7 +381,7 @@
 }				/* tty_getDebugChar */
 
 static int count = 3;
-static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED;
+static raw_spinlock_t one_at_atime = RAW_SPIN_LOCK_UNLOCKED;
 
 static int __init
 kgdb_enable_ints(void)
diff -rwu linux.voluntary.virgin/include/asm-i386/timex.h linux.voluntary/include/asm-i386/timex.h
--- linux.voluntary.virgin/include/asm-i386/timex.h	2004-10-21 21:52:22.000000000 -0700
+++ linux.voluntary/include/asm-i386/timex.h	2004-10-26 16:26:32.000000000 -0700
@@ -7,6 +7,7 @@
 #define _ASMi386_TIMEX_H
 
 #include <linux/config.h>
+#include <asm/types.h>
 #include <asm/processor.h>
 
 #ifdef CONFIG_X86_ELAN
@@ -30,7 +31,7 @@
  * four billion cycles just basically sounds like a good idea,
  * regardless of how fast the machine is. 
  */
-typedef unsigned long long cycles_t;
+typedef u64 cycles_t;
 
 extern cycles_t cacheflush_time;
 
@@ -49,6 +50,21 @@
 	return ret;
 }
 
+static inline cycles_t get_cycles64 (void)
+{
+	union u64_a {
+		u64 intlong;
+		struct u32x2_a {
+			uint32_t eax;
+			uint32_t edx;
+		} uintint;
+	} ulonglong;
+		
+	rdtsc(ulonglong.uintint.eax, ulonglong.uintint.edx);
+	return ulonglong.intlong;
+}
+
+
 extern unsigned long cpu_khz;
 
 #endif
diff -rwu linux.voluntary.virgin/include/linux/irq.h linux.voluntary/include/linux/irq.h
--- linux.voluntary.virgin/include/linux/irq.h	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/include/linux/irq.h	2004-10-21 22:36:54.000000000 -0700
@@ -76,6 +76,9 @@
 	unsigned int irq_count;		/* For detecting broken interrupts */
 	unsigned int irqs_unhandled;
 	struct task_struct *thread;
+#ifdef CONFIG_NOTE_LATENCY
+	u32 timestamp;
+#endif
 	wait_queue_head_t wait_for_handler;
 	raw_spinlock_t lock;
 } ____cacheline_aligned irq_desc_t;
diff -rwu linux.voluntary.virgin/kernel/irq/handle.c linux.voluntary/kernel/irq/handle.c
--- linux.voluntary.virgin/kernel/irq/handle.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/kernel/irq/handle.c	2004-10-27 02:50:40.000000000 -0700
@@ -139,6 +139,10 @@
 	struct irqaction * action;
 	unsigned int status;
 
+#ifdef CONFIG_NOTE_LATENCY
+//#error
+	desc->timestamp = get_cycles64();
+#endif
 	kstat_this_cpu.irqs[irq]++;
 	if (desc->status & IRQ_PER_CPU) {
 		irqreturn_t action_ret;
diff -rwu linux.voluntary.virgin/kernel/irq/manage.c linux.voluntary/kernel/irq/manage.c
--- linux.voluntary.virgin/kernel/irq/manage.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/kernel/irq/manage.c	2004-10-27 02:51:37.000000000 -0700
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/kthread.h>
 #include <linux/interrupt.h>
+#include <asm/timex.h>
 
 #include "internals.h"
 
@@ -448,6 +449,10 @@
 	local_irq_enable();
 }
 
+#ifdef CONFIG_NOTE_LATENCY
+extern void note_latency_event(cycles_t start_event_time);
+#endif
+
 extern asmlinkage void __do_softirq(void);
 
 static int do_irqd(void * __desc)
@@ -468,6 +473,10 @@
 
 	while (!kthread_should_stop()) {
 		set_current_state(TASK_INTERRUPTIBLE);
+#ifdef CONFIG_NOTE_LATENCY
+//#error
+		note_latency_event(desc->timestamp);
+#endif
 		do_hardirq(desc);
 		cond_resched_all();
 		__do_softirq();
diff -rwu linux.voluntary.virgin/kernel/irq/proc.c linux.voluntary/kernel/irq/proc.c
--- linux.voluntary.virgin/kernel/irq/proc.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/kernel/irq/proc.c	2004-10-27 02:54:32.000000000 -0700
@@ -196,6 +196,10 @@
 #undef MAX_NAMELEN
 
 
+#ifdef CONFIG_NOTE_LATENCY
+static int note_latency_proc_init(void);
+#endif
+
 void init_irq_proc(void)
 {
 	int i;
@@ -210,5 +214,198 @@
 	 */
 	for (i = 0; i < NR_IRQS; i++)
 		register_irq_proc(i);
+
+#ifdef CONFIG_NOTE_LATENCY
+	note_latency_proc_init();
+#endif
+}
+
+
+#include <linux/seq_file.h>
+#include <linux/module.h>
+#include <asm/delay.h>
+#include <asm/timex.h>
+#include <asm/div64.h>
+
+/*
+ * Tue Oct 19 15:54:33 PDT 2004
+ * Silly code that prints out the irq-thread latencies.
+ * --billh
+ */
+
+extern
+unsigned long long cycles_2_ns(unsigned long long cyc);
+
+#define NOTE_LATENCY_HISTO_SIZE 3
+
+typedef struct {
+	u64 usec_granularity;
+	u64 n_entries;
+
+	u64 usec_lower_bounds;
+	u64 usec_upper_bounds;
+	unsigned int *vec;
+} note_latency_vec_t;
+
+note_latency_vec_t
+	note_latency_histo_vec[NOTE_LATENCY_HISTO_SIZE] =
+		{ {1,  100,  0, 0, NULL},
+		  {10, 100,  0, 0, NULL},
+		  {50, 1000, 0, 0, NULL} };
+
+unsigned int note_latency_n_events = 0;
+
+void note_latency_init(void) {
+	int i;
+	u64 frame_base = 0;
+
+	for (i = 0; i < NOTE_LATENCY_HISTO_SIZE; ++i) {
+		note_latency_vec_t *t = &note_latency_histo_vec[i];
+
+		t->vec = (unsigned int *) kmalloc(sizeof(unsigned int) * t->n_entries,  GFP_KERNEL);
+		memset(t->vec, 0, sizeof(unsigned int) * t->n_entries); /* hack */
+
+		t->usec_lower_bounds = frame_base;
+		t->usec_upper_bounds = frame_base += t->usec_granularity * t->n_entries;
+	}
+
+	printk("cpu_khz = %d", cpu_khz);
+}
+
+void note_latency_destruct(void) {
+	unsigned int i;
+
+	for (i = 0; i < NOTE_LATENCY_HISTO_SIZE; ++i) {
+		note_latency_vec_t *t = &note_latency_histo_vec[i];
+		kfree((void *) t->vec);
+		t->vec = NULL;
+	}
+}
+
+extern unsigned long notrace cycles_to_usecs(cycles_t delta);
+
+void note_latency_event(cycles_t start_event_time) {
+	unsigned int i, index;
+	note_latency_vec_t *t;
+	cycles_t event_time, s, ss;
+	u32 remainder;
+
+	t = &note_latency_histo_vec[NOTE_LATENCY_HISTO_SIZE -1];
+
+	++note_latency_n_events;
+
+/*
+	ss = get_cycles64();
+	udelay(45);
+	s = get_cycles64();
+	s -= ss;
+*/
+	s = get_cycles64() - start_event_time;
+	remainder = do_div(s, cpu_khz / 1000 +1);
+	event_time = s;
+/*
+*/
+
+//	event_time = cycles_2_ns(get_cycles64() - start_event_time); // more accurate 
+//	event_time = cycles_to_usecs(get_cycles64() - start_event_time);
+
+
+	for (i = 0; i < NOTE_LATENCY_HISTO_SIZE; ++i) {
+		note_latency_vec_t *t2 = &note_latency_histo_vec[i];
+
+		if ((t2->usec_lower_bounds <= event_time) && (event_time < t2->usec_upper_bounds)) {
+			event_time -= t2->usec_lower_bounds;
+			remainder = do_div(event_time, t2->usec_granularity);
+			index = event_time;
+			t2->vec[index] += 1;
+			goto out;
+		}
+
+	}
+
+#if 0
+//	note_latency_histo_vec[1].vec[4] += 1; /* single spike */
+
+	/* over extended values add at the end */
+	if (event_time > 100000)
+		t->vec[t->n_entries - 2] += 1;
+#endif
+	if (event_time < 0)
+		t->vec[t->n_entries - 3] += 1;
+	t->vec[t->n_entries - 1] += 1;
+out:
+
+}
+
+void note_latency_dump_histogram(struct seq_file *s) {
+	int i, j;
+	unsigned int frame_base_time = 0;
+
+	for (i = 0; i < NOTE_LATENCY_HISTO_SIZE; ++i) {
+		note_latency_vec_t *t = &note_latency_histo_vec[i];
+		unsigned int peak;
+
+		seq_printf(s, "<%lld>\n", t->usec_lower_bounds);
+
+		for (j = 0; j < t->n_entries; ++j) {
+			if ( (peak = t->vec[j]) )
+				seq_printf(s, "%lld: %d\n",
+					frame_base_time + (j * t->usec_granularity),
+					peak);
+		}
+
+		seq_printf(s, "<%lld>\n", t->usec_upper_bounds);
+//		seq_printf(s, " ----- \n");
+
+		frame_base_time += t->usec_upper_bounds;
+	}
+	seq_printf(s, "N events = %d\n", note_latency_n_events);
+	seq_printf(s, "end\n");
+}
+
+static
+int note_latency_seq_show(struct seq_file *s, void *v)
+{
+	seq_printf(s, "BEGIN IRQ-task latency histogram (10usec bins)\n");
+	note_latency_dump_histogram(s);
+	seq_printf(s, "END\n");
+
+	return 0;
+}
+
+static
+int note_latency_seq_open(struct inode *inode, struct file *file)
+{
+	single_open(file, note_latency_seq_show, NULL);
+	return 0;
+}
+
+/* Virtual file system methods */
+static
+struct file_operations latency_file_ops = {
+        .owner   = THIS_MODULE,
+        .open    = note_latency_seq_open,
+        .read    = seq_read,
+        .llseek  = seq_lseek,
+        .release = single_release
+};
+
+#define PROC_PATH_ROOT_OBJECT "irq_latency_histogram"
+
+static
+int note_latency_proc_init(void) {
+        struct proc_dir_entry
+		*proc_root_object;
+
+        proc_root_object = create_proc_entry(PROC_PATH_ROOT_OBJECT, 0, NULL);
+        if (!proc_root_object) {
+                printk (KERN_ERR "cannot create /proc/" PROC_PATH_ROOT_OBJECT "\n");
+                return -ENOMEM;
+        }
+        proc_root_object->proc_fops = &latency_file_ops;
+
+	note_latency_init();
+
+	return 0;
 }
 
diff -rwu linux.voluntary.virgin/kernel/latency.c linux.voluntary/kernel/latency.c
--- linux.voluntary.virgin/kernel/latency.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/kernel/latency.c	2004-10-21 22:37:22.000000000 -0700
@@ -62,7 +62,8 @@
 
 static DEFINE_PER_CPU(struct cpu_trace, trace);
 
-static unsigned long notrace cycles_to_usecs(cycles_t delta)
+//static
+unsigned long notrace cycles_to_usecs(cycles_t delta)
 {
 #ifdef CONFIG_X86
 	do_div(delta, cpu_khz/1000+1);
diff -rwu linux.voluntary.virgin/lib/rwsem-generic.c linux.voluntary/lib/rwsem-generic.c
--- linux.voluntary.virgin/lib/rwsem-generic.c	2004-10-21 21:52:33.000000000 -0700
+++ linux.voluntary/lib/rwsem-generic.c	2004-10-21 22:37:27.000000000 -0700
@@ -179,7 +179,7 @@
 		 */
 		if (semblk == &kernel_sem.lock)
 			continue;
-		if (semblk && __rwsem_deadlock(semblk)) {
+		if (semblk && __rwsem_deadlock(semblk)) { /* recursive checking here */
 		  	rwsem_trace_on = 0;
 			printk("BUG: circular semaphore deadlock: %s/%d is "
 				"blocked on %p, deadlocking %s/%d\n",

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:17                                       ` Ingo Molnar
  2004-10-27 17:14                                         ` Lee Revell
@ 2004-10-27 20:09                                         ` Andrew Morton
  2004-10-27 21:43                                           ` K.R. Foley
  1 sibling, 1 reply; 76+ messages in thread
From: Andrew Morton @ 2004-10-27 20:09 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: rlrevell, kr, linux-kernel, rncbc, Mark_H_Johnson, bhuey, doogie,
	mista.tapas, tglx, xschmi00, nando

Ingo Molnar <mingo@elte.hu> wrote:
>
> > Here is a more up to date version of the rtc-debug patch:
>  > 
>  > http://lkml.org/lkml/2004/9/9/307
>  > 
>  > There is still a bit of 2.4 cruft in there but it works well.  Maybe
>  > this could be included in future patches.
> 
>  the most natural point of inclusion would be Andrew's -mm tree i think
>  :-)

It's 'orrid.  And iirc it breaks normal use of the RTC.

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:43                                               ` K.R. Foley
@ 2004-10-27 19:47                                                 ` Lee Revell
  2004-10-27 21:40                                                   ` K.R. Foley
  0 siblings, 1 reply; 76+ messages in thread
From: Lee Revell @ 2004-10-27 19:47 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

On Wed, 2004-10-27 at 12:43 -0500, K.R. Foley wrote:
> OH! And thanks. :)
> 

Well I tried it and it does not seem to work exactly right.  This might
be because I enabled the HPET so the RTC is not getting used.  When I
run amlat for a few minutes I get a histogram with only 38 samples.
Does this work for you?

Lee


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:40                                               ` K.R. Foley
@ 2004-10-27 17:44                                                 ` Lee Revell
  0 siblings, 0 replies; 76+ messages in thread
From: Lee Revell @ 2004-10-27 17:44 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

On Wed, 2004-10-27 at 12:40 -0500, K.R. Foley wrote:
> Lee Revell wrote:
> > On Wed, 2004-10-27 at 12:21 -0500, K.R. Foley wrote:
> > 
> >>>Anyway I am generating a cleaned up version of the patch agaqinst
> >>>2.6.9-mm1.
> >>>
> >>>Lee
> >>>
> >>
> >>Actually if you are cleaning it up anyway, could you fix it to work with 
> >>Ingo's changes to rtc.c? If not I will be glad to do it. Up until one of 
> >>the last couple of versions of RT PREEMPT it applied cleanly, but I just 
> >>tried it and it failed.
> > 
> > 
> > Yup, here it is against 2.6.9-mm1-V0.4.1.  Not yet tested (building now)
> > but should work.  I took out the show_trace_smp part because that never
> > worked, I always get "Stack pointer is garbage".  So now the patch is
> > smaller and only touches rtc.c.
> > 
> 
> You've also eliminated the stack trace altogether then, right? Not that 
> I really need it. :-)

Yes, it's commented out.  I figured that a better way would be to have
it trigger Ingo's latency tracer.

Lee


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:26                                             ` Lee Revell
  2004-10-27 17:40                                               ` K.R. Foley
@ 2004-10-27 17:43                                               ` K.R. Foley
  2004-10-27 19:47                                                 ` Lee Revell
  1 sibling, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 17:43 UTC (permalink / raw)
  To: Lee Revell
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Lee Revell wrote:
> On Wed, 2004-10-27 at 12:21 -0500, K.R. Foley wrote:
> 
>>>Anyway I am generating a cleaned up version of the patch agaqinst
>>>2.6.9-mm1.
>>>
>>>Lee
>>>
>>
>>Actually if you are cleaning it up anyway, could you fix it to work with 
>>Ingo's changes to rtc.c? If not I will be glad to do it. Up until one of 
>>the last couple of versions of RT PREEMPT it applied cleanly, but I just 
>>tried it and it failed.
> 
> 
> Yup, here it is against 2.6.9-mm1-V0.4.1.  Not yet tested (building now)
> but should work.  I took out the show_trace_smp part because that never
> worked, I always get "Stack pointer is garbage".  So now the patch is
> smaller and only touches rtc.c.
> 

OH! And thanks. :)

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:26                                             ` Lee Revell
@ 2004-10-27 17:40                                               ` K.R. Foley
  2004-10-27 17:44                                                 ` Lee Revell
  2004-10-27 17:43                                               ` K.R. Foley
  1 sibling, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 17:40 UTC (permalink / raw)
  To: Lee Revell
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Lee Revell wrote:
> On Wed, 2004-10-27 at 12:21 -0500, K.R. Foley wrote:
> 
>>>Anyway I am generating a cleaned up version of the patch agaqinst
>>>2.6.9-mm1.
>>>
>>>Lee
>>>
>>
>>Actually if you are cleaning it up anyway, could you fix it to work with 
>>Ingo's changes to rtc.c? If not I will be glad to do it. Up until one of 
>>the last couple of versions of RT PREEMPT it applied cleanly, but I just 
>>tried it and it failed.
> 
> 
> Yup, here it is against 2.6.9-mm1-V0.4.1.  Not yet tested (building now)
> but should work.  I took out the show_trace_smp part because that never
> worked, I always get "Stack pointer is garbage".  So now the patch is
> smaller and only touches rtc.c.
> 

You've also eliminated the stack trace altogether then, right? Not that 
I really need it. :-)

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:21                                           ` K.R. Foley
@ 2004-10-27 17:26                                             ` Lee Revell
  2004-10-27 17:40                                               ` K.R. Foley
  2004-10-27 17:43                                               ` K.R. Foley
  0 siblings, 2 replies; 76+ messages in thread
From: Lee Revell @ 2004-10-27 17:26 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

On Wed, 2004-10-27 at 12:21 -0500, K.R. Foley wrote:
> > 
> > Anyway I am generating a cleaned up version of the patch agaqinst
> > 2.6.9-mm1.
> > 
> > Lee
> > 
> 
> Actually if you are cleaning it up anyway, could you fix it to work with 
> Ingo's changes to rtc.c? If not I will be glad to do it. Up until one of 
> the last couple of versions of RT PREEMPT it applied cleanly, but I just 
> tried it and it failed.

Yup, here it is against 2.6.9-mm1-V0.4.1.  Not yet tested (building now)
but should work.  I took out the show_trace_smp part because that never
worked, I always get "Stack pointer is garbage".  So now the patch is
smaller and only touches rtc.c.

--- linux-2.6.9-mm1/drivers/char/rtc.c	2004-10-27 13:19:04.000000000 -0400
+++ linux-2.6.9-mm1-V0.4.1/drivers/char/rtc.c	2004-10-27 12:55:23.000000000 -0400
@@ -86,6 +86,18 @@
 #include <asm/hpet.h>
 #endif
 
+static unsigned long long last_interrupt_time;
+
+#include <asm/timex.h>
+
+
+#define CPU_MHZ	(cpu_khz / 1000)
+#define HISTSIZE	10000
+static int histogram[HISTSIZE];
+
+int rtc_debug;
+int rtc_running;
+
 #ifdef __sparc__
 #include <linux/pci.h>
 #include <asm/ebus.h>
@@ -191,6 +203,14 @@
 static const unsigned char days_in_mo[] = 
 {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
 
+static int rtc_state;
+
+enum rtc_states {
+	S_IDLE,			/* Waiting for an interrupt */
+	S_WAITING_FOR_READ,	/* Signal delivered. waiting for rtc_read() */
+	S_READ_MISSED,		/* Signal delivered, read() deadline missed */
+};
+
 /*
  * Returns true if a clock update is in progress
  */
@@ -259,7 +279,36 @@
 	spin_unlock_irqrestore(&rtc_task_lock, flags);
 	wake_up_interruptible(&rtc_wait);	
 
-	kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
+	if (!(rtc_status & RTC_IS_OPEN))
+		goto tata;
+
+	switch (rtc_state) {
+	case S_IDLE:			/* Waiting for an interrupt */
+		rdtscll(last_interrupt_time);
+		kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
+		rtc_state = S_WAITING_FOR_READ;
+		break;
+	case S_WAITING_FOR_READ:	/* Signal has been delivered. waiting for rtc_read() */
+		/*
+		 * Well foo.  The usermode application didn't schedule and read in time.
+		 */
+		rtc_state = S_READ_MISSED;
+		if (strcmp(current->comm, "amlat") != 0) {
+			printk("`%s'[%d] is being piggy.  "
+					"need_resched=%d, cpu=%d\n",
+				current->comm, current->pid,
+				need_resched(), smp_processor_id());
+			/* show_trace_smp(); */
+		}
+		break;
+	case S_READ_MISSED:		/* Signal has been delivered, read() deadline was missed */
+		/*
+		 * Not much we can do here.  We're waiting for the usermode
+		 * application to read the rtc
+		 */
+		break;
+	}
+tata:
 
 	return IRQ_HANDLED;
 }
@@ -319,8 +368,74 @@
  *	Now all the various file operations that we export.
  */
 
-static ssize_t rtc_read(struct file *file, char __user *buf,
-			size_t count, loff_t *ppos)
+static ssize_t ll_rtc_read(struct file *file, char *buf,
+				size_t count, loff_t *ppos)
+{
+	ssize_t retval;
+	unsigned long long now;
+
+	rdtscll(now);
+
+	switch (rtc_state) {
+	case S_IDLE:			/* Waiting for an interrupt */
+		/*
+		 * err...  This can't be happening
+		 */
+		printk("ll_rtc_read(): called in state S_IDLE!\n");
+		break;
+	case S_WAITING_FOR_READ:	/*
+					 * Signal has been delivered.
+					 * waiting for rtc_read()
+					 */
+		/*
+		 * Well done
+		 */
+	case S_READ_MISSED:		/*
+					 * Signal has been delivered, read()
+					 * deadline was missed
+					 */
+		/*
+		 * So, you finally got here.
+		 */
+		if (last_interrupt_time == 0)
+			printk("ll_rtc_read(): we screwed up.  "
+					"last_interrupt_time = 0\n");
+		rtc_state = S_IDLE;
+		{
+			unsigned long long latency = now - last_interrupt_time;
+			unsigned long delta;	/* Nocroseconds */
+
+			delta = latency;
+			delta /= CPU_MHZ;
+			if (delta > 1000 * 1000) {
+				printk("rtc: eek\n");
+			} else {
+				unsigned long slot = delta;
+				if (slot >= HISTSIZE)
+					slot = HISTSIZE - 1;
+				histogram[slot]++;
+				if (delta > 2000)
+					printk("wow!  That was a "
+							"%ld millisec bump\n",
+						delta / 1000);
+			}
+		}
+		rtc_state = S_IDLE;
+		break;
+	}
+
+	if (count < sizeof(last_interrupt_time))
+		return -EINVAL;
+
+	retval = -EIO;
+	if (copy_to_user(buf, &last_interrupt_time,
+				sizeof(last_interrupt_time)) == 0)
+		retval = sizeof(last_interrupt_time);
+	return retval;
+}
+
+static ssize_t orig_rtc_read(struct file *file, char *buf,
+  			size_t count, loff_t *ppos)
 {
 #ifndef RTC_IRQ
 	return -EIO;
@@ -375,6 +490,19 @@
 #endif
 }
 
+/*
+ * If anyone reads this, please send me an email describing
+ * the superlative elegance of this conception
+ */
+static ssize_t rtc_read(struct file *file, char *buf,
+			size_t count, loff_t *ppos)
+{
+	if (strcmp(current->comm, "amlat") == 0)
+		return ll_rtc_read(file, buf, count, ppos);
+	else
+		return orig_rtc_read(file, buf, count, ppos);
+}
+
 static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
 {
 	struct rtc_time wtime; 
@@ -692,6 +820,8 @@
  * needed here. Or anywhere else in this driver. */
 static int rtc_open(struct inode *inode, struct file *file)
 {
+	int i;
+
 	spin_lock_irq (&rtc_lock);
 
 	if(rtc_status & RTC_IS_OPEN)
@@ -699,7 +829,16 @@
 
 	rtc_status |= RTC_IS_OPEN;
 
-	rtc_irq_data = 0;
+	if (strcmp(current->comm, "amlat") == 0) {
+		last_interrupt_time = 0;
+		rtc_state = S_IDLE;
+		rtc_irq_data = 0;
+	}
+
+	rtc_running = 1;
+	for (i = 0; i < HISTSIZE; i++)
+		histogram[i] = 0;
+
 	spin_unlock_irq (&rtc_lock);
 	return 0;
 
@@ -753,6 +892,19 @@
 	rtc_irq_data = 0;
 	rtc_status &= ~RTC_IS_OPEN;
 	spin_unlock_irq (&rtc_lock);
+	{
+		int i = 0;
+		unsigned long total = 0;
+		printk("rtc histogram:\n");
+		for (i = 0; i < HISTSIZE; i++) {
+			if (histogram[i]) {
+				total += histogram[i];
+				printk("%d %d\n", i, histogram[i]);
+			}
+		}
+		printk("\nTotal samples: %lu\n", total);
+		rtc_running = 0;
+	}
 	return 0;
 }
 
@@ -1127,6 +1279,7 @@
 	wake_up_interruptible(&rtc_wait);
 
 	kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
+	return;
 }
 #endif
 





^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 17:14                                         ` Lee Revell
@ 2004-10-27 17:21                                           ` K.R. Foley
  2004-10-27 17:26                                             ` Lee Revell
  0 siblings, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 17:21 UTC (permalink / raw)
  To: Lee Revell
  Cc: Ingo Molnar, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Lee Revell wrote:
> On Wed, 2004-10-27 at 17:17 +0200, Ingo Molnar wrote:
> 
>>>Here is a more up to date version of the rtc-debug patch:
>>>
>>>http://lkml.org/lkml/2004/9/9/307
>>>
>>>There is still a bit of 2.4 cruft in there but it works well.  Maybe
>>>this could be included in future patches.
>>
>>the most natural point of inclusion would be Andrew's -mm tree i think
>>:-)
>>
> 
> 
> Well I suspect from looking at the comments :-) that he would not
> include it in its current form due to the way it just checks whether the
> process opening the RTC is called "amlat" and updates the RTC histogram
> if so.  I am not sure what a clean way to do this would be, maybe an
> ioctl()?
> 
> Anyway I am generating a cleaned up version of the patch agaqinst
> 2.6.9-mm1.
> 
> Lee
> 

Actually if you are cleaning it up anyway, could you fix it to work with 
Ingo's changes to rtc.c? If not I will be glad to do it. Up until one of 
the last couple of versions of RT PREEMPT it applied cleanly, but I just 
tried it and it failed.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:17                                       ` Ingo Molnar
@ 2004-10-27 17:14                                         ` Lee Revell
  2004-10-27 17:21                                           ` K.R. Foley
  2004-10-27 20:09                                         ` Andrew Morton
  1 sibling, 1 reply; 76+ messages in thread
From: Lee Revell @ 2004-10-27 17:14 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

On Wed, 2004-10-27 at 17:17 +0200, Ingo Molnar wrote:
> > Here is a more up to date version of the rtc-debug patch:
> > 
> > http://lkml.org/lkml/2004/9/9/307
> > 
> > There is still a bit of 2.4 cruft in there but it works well.  Maybe
> > this could be included in future patches.
> 
> the most natural point of inclusion would be Andrew's -mm tree i think
> :-)
> 

Well I suspect from looking at the comments :-) that he would not
include it in its current form due to the way it just checks whether the
process opening the RTC is called "amlat" and updates the RTC histogram
if so.  I am not sure what a clean way to do this would be, maybe an
ioctl()?

Anyway I am generating a cleaned up version of the patch agaqinst
2.6.9-mm1.

Lee




^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:13                                     ` Lee Revell
@ 2004-10-27 15:17                                       ` Ingo Molnar
  2004-10-27 17:14                                         ` Lee Revell
  2004-10-27 20:09                                         ` Andrew Morton
  0 siblings, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 15:17 UTC (permalink / raw)
  To: Lee Revell
  Cc: K.R. Foley, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton


* Lee Revell <rlrevell@joe-job.com> wrote:

> > ah, ok - nice. So rtc-debug+amlat is the only known-reliable way to
> > produce latency histograms?
> > 
> 
> Yes, I think it is the most reliable way because the measurement is
> done in the kernel.  At least, this is what AM's notes say.  There are
> any number of ways to generate these with userspace programs (jackd,
> realfeel, etc).
> 
> Here is a more up to date version of the rtc-debug patch:
> 
> http://lkml.org/lkml/2004/9/9/307
> 
> There is still a bit of 2.4 cruft in there but it works well.  Maybe
> this could be included in future patches.

the most natural point of inclusion would be Andrew's -mm tree i think
:-)

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:05                                   ` Ingo Molnar
  2004-10-27 15:13                                     ` Lee Revell
@ 2004-10-27 15:16                                     ` K.R. Foley
  2004-10-27 20:49                                     ` Bill Huey
  2 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 15:16 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>I use the rtc-debug and amlat to generate histograms of latencies
>>which is what I was trying to do when I found the rtc problem the
>>first time.  I believe that rtc-debug/amlat is much more accurate for
>>generating histograms of latencies than realfeel is because the
>>instrumentation is in the kernel rather than a userspace program.
> 
> 
> ah, ok - nice. So rtc-debug+amlat is the only known-reliable way to
> produce latency histograms?

Don't know that for sure, but it is the most reliable way that I am 
aware of.

> 
> Btw., rtc-debug's latency results could now be cross-validated with
> -V0.4's wakeup tracer (and vice versa), because the two are totally
> independent mechanisms.

Agreed. :)

> 
> 	Ingo
> 

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:05                                   ` Ingo Molnar
@ 2004-10-27 15:13                                     ` Lee Revell
  2004-10-27 15:17                                       ` Ingo Molnar
  2004-10-27 15:16                                     ` K.R. Foley
  2004-10-27 20:49                                     ` Bill Huey
  2 siblings, 1 reply; 76+ messages in thread
From: Lee Revell @ 2004-10-27 15:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

On Wed, 2004-10-27 at 17:05 +0200, Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> > I use the rtc-debug and amlat to generate histograms of latencies
> > which is what I was trying to do when I found the rtc problem the
> > first time.  I believe that rtc-debug/amlat is much more accurate for
> > generating histograms of latencies than realfeel is because the
> > instrumentation is in the kernel rather than a userspace program.
> 
> ah, ok - nice. So rtc-debug+amlat is the only known-reliable way to
> produce latency histograms?
> 

Yes, I think it is the most reliable way because the measurement is done
in the kernel.  At least, this is what AM's notes say.  There are any
number of ways to generate these with userspace programs (jackd,
realfeel, etc).

Here is a more up to date version of the rtc-debug patch:

http://lkml.org/lkml/2004/9/9/307

There is still a bit of 2.4 cruft in there but it works well.  Maybe
this could be included in future patches.

Lee


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 15:00                                 ` K.R. Foley
@ 2004-10-27 15:05                                   ` Ingo Molnar
  2004-10-27 15:13                                     ` Lee Revell
                                                       ` (2 more replies)
  0 siblings, 3 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 15:05 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton


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

> I use the rtc-debug and amlat to generate histograms of latencies
> which is what I was trying to do when I found the rtc problem the
> first time.  I believe that rtc-debug/amlat is much more accurate for
> generating histograms of latencies than realfeel is because the
> instrumentation is in the kernel rather than a userspace program.

ah, ok - nice. So rtc-debug+amlat is the only known-reliable way to
produce latency histograms?

Btw., rtc-debug's latency results could now be cross-validated with
-V0.4's wakeup tracer (and vice versa), because the two are totally
independent mechanisms.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 13:29                               ` Ingo Molnar
@ 2004-10-27 15:00                                 ` K.R. Foley
  2004-10-27 15:05                                   ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 15:00 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>Running amlat [...]
> 
> 
> btw., to get good 'realfeel' results i had to apply the attached patch. 
> Especially when running realfeel over the network it can easily happen
> that it's delayed for some time and gets out of sync with the RTC. So
> after a new maximum latency has triggered the code now waits 10 periods
> to wait for the timings to recover.
> 
> this does not hurt the latency measurements in any way - latencies that
> occur after these 10 ticks (~5 msecs) are over are still fully measured
> and reported.
> 
> amlat produces weird output for me, continuously increasing latency
> values:
> 
>  latency = 2967939 milliseconds
>  latency = 2967950 milliseconds
>  sigint
>  max jitter = 0 microseconds
> 
> maybe some /dev/rtc API detail changed? Or is this the normal output?
> 
> 	Ingo
> 
Well to produce useful results, amlat requires Andrew's rtc-debug patch 
that modifies the rtc driver as well as traps so that timings are kept 
when the isr gets run and when the rtc device is read to track 
scheduling latencies. Also if this patch was applied the value being 
read by amlat from the rtc device would be the last interrupt time 
instead of the interrupt info that rtc normally produces. So the latency 
values being spit out are bogus, but it's good enough to exercise the rtc.

I use the rtc-debug and amlat to generate histograms of latencies which 
is what I was trying to do when I found the rtc problem the first time. 
I believe that rtc-debug/amlat is much more accurate for generating 
histograms of latencies than realfeel is because the instrumentation is 
in the kernel rather than a userspace program.

kr


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  3:32                             ` K.R. Foley
  2004-10-27  8:28                               ` Ingo Molnar
  2004-10-27  9:24                               ` Ingo Molnar
@ 2004-10-27 13:29                               ` Ingo Molnar
  2004-10-27 15:00                                 ` K.R. Foley
  2 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 13:29 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Andrew Morton

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


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

> Running amlat [...]

btw., to get good 'realfeel' results i had to apply the attached patch. 
Especially when running realfeel over the network it can easily happen
that it's delayed for some time and gets out of sync with the RTC. So
after a new maximum latency has triggered the code now waits 10 periods
to wait for the timings to recover.

this does not hurt the latency measurements in any way - latencies that
occur after these 10 ticks (~5 msecs) are over are still fully measured
and reported.

amlat produces weird output for me, continuously increasing latency
values:

 latency = 2967939 milliseconds
 latency = 2967950 milliseconds
 sigint
 max jitter = 0 microseconds

maybe some /dev/rtc API detail changed? Or is this the normal output?

	Ingo

[-- Attachment #2: realfeel.diff --]
[-- Type: text/plain, Size: 1010 bytes --]

--- realfeel.c.orig	2004-10-27 15:04:46.237707040 +0200
+++ realfeel.c	2004-10-27 15:04:50.204104056 +0200
@@ -91,7 +91,7 @@ int set_realtime_priority(void)
 	 * set the process to realtime privs
 	 */
 	memset(&schp, 0, sizeof(schp));
-	schp.sched_priority = sched_get_priority_max(SCHED_FIFO);
+	schp.sched_priority = sched_get_priority_max(SCHED_FIFO) - 1;
 	
 	if (sched_setscheduler(0, SCHED_FIFO, &schp) != 0) {
 		perror("sched_setscheduler");
@@ -191,8 +191,19 @@ int main(int argc, char *argv[])
 		now = rdtsc();
 		delay = secondsPerTick * (now - last);
 		if (delay > max_delay) {
+			int i;
+
 			max_delay = delay;
 			printf("%.3f msec\n", 1e3 * (ideal - delay));
+			/*
+			 * To make sure that the delay due to the printf
+			 * is not counted we skip the next period:
+			 */
+			for (i = 0; i < 10; i++)
+				if (read(fd, &data, sizeof(data)) == -1)
+					fatal("blocking read failed");
+			last = rdtsc();
+			continue;
 		}
 		ms = (-(ideal - delay) + 1.0/20000.0) * 10000;
 		if (ms < 0)

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  9:32                                 ` Ingo Molnar
@ 2004-10-27 12:19                                   ` K.R. Foley
  0 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27 12:19 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> 
>>>Still problems with interactive behavior. Running KDE, with top
>>>running in xterm, scrolling through the menus I get some pauses. When
>>>the pauses occur I see kdeinit hit the top of the list and sometimes
>>>consuming 90% or more of a CPU and idle usage drops to 30-40%. I do
>>>see some latency traces (not really high ones) in the log that were
>>>generated by kdeinit but I think they were generated prior to when
>>>these pauses occurred, most likely when logging in.
>>
>>is this 90% or more CPU time system (kernel) overhead or userspace
>>overhead?
> 

It appears that most of the time is being consumed in system (~50% vs. 
~6%).
> 
> another thing to watch for is the context-switch rate in vmstat. -V0.3
> patches include a hack that include involuntary context-switches (mutex
> context switches) in the context-switch stat as well. (previously those
> were reported in a separate field which vmstat didnt pick up.)
> 
> So if the context-switch rate shots up to above say 100K/sec that is a
> sure sign of some mutex badness. The livelock scenarios i solved in
> -V0.3 occasionally generated a more than 500K/sec context-switch rate on
> a 2GHz box. Having just a couple of thousand per sec isnt by itself a
> sign of anything unusual.

As for the context-switch, I do see this jump up to ~10-11K/sec from 
~4-5K/sec and I see this only when I trigger the pauses.

> 
> 	Ingo
> 

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 10:45                                         ` Florian Schmidt
@ 2004-10-27 11:09                                           ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 11:09 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Florian Schmidt <mista.tapas@gmx.net> wrote:

> ah, and btw: what does the /proc/sys/kernel/kernel_preemption tunable
> do with PREEMPT_REALTIME enabled?

it's pretty pointless to offer this tunable, agreed. In theory one could
try to turn off involuntary preemption but what's the point?

> mango:~# cat /proc/sys/kernel/kernel_preemption 
> 1
> 
> [all the other VP tunables are not available anymore]
> 
> mango:~# cat /proc/sys/kernel/voluntary_preemption
> cat: /proc/sys/kernel/voluntary_preemption: No such file or directory
> mango:~# cat /proc/sys/kernel/hardirq_preemption
> cat: /proc/sys/kernel/hardirq_preemption: No such file or directory
> mango:~# cat /proc/sys/kernel/softirq_preemption
> cat: /proc/sys/kernel/softirq_preemption: No such file or directory

right - the PREEMPT_REALTIME kernel is only correct if all asynchronous
processing is done in a process context, so i removed those tunables.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 10:29                                         ` Ingo Molnar
@ 2004-10-27 10:58                                           ` Florian Schmidt
  0 siblings, 0 replies; 76+ messages in thread
From: Florian Schmidt @ 2004-10-27 10:58 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Wed, 27 Oct 2004 12:29:21 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> > pid 1286's current scheduling policy: SCHED_OTHER
> > pid 1286's current scheduling priority: 0
> > ~$ chrt -p 1287
> > pid 1287's current scheduling policy: SCHED_OTHER
> > pid 1287's current scheduling priority: 0
> 
> just curious, are these two important to the latency path of jackd, or
> are they lowprio things and are thus at SCHED_OTHER intentionally?

the latter. jackd has one RT thread for doing the grunt work and one which
acts as a watchdog. The other two are SCHED_OTHER by design.

> > Anyways i get xruns like crazy under load (like 200 in 10 minutes). It
> > seems the scheduling class and high priority don't matter really as
> > wiggling windows around on the screen or doing a "find /" can easily
> > provoke xruns.
> 
> yeah, i'm hunting a quite similar bug: i can see 'realfeel' latencies
> generated by simple window scrolling. It is most likely a logic bug
> somewhere - a missing reschedule check, irqs left disabled accidentally,
> or something like that. Since some other workloads dont trigger it i
> dont think i broke RT scheduling by itself - it is most likely some
> non-core code somewhere missing a resched. Which doesnt make it less of
> a problem, but it makes it harder to find :-|

Hmm, you're right. It seems that diskload alone doesn't trigger the problem.
it rather looks like graphics output/activity is the problem.

Anyways i'm back in U3 w/o PREEMPT_REALTIME as V0.3.2 just hardlocked on me
when i pressed ctrl-d in a root shell (in an xterm) to exit. Nothing has
made it to the log. I haven't found out yet whether it's possible to use my
old zx81 as serial console, so i can't help with OOPS/BUG output.

flo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 10:33                                       ` Florian Schmidt
  2004-10-27 10:29                                         ` Ingo Molnar
@ 2004-10-27 10:45                                         ` Florian Schmidt
  2004-10-27 11:09                                           ` Ingo Molnar
  1 sibling, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-27 10:45 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: Ingo Molnar, K.R. Foley, linux-kernel, Lee Revell,
	Rui Nuno Capela, Mark_H_Johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Wed, 27 Oct 2004 12:33:29 +0200
Florian Schmidt <mista.tapas@gmx.net> wrote:

> V0.3.2 builds and boots fine here. It seems to run ok, too. Uptime 25
> minutes and no BUG's [yay! 25 minutes already! ;)]. Well anyways,
> preempt_max_thresh is at 38us after running several concurrent find's plus
> jackd.
> 
> There's a problem though with jackd performance. Read on below if it is of
> any interest at this point. 
[snip]

anyways, i still see the mysterious pauses which do not show up in the
preempt_max_thresh.

ah, and btw: what does the /proc/sys/kernel/kernel_preemption tunable do
with PREEMPT_REALTIME enabled?

mango:~# cat /proc/sys/kernel/kernel_preemption 
1

[all the other VP tunables are not available anymore]

mango:~# cat /proc/sys/kernel/voluntary_preemption
cat: /proc/sys/kernel/voluntary_preemption: No such file or directory
mango:~# cat /proc/sys/kernel/hardirq_preemption
cat: /proc/sys/kernel/hardirq_preemption: No such file or directory
mango:~# cat /proc/sys/kernel/softirq_preemption
cat: /proc/sys/kernel/softirq_preemption: No such file or directory

flo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  9:06                                     ` Ingo Molnar
  2004-10-27 10:03                                       ` Ingo Molnar
@ 2004-10-27 10:33                                       ` Florian Schmidt
  2004-10-27 10:29                                         ` Ingo Molnar
  2004-10-27 10:45                                         ` Florian Schmidt
  1 sibling, 2 replies; 76+ messages in thread
From: Florian Schmidt @ 2004-10-27 10:33 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

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

On Wed, 27 Oct 2004 11:06:20 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > third time lucky?
> 
> there was one more piece missing...
> 
> i've also uploaded -RT-V0.3.2 with this fix included.

Hi,

V0.3.2 builds and boots fine here. It seems to run ok, too. Uptime 25
minutes and no BUG's [yay! 25 minutes already! ;)]. Well anyways,
preempt_max_thresh is at 38us after running several concurrent find's plus
jackd.

There's a problem though with jackd performance. Read on below if it is of
any interest at this point. 

Soundcard IRQ is 3:

mango:~# cat /proc/interrupts 
           CPU0       
  0:    1331024          XT-PIC  timer  0/31024
  1:       3494          XT-PIC  i8042  0/3494
  2:          0          XT-PIC  cascade  0/0
  3:     781428          XT-PIC  CS46XX  0/81428
  5:       1811          XT-PIC  eth0  0/1811
  8:          4          XT-PIC  rtc  0/4
 12:      71236          XT-PIC  i8042  1/71236
 14:       5163          XT-PIC  ide0  0/5163
 15:      50392          XT-PIC  ide1  0/50392
NMI:          0 
ERR:          0

I set the irq handler thread to prio 99:

mango:~# chrt -p `pidof "IRQ 3"`
pid 118's current scheduling policy: SCHED_FIFO
pid 118's current scheduling priority: 99

jackd runs with a period size of 128 frames (48000hz samplerate) and with
SCHED_FIFO with prios from 60 to 70 (ps output is somewhat broken):

mango:~# ps -cmL `pidof jackd`
  PID   LWP CLS PRI TTY      STAT   TIME COMMAND
 1286     - -     - ?        -      0:28 /usr/bin/jackd -R -P60 -t20000 -dalsa -
    -  1286 TS   20 -        SLsl   0:00 -
    -  1287 TS   23 -        SLsl   0:00 -
    -  1288 FF  110 -        SLsl   0:00 -
    -  1289 FF  100 -        SLsl   0:27 -

~$ chrt -p 1286
pid 1286's current scheduling policy: SCHED_OTHER
pid 1286's current scheduling priority: 0
~$ chrt -p 1287
pid 1287's current scheduling policy: SCHED_OTHER
pid 1287's current scheduling priority: 0
~$ chrt -p 1288
pid 1288's current scheduling policy: SCHED_FIFO
pid 1288's current scheduling priority: 70
~$ chrt -p 1289
pid 1289's current scheduling policy: SCHED_FIFO
pid 1289's current scheduling priority: 60

Anyways i get xruns like crazy under load (like 200 in 10 minutes). It seems
the scheduling class and high priority don't matter really as wiggling
windows around on the screen or doing a "find /" can easily provoke xruns.

flo

[-- Attachment #2: .config --]
[-- Type: application/octet-stream, Size: 26196 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-mm1-RT-V0.3.2
# Wed Oct 27 11:36:41 2004
#
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
CONFIG_LOCALVERSION="-rt"
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
CONFIG_MK7=y
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_RWSEM_GENERIC=y
CONFIG_GENERIC_SEMAPHORES=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_USE_3DNOW=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_SMP is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_SOFTIRQS=y
CONFIG_PREEMPT_HARDIRQS=y
CONFIG_PREEMPT_REALTIME=y
CONFIG_PREEMPT_BKL=y
# CONFIG_X86_UP_APIC is not set
CONFIG_X86_TSC=y
# CONFIG_X86_MCE is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_HAVE_DEC_LOCK=y

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set
CONFIG_KERN_PHYS_OFFSET=1
# CONFIG_KEXEC is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
# CONFIG_ACPI is not set
CONFIG_ACPI_BLACKLIST_YEAR=0

#
# APM (Advanced Power Management) BIOS Support
#
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
CONFIG_APM_REAL_MODE_POWER_OFF=y

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_LEGACY_PROC is not set
CONFIG_PCI_NAMES=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_DEBUG_DRIVER is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#

#
# Block devices
#
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set
# CONFIG_CDROM_PKTCDVD is not set

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_IDE_TASKFILE_IO is not set

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
CONFIG_BLK_DEV_SIS5513=y
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
CONFIG_SCSI=m
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_CHR_DEV_SG=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set

#
# SCSI Transport Attributes
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set

#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
CONFIG_SCSI_AIC7XXX=m
CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
CONFIG_AIC7XXX_DEBUG_MASK=0
# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
CONFIG_SCSI_QLA2XXX=m
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA6322 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Networking support
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK_DEV=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set

#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
# CONFIG_IP_NF_CT_ACCT is not set
# CONFIG_IP_NF_CT_PROTO_SCTP is not set
# CONFIG_IP_NF_FTP is not set
# CONFIG_IP_NF_IRC is not set
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_IPRANGE=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_PKTTYPE=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_DSCP=m
CONFIG_IP_NF_MATCH_AH_ESP=m
CONFIG_IP_NF_MATCH_LENGTH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_TCPMSS=m
CONFIG_IP_NF_MATCH_HELPER=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_CONNTRACK=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_MATCH_REALM=m
# CONFIG_IP_NF_MATCH_SCTP is not set
# CONFIG_IP_NF_MATCH_COMMENT is not set
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_SAME=m
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_DSCP=m
CONFIG_IP_NF_TARGET_MARK=m
CONFIG_IP_NF_TARGET_CLASSIFY=m
# CONFIG_IP_NF_RAW is not set
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CLK_JIFFIES=y
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_CLS_U32_PERF is not set
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_KGDBOE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set

#
# ARCnet devices
#
# CONFIG_ARCNET is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=m
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
CONFIG_SIS900=m
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPPOE=m
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
CONFIG_GAMEPORT=m
CONFIG_SOUND_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
CONFIG_SERIO_PCIPS2=m
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=y
# CONFIG_INPUT_UINPUT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
CONFIG_NVRAM=y
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_INTEL_MCH is not set
# CONFIG_AGP_NVIDIA is not set
CONFIG_AGP_SIS=m
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HANGCHECK_TIMER=m

#
# I2C support
#
CONFIG_I2C=m
CONFIG_I2C_CHARDEV=m

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
# CONFIG_I2C_ALGOPCA is not set

#
# I2C Hardware Bus support
#
CONFIG_I2C_ALI1535=m
CONFIG_I2C_ALI1563=m
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_I801=m
CONFIG_I2C_I810=m
CONFIG_I2C_ISA=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_I2C_PIIX4=m
CONFIG_I2C_PROSAVAGE=m
CONFIG_I2C_SAVAGE4=m
CONFIG_SCx200_ACB=m
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
# CONFIG_I2C_STUB is not set
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m
# CONFIG_I2C_PCA_ISA is not set

#
# Hardware Sensors Chip support
#
CONFIG_I2C_SENSOR=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM1025=m
CONFIG_SENSORS_ADM1031=m
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM77=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_LM83=m
CONFIG_SENSORS_LM85=m
# CONFIG_SENSORS_LM87 is not set
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_MAX1619=m
# CONFIG_SENSORS_SMSC47M1 is not set
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_W83L785TS=m
CONFIG_SENSORS_W83627HF=m

#
# Other I2C Chip support
#
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_PCF8574=m
CONFIG_SENSORS_PCF8591=m
CONFIG_SENSORS_RTC8564=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set

#
# Misc devices
#
# CONFIG_IBM_ASM is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set
CONFIG_VIDEO_SELECT=y

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
CONFIG_SOUND=m

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
CONFIG_SND_CS46XX=m
CONFIG_SND_CS46XX_NEW_DSP=y
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=m
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VX222 is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set

#
# USB support
#
# CONFIG_USB is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISER4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_ZISOFS_FS=y
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set
CONFIG_TMPFS=y
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_CRAMFS=m
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_EXPORTFS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
CONFIG_AFS_FS=m
CONFIG_RXRPC=m

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_CODEPAGE_1250=y
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Profiling support
#
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_PREEMPT=y
CONFIG_PREEMPT_TIMING=y
CONFIG_PREEMPT_TRACE=y
CONFIG_LATENCY_TRACE=y
CONFIG_MCOUNT=y
CONFIG_RWSEM_DEADLOCK_DETECT=y
CONFIG_RWSEM_MAX_OWNERS=32
# CONFIG_DEBUG_INFO is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_KGDB is not set

#
# Security options
#
# CONFIG_KEYS is not set
CONFIG_SECURITY=y
# CONFIG_SECURITY_NETWORK is not set
CONFIG_SECURITY_CAPABILITIES=m
# CONFIG_SECURITY_SECLVL is not set
# CONFIG_SECURITY_SELINUX is not set

#
# Cryptographic options
#
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_TEST is not set

#
# Library routines
#
CONFIG_CRC_CCITT=m
CONFIG_CRC32=m
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_PC=y

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27 10:33                                       ` Florian Schmidt
@ 2004-10-27 10:29                                         ` Ingo Molnar
  2004-10-27 10:58                                           ` Florian Schmidt
  2004-10-27 10:45                                         ` Florian Schmidt
  1 sibling, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 10:29 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Florian Schmidt <mista.tapas@gmx.net> wrote:

> jackd runs with a period size of 128 frames (48000hz samplerate) and with
> SCHED_FIFO with prios from 60 to 70 (ps output is somewhat broken):
> 
> mango:~# ps -cmL `pidof jackd`
>   PID   LWP CLS PRI TTY      STAT   TIME COMMAND
>  1286     - -     - ?        -      0:28 /usr/bin/jackd -R -P60 -t20000 -dalsa -
>     -  1286 TS   20 -        SLsl   0:00 -
>     -  1287 TS   23 -        SLsl   0:00 -
>     -  1288 FF  110 -        SLsl   0:00 -
>     -  1289 FF  100 -        SLsl   0:27 -
> 
> ~$ chrt -p 1286
> pid 1286's current scheduling policy: SCHED_OTHER
> pid 1286's current scheduling priority: 0
> ~$ chrt -p 1287
> pid 1287's current scheduling policy: SCHED_OTHER
> pid 1287's current scheduling priority: 0

just curious, are these two important to the latency path of jackd, or
are they lowprio things and are thus at SCHED_OTHER intentionally?

> ~$ chrt -p 1288
> pid 1288's current scheduling policy: SCHED_FIFO
> pid 1288's current scheduling priority: 70
> ~$ chrt -p 1289
> pid 1289's current scheduling policy: SCHED_FIFO
> pid 1289's current scheduling priority: 60
> 
> Anyways i get xruns like crazy under load (like 200 in 10 minutes). It
> seems the scheduling class and high priority don't matter really as
> wiggling windows around on the screen or doing a "find /" can easily
> provoke xruns.

yeah, i'm hunting a quite similar bug: i can see 'realfeel' latencies
generated by simple window scrolling. It is most likely a logic bug
somewhere - a missing reschedule check, irqs left disabled accidentally,
or something like that. Since some other workloads dont trigger it i
dont think i broke RT scheduling by itself - it is most likely some
non-core code somewhere missing a resched. Which doesnt make it less of
a problem, but it makes it harder to find :-|

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  9:06                                     ` Ingo Molnar
@ 2004-10-27 10:03                                       ` Ingo Molnar
  2004-10-27 10:33                                       ` Florian Schmidt
  1 sibling, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27 10:03 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


> i've also uploaded -RT-V0.3.2 with this fix included.

note that if you are running amlat/realfeel then you should do something
like this after starting realfeel:

  chrt -f 99 -p `pidof 'IRQ 8'`
  chrt -f 98 -p `pidof realfeel`

because by default IRQ 8 has a lower RT priority than realfeel.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  9:24                               ` Ingo Molnar
@ 2004-10-27  9:32                                 ` Ingo Molnar
  2004-10-27 12:19                                   ` K.R. Foley
  0 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  9:32 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> > Still problems with interactive behavior. Running KDE, with top
> > running in xterm, scrolling through the menus I get some pauses. When
> > the pauses occur I see kdeinit hit the top of the list and sometimes
> > consuming 90% or more of a CPU and idle usage drops to 30-40%. I do
> > see some latency traces (not really high ones) in the log that were
> > generated by kdeinit but I think they were generated prior to when
> > these pauses occurred, most likely when logging in.
> 
> is this 90% or more CPU time system (kernel) overhead or userspace
> overhead?

another thing to watch for is the context-switch rate in vmstat. -V0.3
patches include a hack that include involuntary context-switches (mutex
context switches) in the context-switch stat as well. (previously those
were reported in a separate field which vmstat didnt pick up.)

So if the context-switch rate shots up to above say 100K/sec that is a
sure sign of some mutex badness. The livelock scenarios i solved in
-V0.3 occasionally generated a more than 500K/sec context-switch rate on
a 2GHz box. Having just a couple of thousand per sec isnt by itself a
sign of anything unusual.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  3:32                             ` K.R. Foley
  2004-10-27  8:28                               ` Ingo Molnar
@ 2004-10-27  9:24                               ` Ingo Molnar
  2004-10-27  9:32                                 ` Ingo Molnar
  2004-10-27 13:29                               ` Ingo Molnar
  2 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  9:24 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> I've repeated the above on the dual 933 Xeon:
> 
> Still problems with interactive behavior. Running KDE, with top
> running in xterm, scrolling through the menus I get some pauses. When
> the pauses occur I see kdeinit hit the top of the list and sometimes
> consuming 90% or more of a CPU and idle usage drops to 30-40%. I do
> see some latency traces (not really high ones) in the log that were
> generated by kdeinit but I think they were generated prior to when
> these pauses occurred, most likely when logging in.

is this 90% or more CPU time system (kernel) overhead or userspace
overhead?

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  8:52                                   ` Ingo Molnar
@ 2004-10-27  9:06                                     ` Ingo Molnar
  2004-10-27 10:03                                       ` Ingo Molnar
  2004-10-27 10:33                                       ` Florian Schmidt
  0 siblings, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  9:06 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> third time lucky?

there was one more piece missing...

i've also uploaded -RT-V0.3.2 with this fix included.

	Ingo

--- linux/drivers/char/rtc.c.orig
+++ linux/drivers/char/rtc.c
@@ -177,7 +177,7 @@ static unsigned long rtc_max_user_freq =
 /*
  * rtc_task_lock nests inside rtc_lock.
  */
-static DECLARE_SPINLOCK(rtc_task_lock);
+static DECLARE_RAW_SPINLOCK(rtc_task_lock);
 static rtc_task_t *rtc_callback = NULL;
 #endif
 
@@ -217,6 +217,8 @@ static inline unsigned char rtc_is_updat
 
 irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
+	unsigned long flags;
+
 	/*
 	 *	Can be an alarm interrupt, update complete interrupt,
 	 *	or a periodic interrupt. We store the status in the
@@ -224,7 +226,7 @@ irqreturn_t rtc_interrupt(int irq, void 
 	 *	the last read in the remainder of rtc_irq_data.
 	 */
 
-	spin_lock (&rtc_lock);
+	spin_lock_irqsave(&rtc_lock, flags);
 	rtc_irq_data += 0x100;
 	rtc_irq_data &= ~0xff;
 	if (is_hpet_enabled()) {
@@ -238,16 +240,23 @@ irqreturn_t rtc_interrupt(int irq, void 
 		rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);
 	}
 
-	if (rtc_status & RTC_TIMER_ON)
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock_irqrestore(&rtc_lock, flags);
+		/*
+		 * We do the mod_timer outside of the lock because
+		 * it may reschedule under PREEMPT_REALTIME. As long
+		 * as we read the flag race-free it is not a problem
+		 * if two mod_timer()s race:
+		 */
 		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
-	spin_unlock (&rtc_lock);
+	} else
+		spin_unlock_irqrestore(&rtc_lock, flags);
 
 	/* Now do the rest of the actions */
-	spin_lock(&rtc_task_lock);
+	spin_lock_irqsave(&rtc_task_lock, flags);
 	if (rtc_callback)
 		rtc_callback->func(rtc_callback->private_data);
-	spin_unlock(&rtc_task_lock);
+	spin_unlock_irqrestore(&rtc_task_lock, flags);
 	wake_up_interruptible(&rtc_wait);	
 
 	kill_fasync (&rtc_async_queue, SIGIO, POLL_IN);
@@ -404,8 +413,8 @@ static int rtc_do_ioctl(unsigned int cmd
 		if (rtc_status & RTC_TIMER_ON) {
 			spin_lock_irq (&rtc_lock);
 			rtc_status &= ~RTC_TIMER_ON;
-			del_timer(&rtc_irq_timer);
 			spin_unlock_irq (&rtc_lock);
+			del_timer(&rtc_irq_timer); // FIXME
 		}
 		return 0;
 	}
@@ -422,10 +431,9 @@ static int rtc_do_ioctl(unsigned int cmd
 
 		if (!(rtc_status & RTC_TIMER_ON)) {
 			spin_lock_irq (&rtc_lock);
-			rtc_irq_timer.expires = jiffies + HZ/rtc_freq + 2*HZ/100;
-			add_timer(&rtc_irq_timer);
 			rtc_status |= RTC_TIMER_ON;
 			spin_unlock_irq (&rtc_lock);
+			mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
 		}
 		set_rtc_irq_bit(RTC_PIE);
 		return 0;
@@ -730,9 +738,10 @@ static int rtc_release(struct inode *ino
 	}
 	if (rtc_status & RTC_TIMER_ON) {
 		rtc_status &= ~RTC_TIMER_ON;
-		del_timer(&rtc_irq_timer);
-	}
-	spin_unlock_irq(&rtc_lock);
+		spin_unlock_irq(&rtc_lock);
+		del_timer(&rtc_irq_timer); // FIXME
+	} else
+		spin_unlock_irq(&rtc_lock);
 
 	if (file->f_flags & FASYNC) {
 		rtc_fasync (-1, file, 0);
@@ -808,6 +817,7 @@ int rtc_unregister(rtc_task_t *task)
 	return -EIO;
 #else
 	unsigned char tmp;
+	int rm_timer;
 
 	spin_lock_irq(&rtc_lock);
 	spin_lock(&rtc_task_lock);
@@ -827,13 +837,16 @@ int rtc_unregister(rtc_task_t *task)
 		CMOS_WRITE(tmp, RTC_CONTROL);
 		CMOS_READ(RTC_INTR_FLAGS);
 	}
+	rm_timer = 0;
 	if (rtc_status & RTC_TIMER_ON) {
 		rtc_status &= ~RTC_TIMER_ON;
-		del_timer(&rtc_irq_timer);
+		rm_timer = 1;
 	}
 	rtc_status &= ~RTC_IS_OPEN;
 	spin_unlock(&rtc_task_lock);
 	spin_unlock_irq(&rtc_lock);
+	if (rm_timer)
+		del_timer(&rtc_irq_timer);
 	return 0;
 #endif
 }
@@ -1094,17 +1107,19 @@ static void rtc_dropped_irq(unsigned lon
 		return;
 	}
 
-	/* Just in case someone disabled the timer from behind our back... */
-	if (rtc_status & RTC_TIMER_ON)
-		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
 	rtc_irq_data += ((rtc_freq/HZ)<<8);
 	rtc_irq_data &= ~0xff;
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);	/* restart */
 
 	freq = rtc_freq;
 
-	spin_unlock_irq(&rtc_lock);
+	/* Just in case someone disabled the timer from behind our back... */
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock_irq(&rtc_lock);
+		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
+	} else
+		spin_unlock_irq(&rtc_lock);
+
 
 	printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  8:44                                 ` Ingo Molnar
@ 2004-10-27  8:52                                   ` Ingo Molnar
  2004-10-27  9:06                                     ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  8:52 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> > does the quick hack below help?
> 
> here's a more complete fix.

third time lucky?

	Ingo

--- linux/drivers/char/rtc.c.orig
+++ linux/drivers/char/rtc.c
@@ -177,7 +177,7 @@ static unsigned long rtc_max_user_freq =
 /*
  * rtc_task_lock nests inside rtc_lock.
  */
-static DECLARE_SPINLOCK(rtc_task_lock);
+static DECLARE_RAW_SPINLOCK(rtc_task_lock);
 static rtc_task_t *rtc_callback = NULL;
 #endif
 
@@ -238,10 +238,17 @@ irqreturn_t rtc_interrupt(int irq, void 
 		rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);
 	}
 
-	if (rtc_status & RTC_TIMER_ON)
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock (&rtc_lock);
+		/*
+		 * We do the mod_timer outside of the lock because
+		 * it may reschedule under PREEMPT_REALTIME. As long
+		 * as we read the flag race-free it is not a problem
+		 * if two mod_timer()s race:
+		 */
 		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
-	spin_unlock (&rtc_lock);
+	} else
+		spin_unlock (&rtc_lock);
 
 	/* Now do the rest of the actions */
 	spin_lock(&rtc_task_lock);
@@ -404,8 +411,8 @@ static int rtc_do_ioctl(unsigned int cmd
 		if (rtc_status & RTC_TIMER_ON) {
 			spin_lock_irq (&rtc_lock);
 			rtc_status &= ~RTC_TIMER_ON;
-			del_timer(&rtc_irq_timer);
 			spin_unlock_irq (&rtc_lock);
+			del_timer(&rtc_irq_timer); // FIXME
 		}
 		return 0;
 	}
@@ -730,9 +737,10 @@ static int rtc_release(struct inode *ino
 	}
 	if (rtc_status & RTC_TIMER_ON) {
 		rtc_status &= ~RTC_TIMER_ON;
-		del_timer(&rtc_irq_timer);
-	}
-	spin_unlock_irq(&rtc_lock);
+		spin_unlock_irq(&rtc_lock);
+		del_timer(&rtc_irq_timer); // FIXME
+	} else
+		spin_unlock_irq(&rtc_lock);
 
 	if (file->f_flags & FASYNC) {
 		rtc_fasync (-1, file, 0);
@@ -808,6 +816,7 @@ int rtc_unregister(rtc_task_t *task)
 	return -EIO;
 #else
 	unsigned char tmp;
+	int rm_timer;
 
 	spin_lock_irq(&rtc_lock);
 	spin_lock(&rtc_task_lock);
@@ -827,13 +836,16 @@ int rtc_unregister(rtc_task_t *task)
 		CMOS_WRITE(tmp, RTC_CONTROL);
 		CMOS_READ(RTC_INTR_FLAGS);
 	}
+	rm_timer = 0;
 	if (rtc_status & RTC_TIMER_ON) {
 		rtc_status &= ~RTC_TIMER_ON;
-		del_timer(&rtc_irq_timer);
+		rm_timer = 1;
 	}
 	rtc_status &= ~RTC_IS_OPEN;
 	spin_unlock(&rtc_task_lock);
 	spin_unlock_irq(&rtc_lock);
+	if (rm_timer)
+		del_timer(&rtc_irq_timer);
 	return 0;
 #endif
 }
@@ -1094,17 +1106,19 @@ static void rtc_dropped_irq(unsigned lon
 		return;
 	}
 
-	/* Just in case someone disabled the timer from behind our back... */
-	if (rtc_status & RTC_TIMER_ON)
-		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
 	rtc_irq_data += ((rtc_freq/HZ)<<8);
 	rtc_irq_data &= ~0xff;
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);	/* restart */
 
 	freq = rtc_freq;
 
-	spin_unlock_irq(&rtc_lock);
+	/* Just in case someone disabled the timer from behind our back... */
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock_irq(&rtc_lock);
+		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
+	} else
+		spin_unlock_irq(&rtc_lock);
+
 
 	printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  8:28                               ` Ingo Molnar
@ 2004-10-27  8:44                                 ` Ingo Molnar
  2004-10-27  8:52                                   ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  8:44 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> >  Oct 26 21:43:56 porky kernel: BUG: sleeping function called from 
> > invalid context amlat(3963) at kernel/mutex.c:28
> > Oct 26 21:43:56 porky kernel: in_atomic():1 [00000001], irqs_disabled():1
> > Oct 26 21:43:56 porky kernel:  [<c011c7da>] __might_sleep+0xca/0xe0 (12)
> > Oct 26 21:43:56 porky kernel:  [<c0137d89>] _mutex_lock+0x39/0x50 (36)
> > Oct 26 21:43:56 porky kernel:  [<c0137df6>]  _mutex_lock_irqsave+0x16/0x20 (24)
> > Oct 26 21:43:56 porky kernel:  [<c012977d>] __mod_timer+0x4d/0x1f0 (12)
> > Oct 26 21:43:56 porky kernel:  [<c01f6535>] rtc_do_ioctl+0x185/0x970 (44)
> 
> does the quick hack below help?

here's a more complete fix.

	Ingo

--- linux/drivers/char/rtc.c.orig
+++ linux/drivers/char/rtc.c
@@ -177,7 +177,7 @@ static unsigned long rtc_max_user_freq =
 /*
  * rtc_task_lock nests inside rtc_lock.
  */
-static DECLARE_SPINLOCK(rtc_task_lock);
+static DECLARE_RAW_SPINLOCK(rtc_task_lock);
 static rtc_task_t *rtc_callback = NULL;
 #endif
 
@@ -238,10 +238,17 @@ irqreturn_t rtc_interrupt(int irq, void 
 		rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);
 	}
 
-	if (rtc_status & RTC_TIMER_ON)
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock (&rtc_lock);
+		/*
+		 * We do the mod_timer outside of the lock because
+		 * it may reschedule under PREEMPT_REALTIME. As long
+		 * as we read the flag race-free it is not a problem
+		 * if two mod_timer()s race:
+		 */
 		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
-	spin_unlock (&rtc_lock);
+	} else
+		spin_unlock (&rtc_lock);
 
 	/* Now do the rest of the actions */
 	spin_lock(&rtc_task_lock);
@@ -1094,17 +1101,19 @@ static void rtc_dropped_irq(unsigned lon
 		return;
 	}
 
-	/* Just in case someone disabled the timer from behind our back... */
-	if (rtc_status & RTC_TIMER_ON)
-		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
 	rtc_irq_data += ((rtc_freq/HZ)<<8);
 	rtc_irq_data &= ~0xff;
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);	/* restart */
 
 	freq = rtc_freq;
 
-	spin_unlock_irq(&rtc_lock);
+	/* Just in case someone disabled the timer from behind our back... */
+	if (rtc_status & RTC_TIMER_ON) {
+		spin_unlock_irq(&rtc_lock);
+		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
+	} else
+		spin_unlock_irq(&rtc_lock);
+
 
 	printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
 

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  3:32                             ` K.R. Foley
@ 2004-10-27  8:28                               ` Ingo Molnar
  2004-10-27  8:44                                 ` Ingo Molnar
  2004-10-27  9:24                               ` Ingo Molnar
  2004-10-27 13:29                               ` Ingo Molnar
  2 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  8:28 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> Running amlat still hard locks the system. The last time this happened
> I got this in the log:
> 
>  Oct 26 21:43:56 porky kernel: BUG: sleeping function called from 
> invalid context amlat(3963) at kernel/mutex.c:28
> Oct 26 21:43:56 porky kernel: in_atomic():1 [00000001], irqs_disabled():1
> Oct 26 21:43:56 porky kernel:  [<c011c7da>] __might_sleep+0xca/0xe0 (12)
> Oct 26 21:43:56 porky kernel:  [<c0137d89>] _mutex_lock+0x39/0x50 (36)
> Oct 26 21:43:56 porky kernel:  [<c0137df6>]  _mutex_lock_irqsave+0x16/0x20 (24)
> Oct 26 21:43:56 porky kernel:  [<c012977d>] __mod_timer+0x4d/0x1f0 (12)
> Oct 26 21:43:56 porky kernel:  [<c01f6535>] rtc_do_ioctl+0x185/0x970 (44)

does the quick hack below help?

	Ingo

--- linux/drivers/char/rtc.c.orig
+++ linux/drivers/char/rtc.c
@@ -238,11 +238,11 @@ irqreturn_t rtc_interrupt(int irq, void 
 		rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);
 	}
 
+	spin_unlock (&rtc_lock);
+
 	if (rtc_status & RTC_TIMER_ON)
 		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
 
-	spin_unlock (&rtc_lock);
-
 	/* Now do the rest of the actions */
 	spin_lock(&rtc_task_lock);
 	if (rtc_callback)
@@ -1094,10 +1094,6 @@ static void rtc_dropped_irq(unsigned lon
 		return;
 	}
 
-	/* Just in case someone disabled the timer from behind our back... */
-	if (rtc_status & RTC_TIMER_ON)
-		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
-
 	rtc_irq_data += ((rtc_freq/HZ)<<8);
 	rtc_irq_data &= ~0xff;
 	rtc_irq_data |= (CMOS_READ(RTC_INTR_FLAGS) & 0xF0);	/* restart */
@@ -1106,6 +1102,10 @@ static void rtc_dropped_irq(unsigned lon
 
 	spin_unlock_irq(&rtc_lock);
 
+	/* Just in case someone disabled the timer from behind our back... */
+	if (rtc_status & RTC_TIMER_ON)
+		mod_timer(&rtc_irq_timer, jiffies + HZ/rtc_freq + 2*HZ/100);
+
 	printk(KERN_WARNING "rtc: lost some interrupts at %ldHz.\n", freq);
 
 	/* Now we have new data */

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 19:09                                           ` Denis Vlasenko
@ 2004-10-27  8:23                                             ` Rui Nuno Capela
  0 siblings, 0 replies; 76+ messages in thread
From: Rui Nuno Capela @ 2004-10-27  8:23 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

>> Denis Vlasenko wrote:
>> >
>> > <shameless plug>
>> > Maybe this program will be useful. It is designed to give you
>> > overall system statistics without the need to scan entire /proc/NNN
>> > forest. Together with nice -20, it will hopefully not stall.
>> >
>> > Compiled with dietlibc. If you will have trouble compiling it,
>> > binary is attached too.
>> >
>> > Latest version is 0.9 but it seems I forgot it in my home box :(
>> </shameless plug>
>>
>> Thanks for nmeter. I have changed a couple of little bits to build with
>> gcc-3.4 here (see diff attached).
>
> Hmm will it compile on 3.4 with "static inline"?
>

Yes, it now compiles on gcc-3.4.1 out of the box.

Thanks for this nice little utility.

Cheers.
-- 
rncbc aka Rui Nuno Capela
rncbc@rncbc.org


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  0:24                           ` Ingo Molnar
  2004-10-27  0:53                             ` K.R. Foley
  2004-10-27  3:32                             ` K.R. Foley
@ 2004-10-27  3:48                             ` K.R. Foley
  2 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27  3:48 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>Several things in regard to V0.2:
>>
>>1) Interactive responsiveness seems to be noticably sluggish at times on
>>all three of the systems I have tested this on.
>>2) My 450MHz UP system is definitely the worst by far. Scrolling through
>>the syslog in a telnet session produces pauses every few seconds for
>>about a second, that is while it's still responding. These problems seem
>>to be network related, but there are no indications of what the problem
>>is. This system also at times will just stop responding to network requests.
>>3) Both of the SMP systems are lacking the snappy responsiveness in X
>>that I have become accustomed to with previous patches, but the 2.6GHz
>>Xeon (w/HT) is worse than the 933MHz Xeon. Again no indications of
>>problems in the logs.
>>4) Using amlat to run the RTC at 1kHz will kill any of these systems
>>very quickly.
> 
> 
> could you try this with -V0.3 too? I believe most of these problems
> should be solved.
> 
> 	Ingo
> 

OK the 450 (UP) dies before it gets out of the gate. From the tail end 
of the Oops on the screen it looks to be related to the rtc also. Will 
investigate further after I rest my eyes a bit.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  0:24                           ` Ingo Molnar
  2004-10-27  0:53                             ` K.R. Foley
@ 2004-10-27  3:32                             ` K.R. Foley
  2004-10-27  8:28                               ` Ingo Molnar
                                                 ` (2 more replies)
  2004-10-27  3:48                             ` K.R. Foley
  2 siblings, 3 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27  3:32 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>Several things in regard to V0.2:
>>
>>1) Interactive responsiveness seems to be noticably sluggish at times on
>>all three of the systems I have tested this on.
>>2) My 450MHz UP system is definitely the worst by far. Scrolling through
>>the syslog in a telnet session produces pauses every few seconds for
>>about a second, that is while it's still responding. These problems seem
>>to be network related, but there are no indications of what the problem
>>is. This system also at times will just stop responding to network requests.
>>3) Both of the SMP systems are lacking the snappy responsiveness in X
>>that I have become accustomed to with previous patches, but the 2.6GHz
>>Xeon (w/HT) is worse than the 933MHz Xeon. Again no indications of
>>problems in the logs.
>>4) Using amlat to run the RTC at 1kHz will kill any of these systems
>>very quickly.
> 
> 
> could you try this with -V0.3 too? I believe most of these problems
> should be solved.
> 
> 	Ingo
> 

I've repeated the above on the dual 933 Xeon:

Still problems with interactive behavior. Running KDE, with top running 
in xterm, scrolling through the menus I get some pauses. When the pauses 
occur I see kdeinit hit the top of the list and sometimes consuming 90% 
or more of a CPU and idle usage drops to 30-40%. I do see some latency 
traces (not really high ones) in the log that were generated by kdeinit 
but I think they were generated prior to when these pauses occurred, 
most likely when logging in.

Running amlat still hard locks the system. The last time this happened I 
got this in the log:

  Oct 26 21:43:56 porky kernel: BUG: sleeping function called from 
invalid context amlat(3963) at kernel/mutex.c:28
Oct 26 21:43:56 porky kernel: in_atomic():1 [00000001], irqs_disabled():1
Oct 26 21:43:56 porky kernel:  [<c011c7da>] __might_sleep+0xca/0xe0 (12)
Oct 26 21:43:56 porky kernel:  [<c0137d89>] _mutex_lock+0x39/0x50 (36)
Oct 26 21:43:56 porky kernel:  [<c0137df6>] 
_mutex_lock_irqsave+0x16/0x20 (24)
Oct 26 21:43:56 porky kernel:  [<c012977d>] __mod_timer+0x4d/0x1f0 (12)
Oct 26 21:43:56 porky kernel:  [<c01f6535>] rtc_do_ioctl+0x185/0x970 (44)
Oct 26 21:43:56 porky kernel:  [<c013838d>] __mcount+0x1d/0x30 (136)
Oct 26 21:43:56 porky kernel:  [<c01f6d2b>] rtc_ioctl+0xb/0x30 (4)
Oct 26 21:43:56 porky kernel:  [<c0179367>] sys_ioctl+0xe7/0x250 (4)
Oct 26 21:43:56 porky kernel:  [<c01131f8>] mcount+0x14/0x18 (8)
Oct 26 21:43:56 porky kernel:  [<c01f6d2b>] rtc_ioctl+0xb/0x30 (20)
Oct 26 21:43:56 porky kernel:  [<c0179367>] sys_ioctl+0xe7/0x250 (20)
Oct 26 21:43:56 porky kernel:  [<c0106739>] sysenter_past_esp+0x52/0x71 (48)
Oct 26 21:43:56 porky kernel: preempt count: 00000002
Oct 26 21:43:56 porky kernel: . 2-level deep critical section nesting:
Oct 26 21:43:56 porky kernel: .. entry 1: _spin_lock_irqsave+0x22/0x80 
[<c02c71c2>] / (rtc_do_ioctl+0x158/0x970 [<c01f6508>])
Oct 26 21:43:56 porky kernel: .. entry 2: print_traces+0x1d/0x60 
[<c01394bd>] / (dump_stack+0x23/0x30 [<c0107613>])
Oct 26 21:43:56 porky kernel:
Oct 26 21:43:56 porky kernel: BUG: scheduling while atomic: IRQ 
8/0x00000001/672
Oct 26 21:43:56 porky kernel: caller is schedule+0x30/0xe0
Oct 26 21:43:57 porky kernel:  [<c02c58c1>] __schedule+0x771/0x7d0 (12)
Oct 26 21:43:57 porky kernel:  [<c02c5950>] schedule+0x30/0xe0 (8)
Oct 26 21:43:57 porky kernel:  [<c013838d>] __mcount+0x1d/0x30 (60)
Oct 26 21:43:57 porky kernel:  [<c02c592e>] schedule+0xe/0xe0 (4)
Oct 26 21:43:57 porky kernel:  [<c02c6c4d>] down_write_mutex+0x12d/0x1e0 (4)
Oct 26 21:43:57 porky kernel:  [<c01131f8>] mcount+0x14/0x18 (8)
Oct 26 21:43:57 porky kernel:  [<c02c5950>] schedule+0x30/0xe0 (20)
Oct 26 21:43:57 porky kernel:  [<c01131f8>] mcount+0x14/0x18 (4)
Oct 26 21:43:57 porky kernel:  [<c02c74ea>] _spin_unlock+0x1a/0x40 (20)
Oct 26 21:43:57 porky kernel:  [<c02c6c4d>] down_write_mutex+0x12d/0x1e0 
(12)

Working on booting the 450 right now.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-27  0:24                           ` Ingo Molnar
@ 2004-10-27  0:53                             ` K.R. Foley
  2004-10-27  3:32                             ` K.R. Foley
  2004-10-27  3:48                             ` K.R. Foley
  2 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-27  0:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>Several things in regard to V0.2:
>>
>>1) Interactive responsiveness seems to be noticably sluggish at times on
>>all three of the systems I have tested this on.
>>2) My 450MHz UP system is definitely the worst by far. Scrolling through
>>the syslog in a telnet session produces pauses every few seconds for
>>about a second, that is while it's still responding. These problems seem
>>to be network related, but there are no indications of what the problem
>>is. This system also at times will just stop responding to network requests.
>>3) Both of the SMP systems are lacking the snappy responsiveness in X
>>that I have become accustomed to with previous patches, but the 2.6GHz
>>Xeon (w/HT) is worse than the 933MHz Xeon. Again no indications of
>>problems in the logs.
>>4) Using amlat to run the RTC at 1kHz will kill any of these systems
>>very quickly.
> 
> 
> could you try this with -V0.3 too? I believe most of these problems
> should be solved.
> 
> 	Ingo
> 

Sure will. It's building on two of the systems now (V0.3.1).

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 10:53                         ` K.R. Foley
  2004-10-26 10:57                           ` Ingo Molnar
@ 2004-10-27  0:24                           ` Ingo Molnar
  2004-10-27  0:53                             ` K.R. Foley
                                               ` (2 more replies)
  1 sibling, 3 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-27  0:24 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> Several things in regard to V0.2:
> 
> 1) Interactive responsiveness seems to be noticably sluggish at times on
> all three of the systems I have tested this on.
> 2) My 450MHz UP system is definitely the worst by far. Scrolling through
> the syslog in a telnet session produces pauses every few seconds for
> about a second, that is while it's still responding. These problems seem
> to be network related, but there are no indications of what the problem
> is. This system also at times will just stop responding to network requests.
> 3) Both of the SMP systems are lacking the snappy responsiveness in X
> that I have become accustomed to with previous patches, but the 2.6GHz
> Xeon (w/HT) is worse than the 933MHz Xeon. Again no indications of
> problems in the logs.
> 4) Using amlat to run the RTC at 1kHz will kill any of these systems
> very quickly.

could you try this with -V0.3 too? I believe most of these problems
should be solved.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 10:40                                         ` Rui Nuno Capela
@ 2004-10-26 19:09                                           ` Denis Vlasenko
  2004-10-27  8:23                                             ` Rui Nuno Capela
  0 siblings, 1 reply; 76+ messages in thread
From: Denis Vlasenko @ 2004-10-26 19:09 UTC (permalink / raw)
  To: Rui Nuno Capela; +Cc: linux-kernel

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

On Tuesday 26 October 2004 13:40, Rui Nuno Capela wrote:
> Denis Vlasenko wrote:
> >
> > <shameless plug>
> > Maybe this program will be useful. It is designed to give you
> > overall system statistics without the need to scan entire /proc/NNN
> > forest. Together with nice -20, it will hopefully not stall.
> >
> > Compiled with dietlibc. If you will have trouble compiling it,
> > binary is attached too.
> >
> > Latest version is 0.9 but it seems I forgot it in my home box :(
> </shameless plug>
> 
> Thanks for nmeter. I have changed a couple of little bits to build with
> gcc-3.4 here (see diff attached).

Hmm will it compile on 3.4 with "static inline"?

> Indeed, it says 0.7 as its version string. What's up on 0.9?

Here it is.
--
vda

[-- Attachment #2: nmeter.c --]
[-- Type: text/x-csrc, Size: 20783 bytes --]

// Based on nanotop.c from floppyfw project
// Released under GPL
// Contact me: vda@port.imtp.ilyichevsk.odessa.ua

//TODO: 
// simplify code
// /proc/locks
// /proc/stat:
// disk_io: (3,0):(22272,17897,410702,4375,54750)
// btime 1059401962

#include <time.h>	// timezone (global var)
#include <sys/time.h>	// gettimeofday
#include <string.h>	// strstr etc
#include <stdarg.h>	// f(...)
#include <fcntl.h>	// O_RDONLY

#define VERSION_STR "0.9"
#define DELIM_CHAR ' '

//==============
#define NL "\n"
typedef unsigned long long ullong;
typedef unsigned long ulong;

typedef ulong sample_t;

//==============
#define proc_file_size 4096

typedef struct proc_file {
    char *name;
    int gen;
    char *file;
} proc_file;

proc_file proc_stat = { "/proc/stat", -1 };
proc_file proc_net_dev = { "/proc/net/dev", -1 };
proc_file proc_meminfo = { "/proc/meminfo", -1 };
proc_file proc_diskstats = { "/proc/diskstats", -1 };
struct timeval tv;
int gen=-1;
int is26=0;

//==============
#if 0
#include <stdio.h>
void dprintf(const char *fmt, ...) {
    va_list ap;
    va_start(ap, fmt);
    vprintf(fmt, ap);
    va_end(ap);
}
#else
extern void dprintf(const char *fmt, ...) {}
#endif

//==============
char outbuf[4096];
char *cur_outbuf = outbuf;
int delta = 1000000;
int deltanz = 1000000;

static inline void reset_outbuf() {
    cur_outbuf = outbuf;
}

static inline int outbuf_count() {
    return cur_outbuf-outbuf;
}

static inline void print_outbuf() {
    if(cur_outbuf>outbuf) {
	write(1, outbuf, cur_outbuf-outbuf);
	cur_outbuf = outbuf;
    }
}

void put(const char *s) {
    int sz = strlen(s);
    if(sz > (outbuf+sizeof(outbuf))-cur_outbuf)
	sz = (outbuf+sizeof(outbuf))-cur_outbuf;
    memcpy(cur_outbuf, s, sz);
    cur_outbuf += sz;
}

void put_c(char c) {
    if(cur_outbuf < outbuf+sizeof(outbuf))
	*cur_outbuf++ = c;
}

//==============
char* simple_itoa(char *s, int sz, unsigned long v, int pad) {
//==============
    s += sz;
    *--s = '\0';
    while (--sz > 0) {
        *--s = "0123456789"[v%10];
        pad--;
        v /= 10;
        if(!v && pad<=0) break;
    }
    return s;
}

//==============
int readfile_z(char *buf, int sz, const char* fname) {
//==============
    int fd;
    fd=open(fname,O_RDONLY);
    if(fd<0) return 1;
    sz = read(fd,buf,sz-1);
    close(fd);
    if(sz<0) {
	buf[0]='\0';
	return 1;
    }
    buf[sz]='\0';
    return 0;
}

//==============
int rdval(const char* p, const char* key, sample_t *vec, ...) {
//==============
    va_list arg_ptr;
    int indexline;
    int indexnext;

    p = strstr(p,key);
    if(!p) return 1;
	
    p += strlen(key);
    va_start(arg_ptr, vec);
    indexline = 1;
    indexnext = va_arg(arg_ptr, int);
    while(1) {
    	while(*p==' ' || *p=='\t') p++;
	if(*p=='\n' || *p=='\0') break;

        if(indexline == indexnext) { // read this value
            *vec++ = strtoul(p, NULL, 10);
            indexnext = va_arg(arg_ptr, int);
        }
    	while(*p > ' ') p++; // skip over value
        indexline++;
    }
    va_end(arg_ptr);
    return 0;
}

//==============
int rdval_diskstats(const char* p, sample_t *vec) {
//   1    2 3   4     5     6(rd)  7      8     9     10(wr) 11      12 13    14
//   3    0 hda 51292 14441 841783 926052 25717 79650 843256 3029804 0 148459 3956933
//   3    1 hda1 0 0 0 0 <- ignore if only 4 fields
//==============
    sample_t rd;
    int indexline = 0;
    vec[0] = 0;
    vec[1] = 0;
    while(1) {
        indexline++;
        while(*p==' ' || *p=='\t') p++;
        if(*p=='\0') break;
        if(*p=='\n') {
            indexline = 0;
	    p++;
            continue;
        }
        if(indexline == 6) {
            rd = strtoul(p, NULL, 10);
        } else
        if(indexline == 10) {
            vec[0] += rd;  // TODO: *sectorsize (don't know how to find out sectorsize)
            vec[1] += strtoul(p, NULL, 10);
    	    while(*p!='\n' && *p!='\0') p++;
	    continue;
        }
        while(*p > ' ') p++; // skip over value
    }
    return 0;
}

//==============
void scale(sample_t ul) {
//==============
    char buf[5];
    int index = 0;
    ul *= 10;
    if(ul>9999*10) { // do not scale if 9999 or less
	while(ul >= 10000) {
	    ul /= 1024;
	    index++;
	}
    }

    if(!index) {/* use 1234 format */
	buf[0] = " 123456789"[ul/10000];
	if(buf[0]== ' ') buf[1] = " 123456789"[ul/1000%10];
	            else buf[1] = "0123456789"[ul/1000%10];
	if(buf[1]== ' ') buf[2] = " 123456789"[ul/100%10];
                    else buf[2] = "0123456789"[ul/100%10];
	buf[3] = "0123456789"[ul/10%10];
    } else if(ul>=100) { /* use 123k format */
	if( (buf[0]= " 123456789"[ul/1000]) == ' ')
	    buf[1] = " 123456789"[ul/100%10];
	else
	    buf[1] = "0123456789"[ul/100%10];
	buf[2] = "0123456789"[ul/10%10];
	buf[3] = " kMGTEP"[index];
    } else { /* use 1.2M format */
	buf[0] = "0123456789"[ul/10];
	buf[1] = '.';
	buf[2] = "0123456789"[ul%10];
	buf[3] = " kMGTEP"[index];
    }
    buf[4] = 0;
    put(buf);
}

//==============
const char* prepare(proc_file *pf) {
    if(!pf->file) pf->file = (char*)malloc(proc_file_size);
    if(pf->gen != gen) {
	pf->gen = gen;
	readfile_z(pf->file, proc_file_size, pf->name);
    }
    return pf->file;
}

//==============
#define S_STAT(a) \
typedef struct a { \
    struct s_stat *next; \
    int (*collect)(struct a *s); \
    const char *label; \
    int width;

S_STAT(s_stat)
} s_stat;

#define MALLOC_STAT(type,var) type *var = (type*)malloc(sizeof(type))

//==============
//     user nice system idle  iowait irq  softirq (last 3 only in 2.6)
//cpu  649369 0 341297 4336769 11640 7122 1183
//cpuN 649369 0 341297 4336769 11640 7122 1183
#define N 7
S_STAT(cpu_stat)
    sample_t old[N];
    int bar_sz;
    char *bar;
} cpu_stat;

//==============
int collect_cpu(cpu_stat *s) {
//==============
    sample_t data[N] = {0,0,0,0,0,0,0};
    sample_t frac[N] = {0,0,0,0,0,0,0};
    sample_t all = 0;
    int norm_all = 0;
    int bar_sz = s->bar_sz;
    char *bar = s->bar;
    int i;

    if(rdval(prepare(&proc_stat), "cpu ", data, 1, 2, 3, 4, 5, 6 ,7))
	return 1;
    
    put_c('[');

    for(i=0; i<N; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
        s->old[i] = data[i];
        all += (data[i] -= old);
    }

    if(all) {
//dprintf("data2:");
	for(i=0; i<N; i++) {
	    ullong t = bar_sz*(ullong)data[i];
	    norm_all += data[i] = t / all;
	    frac[i] = t % all;
//dprintf(" %lu/%lu",data[i],frac[i]);
	}
//dprintf(" norm_all %lu\n",norm_all);
    
	while(norm_all<bar_sz) {
	    sample_t max=frac[0]; int pos=0;
	    //for(i=1; i<4; i++) if(frac[i]>=max) max=frac[i], pos=i;
	    for(i=1; i<N; i++) {
		if(frac[i]>=max) max=frac[i], pos=i;
	    }
	    frac[pos]=0;	//avoid bumping same value twice
	    data[pos]++;
//dprintf("bumped %i\n",pos);
	    norm_all++;
        }
    
//dprintf("bar_sz %i\n",bar_sz);
//dprintf("sys %i\n",data[2]);
//dprintf("usr %i\n",data[0]);
//dprintf("nice %i\n",data[1]);
	memset(bar,'.',bar_sz);
	memset(bar,'S',data[2]); bar+=data[2]; //sys
	memset(bar,'U',data[0]); bar+=data[0]; //usr
	memset(bar,'N',data[1]); bar+=data[1]; //nice
	memset(bar,'D',data[4]); bar+=data[4]; //iowait
	memset(bar,'I',data[5]); bar+=data[5]; //irq
	memset(bar,'i',data[6]); bar+=data[6]; //softirq
    } else {
	memset(bar,'?',bar_sz);
    }
    put(s->bar);
    put_c(']');
    return 0;
}

//==============
s_stat* init_cpu(const char *param) {
//==============
    int sz;
    MALLOC_STAT(cpu_stat,s);
    s->collect = collect_cpu;
    s->label = "cpu ";
    s->width = 4;

    sz = strtol(param, NULL, 0);
    if(sz<10) sz=10;
    if(sz>1000) sz=1000;

    s->bar = (char*)malloc(sz+1);
    s->bar[sz]=0;
    s->bar_sz = sz;
    s->width = sz+2;
    return (s_stat*)s;
}

//==============
S_STAT(int_stat)
    sample_t old;
    int no;
    char numlabel[6];
} int_stat;

//==============
int collect_int(int_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "intr", data, s->no))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_int(const char *param) {
//==============
    MALLOC_STAT(int_stat,s);
    s->collect = collect_int;
    s->width = 4;
    if(param[0]=='\0') {
	s->no = 1;
	s->label = "int ";
    } else {
	int n = strtoul(param, NULL, 0);
	s->no = n+2;
	s->label = s->numlabel;
	s->numlabel[0]='i';
	s->numlabel[1]='n';
	s->numlabel[2]='t';
	s->numlabel[3]=(n<=9 ? '0'+n : n+('A'-10));
	s->numlabel[4]=' ';
	s->numlabel[5]='\0';
    }
    return (s_stat*)s;
}

//==============
S_STAT(ctx_stat)
    sample_t old;
} ctx_stat;

//==============
int collect_ctx(ctx_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "ctxt", data, 1))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_ctx(const char *param) {
//==============
    MALLOC_STAT(ctx_stat,s);
    s->collect = collect_ctx;
    s->label = "ctx ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(blk_stat)
    const char* lookfor;
    sample_t old[2];
} blk_stat;

//==============
int collect_blk24(blk_stat *s) {
//==============
    sample_t data[2];
    int i;
    if(rdval(prepare(&proc_stat), s->lookfor, data, 1, 2))
    	return 1;

    for(i=0; i<2; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
	s->old[i] = data[i];
	data[i] -= old;
    }
    scale(data[0]*1024);
    put_c(' ');
    scale(data[1]*1024);
    return 0;
}

//==============
int collect_blk26(blk_stat *s) {
//==============
    sample_t data[2];
    int i;
    if(rdval_diskstats(prepare(&proc_diskstats), data))
	return 1;

    for(i=0; i<2; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
	s->old[i] = data[i];
	data[i] -= old;
    }
    scale(data[0]*512);
    put_c(' ');
    scale(data[1]*512);
    return 0;
}

//==============
int collect_blk(blk_stat *s) {
//==============
    if(is26) return collect_blk26(s);
    return collect_blk24(s);
}

//==============
s_stat* init_blk(const char *param) {
//==============
    MALLOC_STAT(blk_stat,s);
    s->collect = collect_blk;
//    if(param[0]=='s') {
//	s->label = "sio ";
//	s->lookfor = "swap";
//    } else {
	s->label = "bio ";
	s->lookfor = "page";
//    }
    s->width = 9;
    return (s_stat*)s;
}

//==============
S_STAT(fork_stat)
    sample_t old;
} fork_stat;

//==============
int collect_fork(fork_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "processes", data, 1))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_fork(const char *param) {
//==============
    MALLOC_STAT(fork_stat,s);
    s->collect = collect_fork;
    s->label = "fork";  // no trailing space: there usually <1000 forks,
    s->width = 4;       // we trade usual "fork    3" for rare "fork1234"
    return (s_stat*)s;
}

//==============
S_STAT(if_stat)
    sample_t old[4];
    const char *device;
    char *device_colon;
} if_stat;

//==============
int collect_if(if_stat *s) {
//==============
    sample_t data[4];
    int i;

    if(rdval(prepare(&proc_net_dev), s->device_colon, data, 1, 3, 9, 11))
	return 1;

    for(i=0; i<4; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
        s->old[i] = data[i];
        data[i] -= old;
    }
    put_c(data[1] ? '*' : ' ');
    scale(data[0]);
    put_c(data[3] ? '*' : ' ');
    scale(data[2]);
    return 0;
}

//==============
s_stat* init_if(const char *device) {
//==============
    MALLOC_STAT(if_stat,s);
    s->collect = collect_if;
    s->label = device;
    s->width = 10;
    
    s->device = device;
    s->device_colon = (char*)malloc(strlen(device)+2);
    strcpy(s->device_colon,device);
    strcat(s->device_colon,":");
    return (s_stat*)s;
}

//==============
S_STAT(mem_stat)
    char opt;
} mem_stat;

//==============
int collect_mem(mem_stat *s) {
//==============
//        total:    used:    free:  shared: buffers:  cached:
//Mem:  29306880 21946368  7360512        0  2101248 11956224
//Swap: 100655104 10207232 90447872
//MemTotal:        28620 kB
//MemFree:          7188 kB
//MemShared:           0 kB  <-- ?
//Buffers:          2052 kB
//Cached:           9080 kB
//SwapCached:       2596 kB  <-- ?

    // Not available in 2.6:
    //if(rdval(prepare(&proc_meminfo), "Mem:", data, 1, 2, 5, 6))
    //    return 1;
    sample_t m_total;
    sample_t m_free;
    sample_t m_bufs;
    sample_t m_cached;
    if(rdval(prepare(&proc_meminfo), "MemTotal:", &m_total , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "MemFree:",  &m_free  , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "Buffers:",  &m_bufs  , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "Cached:",   &m_cached, 1)) return 1;
    switch(s->opt) {
    case 'f':
        scale((m_free + m_bufs + m_cached)<<10); break;
    case 't':
        scale(m_total<<10); break;
    default:
        scale((m_total - m_free - m_bufs - m_cached)<<10); break;
    }
    return 0;
}

//==============
s_stat* init_mem(const char *param) {
//==============
    MALLOC_STAT(mem_stat,s);
    s->collect = collect_mem;
    s->width = 4;
    s->opt=param[0];
    switch(param[0]) {
    case 'f':
	s->label = "free "; break;
    case 't':
	s->label = "tot "; break;
    default:
	s->label = "mem "; break;
    }
    return (s_stat*)s;
}

//==============
S_STAT(swp_stat)
} swp_stat;

//==============
int collect_swp(swp_stat *s) {
//==============
    sample_t data[1];
    if(rdval(prepare(&proc_meminfo), "Swap:", data, 2))
	return 1;
	
    scale(data[0]);
    return 0;
}

//==============
s_stat* init_swp(const char *param) {
//==============
    MALLOC_STAT(swp_stat,s);
    s->collect = collect_swp;
    s->label = "swp ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(fd_stat)
} fd_stat;

//==============
int collect_fd(fd_stat *s) {
//==============
    char file[4096];
    sample_t data[2];

    readfile_z(file, sizeof(file), "/proc/sys/fs/file-nr");
    if(rdval(file, "", data, 1, 2))
	return 1;

    scale(data[0]-data[1]);
    return 0;
}

//==============
s_stat* init_fd(const char *param) {
//==============
    MALLOC_STAT(fd_stat,s);
    s->collect = collect_fd;
    s->label = "fd ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(time_stat)
    int prec;
    int scale;
} time_stat;

//==============
int collect_time(time_stat *s) {
//==============
    char buf[16];	// 12:34:56.123456<eol>
			// 1234567890123456
    simple_itoa(buf, 3, tv.tv_sec/(60*60)%24, 2);
    buf[2] = ':';
    simple_itoa(buf+3, 3, tv.tv_sec/60%60, 2);
    buf[5] = ':';
    simple_itoa(buf+6, 3, tv.tv_sec%60, 2);
    
    if(s->prec) {
	buf[8] = '.';
	//simple_itoa(buf+9, s->prec+1, (tv.tv_usec + s->scale/2) / s->scale, s->prec);
	// (fixme: round up seconds too!)
	// so... rounding omitted! just use more prec if you need it! ;)
	simple_itoa(buf+9, s->prec+1, tv.tv_usec / s->scale, s->prec);
    }
    put(buf);
    return 0;
}

//==============
s_stat* init_time(const char *param) {
//==============
    int prec;
    MALLOC_STAT(time_stat,s);
    s->collect = collect_time;
    s->label = "";
    prec = param[0]-'0';
    if(prec<0) prec = 0;
    else if(prec>6) prec = 6;
    s->width = 8+prec + (prec!=0);
    s->prec = prec;
    s->scale = 1;
    while(prec++ < 6)
	s->scale *= 10;
    return (s_stat*)s;
}

//==============
char *header;
//==============
void build_n_put_hdr(s_stat *s) {
//==============
    while(s) {
	int l = 0;
        if(s->label[0]!=' ') {
    	    put(s->label);
	    l = strlen(s->label);
	}
	while(l <= s->width) {
	    put_c(' ');	
	    l++;
	}
        s = s->next;
    }
    put_c('\n');

    header = (char*)malloc(outbuf_count()+1);
    memcpy(header, outbuf, outbuf_count());
    header[outbuf_count()] = '\0';
    //print_outbuf();
}

//==============
void put_hdr(s_stat *s) {
//==============
    if(!header) build_n_put_hdr(s);
    else {
	put(header);
	//print_outbuf();
    }
}

//==============
void run_once(s_stat *s, int without_headers) {
//==============
    gen++;
    int first = 1;
    while(s) {
	if(s->label[0]!=' ') {		// "[prev ][LABEL]data
	    if(!first) put_c(DELIM_CHAR);
    	    if(!without_headers) put(s->label);
	} else {			// "prevLABELdata
	    put(s->label+1);
	}
        if(s->collect(s)) {
	    int w = s->width;
	    while(w-- > 0)
		put_c('?');
	}
        s = s->next;
	first = 0;
    }
}

//==============
typedef s_stat* init_func(const char *param);

const char options[] = "ncmsfixptb";
init_func* init_functions[] = {
    init_if,  
    init_cpu, 
    init_mem, 
    init_swp, 
    init_fd,  
    init_int, 
    init_ctx, 
    init_fork,
    init_time,
    init_blk,
};

//#include <signal.h>
//static void setup_signals() {
//    sigset_t ss;
//
//    sigemptyset(&ss);
//    sigaddset(&ss, SIGPIPE);	
//    sigprocmask(SIG_BLOCK, &ss, NULL);
//}

//==============
int main(int argc, char* argv[]) {
//==============
    s_stat *first = 0;
    s_stat *last = 0;
    s_stat *s;
    int print_headers = 0;
    char *final_str = "\n";
    char *p;
    int fd;
    int i;

    //setup_signals();

    { // this incredibly ugly code is used only for timezone brain damage
	time_t tmp=0;
	// used only for a side effect of setting global timezone var:
	localtime(&tmp); 
    }
    
    if(argc==1) {
	put(
	"Nmeter " VERSION_STR " allows you to monitor your system in real time" NL
	NL
	"Options:" NL
	"c[N]	monitor CPU. N - bar size, default 10" NL
	"	(legend: S:system U:user N:niced D:iowait I:irq i:softirq)" NL
	"nIFACE	monitor network interface IFACE" NL
	"m[f/t]	monitor allocated/free/total memory" NL
	"s	monitor allocated swap" NL
	"f	monitor number of used filedescriptors" NL
	"i[NN]	monitor total/specific IRQ rate" NL
	"x	monitor context switch rate" NL
	"p	monitor process creation rate" NL
	"b	monitor block io" NL
	//"b[s]	monitor block io (swap io)" NL
	"t[N]	show time (with N decimal points)" NL
	"d[N]	milliseconds between updates. Default 1000" NL
	"h[N]	print headers above numbers (each N lines, default once)" NL
	"lLABEL	specify label for previous item" NL
	"LLABEL	same + label will be printed without surrounding blanks" NL
	"r	print <cr> instead of <lf> at EOL" NL
	);
	print_outbuf();
	return 0;
    }

    fd = open("/proc/version",O_RDONLY);
    if(fd>=0) {
	char buf[32];
	if(0<read(fd,buf,sizeof(buf)))
	    is26 = (strstr(buf,"Linux version 2.6.")!=NULL);
	close(fd);
    }
    for(i=1; i<argc; i++) {
	p = strchr(options,argv[i][0]);
	if(p) {
	    s = init_functions[p-options](argv[i]+1);
	    if(s) {
		s->next = 0;
		if(!first)
		    first = s;
		else
		    last->next = s;
		last = s;
	    }
	}

// You have to see it... gcc 3.2 coded switch() as 40 element jump table
// OH NO! >>>:^O
/*
#define SW(a) switch(a) {
#define ENDSW }
#define CASE(a,b) case (b): {
#define ENDCASE }
*/
#define SW(a) do {
#define ENDSW } while(0);
#define CASE(a,b) if((a)==(b)) {
#define ENDCASE }
	SW(argv[i][0])
	CASE(argv[i][0],'r')
	    final_str = "\r";
	    break;
	ENDCASE
	CASE(argv[i][0],'d')
	    delta = strtol(argv[i]+1, NULL, 0)*1000;
	    deltanz = delta>0? delta : 1;
	    break;
	ENDCASE
	CASE(argv[i][0],'h')
	    if(argv[i][1]=='\0')
		print_headers = -1;
	    else
		print_headers = strtol(argv[i]+1, NULL, 0);
	    break;
	ENDCASE
	CASE(argv[i][0],'l')
	    if(last)
		last->label=argv[i]+1;
	    break;
	ENDCASE
	CASE(argv[i][0],'L')
	    if(last) {
		argv[i][0]=' ';
		last->label=argv[i];
	    }
	    break;
	ENDCASE
	ENDSW
    }
	
    if(print_headers == -1) {
	build_n_put_hdr(first);
	print_outbuf();
    }
    run_once(first, print_headers);
    reset_outbuf();
    if(delta>=0) {
	gettimeofday(&tv,0);
	usleep(delta>1000000 ? 1000000 : delta-tv.tv_usec%deltanz);
    }
    while(1) {
	gettimeofday(&tv,0);
	tv.tv_sec -= timezone;

	if(print_headers > 0 && gen%print_headers == 0)
	    put_hdr(first);
	run_once(first, print_headers);
	put(final_str);
	print_outbuf();

	// Negative delta -> no usleep at all
	// This will hog the CPU but you can have REALLY GOOD
	// time resolution ;)
	// TODO: detect and avoid useless updates
	// (like: nothing happens except time)
        if(delta>=0) {
	    int rem = delta - ((ullong)tv.tv_sec*1000000+tv.tv_usec)%deltanz;
	    // Sometimes kernel wakes us up just a tiny bit earlier than asked
	    // Do not go to very short sleep in this case
	    if(rem < delta/128) {
		rem += delta;
	    }
	    usleep(rem);
	}
    }

    return 0;
}

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 17:45                                             ` Fernando Pablo Lopez-Lezcano
@ 2004-10-26 17:55                                               ` Lee Revell
  0 siblings, 0 replies; 76+ messages in thread
From: Lee Revell @ 2004-10-26 17:55 UTC (permalink / raw)
  To: Fernando Pablo Lopez-Lezcano
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, K.R. Foley,
	linux-kernel, mark_h_johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Alexander Batyrshin

On Tue, 2004-10-26 at 10:45 -0700, Fernando Pablo Lopez-Lezcano wrote:
> > AFAIK there is nothing you can do - any other irq that fires on 9 will
> > mask out all the others until it completes.
> 
> Yes, except I did not see all these xruns running 2.4.26 + lowlat +
> preempt (same machine). Things got better with 2.6.x up to, perhaps, S7,
> although I would have to retest to make sure. Now they seem to be worse
> than before. 

Hmm, interesting.  Anyway T3 is the last version that was stable for me,
this is the xrun-free standard that I compare the later ones to.

Lee





^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 17:25                                           ` Lee Revell
@ 2004-10-26 17:45                                             ` Fernando Pablo Lopez-Lezcano
  2004-10-26 17:55                                               ` Lee Revell
  0 siblings, 1 reply; 76+ messages in thread
From: Fernando Pablo Lopez-Lezcano @ 2004-10-26 17:45 UTC (permalink / raw)
  To: Lee Revell
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, K.R. Foley,
	linux-kernel, mark_h_johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Alexander Batyrshin,
	Fernando Pablo Lopez-Lezcano

On Tue, 2004-10-26 at 10:25, Lee Revell wrote:
> On Mon, 2004-10-25 at 22:11 -0700, Fernando Pablo Lopez-Lezcano wrote:
> > On Mon, 2004-10-25 at 20:01, Lee Revell wrote: 
> > > On Mon, 2004-10-25 at 20:40 +0100, Rui Nuno Capela wrote:
> > > > OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
> > > > relevant IRQ thread handlers to be always higher than jackd's.
> > > 
> > > Actually they should be lower, except the soundcard.  I was only able to
> > > get the xrun free behavior of T3 by setting all IRQ threads except the
> > > soundcard to SCHED_OTHER.  Especially important was setting ksoftirqd to
> > > SCHED_OTHER, this actually may have been the only one necessary.
> > > 
> > > The relative priorities of jackd and the soundcard irq do not matter as
> > > these two should never contend (aka they are never both runnable at the
> > > same time).
> > 
> > What happens when one is blessed with a laptop where everything is
> > sharing an interrupt?
> > 
> > $ cat /proc/interrupts
> >            CPU0
> >   0:    2372239          XT-PIC  timer  0/72239
> >   1:       5362          XT-PIC  i8042  0/5362
> >   2:          0          XT-PIC  cascade  0/0
> >   8:          1          XT-PIC  rtc  0/1
> >   9:     616176          XT-PIC  acpi, uhci_hcd, uhci_hcd, uhci_hcd,
> > eth0, yenta, yenta, Intel 82801CA-ICH3, radeon@PCI:1:0:0  0/16176
> > 11:         37          XT-PIC  sonypi  0/35
> > 12:      28392          XT-PIC  i8042  0/28392
> > 14:      21078          XT-PIC  ide0  0/21078
> > 15:        472          XT-PIC  ide1  0/472
> 
> Ugh, why would _anyone_ design a laptop like that?  You have 4
> perfectly good interrupts that you are not using at all.  Is it really
> cheaper to put everything on the same irq?  Does this work better under
> Windows or something?
> 
> AFAIK there is nothing you can do - any other irq that fires on 9 will
> mask out all the others until it completes.

Yes, except I did not see all these xruns running 2.4.26 + lowlat +
preempt (same machine). Things got better with 2.6.x up to, perhaps, S7,
although I would have to retest to make sure. Now they seem to be worse
than before. 

-- Fernando



^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  5:11                                         ` Fernando Pablo Lopez-Lezcano
@ 2004-10-26 17:25                                           ` Lee Revell
  2004-10-26 17:45                                             ` Fernando Pablo Lopez-Lezcano
  0 siblings, 1 reply; 76+ messages in thread
From: Lee Revell @ 2004-10-26 17:25 UTC (permalink / raw)
  To: Fernando Pablo Lopez-Lezcano
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, K.R. Foley,
	linux-kernel, mark_h_johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Alexander Batyrshin

On Mon, 2004-10-25 at 22:11 -0700, Fernando Pablo Lopez-Lezcano wrote:
> On Mon, 2004-10-25 at 20:01, Lee Revell wrote: 
> > On Mon, 2004-10-25 at 20:40 +0100, Rui Nuno Capela wrote:
> > > OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
> > > relevant IRQ thread handlers to be always higher than jackd's.
> > 
> > Actually they should be lower, except the soundcard.  I was only able to
> > get the xrun free behavior of T3 by setting all IRQ threads except the
> > soundcard to SCHED_OTHER.  Especially important was setting ksoftirqd to
> > SCHED_OTHER, this actually may have been the only one necessary.
> > 
> > The relative priorities of jackd and the soundcard irq do not matter as
> > these two should never contend (aka they are never both runnable at the
> > same time).
> 
> What happens when one is blessed with a laptop where everything is
> sharing an interrupt?
> 
> $ cat /proc/interrupts
>            CPU0
>   0:    2372239          XT-PIC  timer  0/72239
>   1:       5362          XT-PIC  i8042  0/5362
>   2:          0          XT-PIC  cascade  0/0
>   8:          1          XT-PIC  rtc  0/1
>   9:     616176          XT-PIC  acpi, uhci_hcd, uhci_hcd, uhci_hcd,
> eth0, yenta, yenta, Intel 82801CA-ICH3, radeon@PCI:1:0:0  0/16176
> 11:         37          XT-PIC  sonypi  0/35
> 12:      28392          XT-PIC  i8042  0/28392
> 14:      21078          XT-PIC  ide0  0/21078
> 15:        472          XT-PIC  ide1  0/472

Ugh, why would _anyone_ design a laptop like that?  You have 4
perfectly good interrupts that you are not using at all.  Is it really
cheaper to put everything on the same irq?  Does this work better under
Windows or something?

AFAIK there is nothing you can do - any other irq that fires on 9 will
mask out all the others until it completes.

I am increasingly convinced that the vast majority of laptops are
horribly broken and completely unsuitable for low latency audio work.

Lee


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26 10:53                         ` K.R. Foley
@ 2004-10-26 10:57                           ` Ingo Molnar
  2004-10-27  0:24                           ` Ingo Molnar
  1 sibling, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-26 10:57 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> 1) Interactive responsiveness seems to be noticably sluggish at times on
> all three of the systems I have tested this on.

yeah, something's seriously buggered in V0.2 - dont bother testing its
latencies, the bug hides all the benefits.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 20:38                       ` Ingo Molnar
@ 2004-10-26 10:53                         ` K.R. Foley
  2004-10-26 10:57                           ` Ingo Molnar
  2004-10-27  0:24                           ` Ingo Molnar
  0 siblings, 2 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-26 10:53 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>Actually pertaining to V0.2. I just got my UP system booted up on V0.2
>>and got this in the log. I did notice that this is not new to this
>>release. It has been here at least since U10.3. Sorry I didn't catch
>>it sooner.
>>
>>Oct 25 13:31:56 daffy kernel: IRQ#11 thread RT prio: 43.
>>Oct 25 13:31:56 daffy kernel: ip/2432: BUG in enable_irq at 
>>kernel/irq/manage.c:112
> 
> 
> this is pretty harmless and has been happening in -mm for some time. The
> e100 device will work fine afterwards.
> 
> 	Ingo
> 

Several things in regard to V0.2:

1) Interactive responsiveness seems to be noticably sluggish at times on
all three of the systems I have tested this on.
2) My 450MHz UP system is definitely the worst by far. Scrolling through
the syslog in a telnet session produces pauses every few seconds for
about a second, that is while it's still responding. These problems seem
to be network related, but there are no indications of what the problem
is. This system also at times will just stop responding to network requests.
3) Both of the SMP systems are lacking the snappy responsiveness in X
that I have become accustomed to with previous patches, but the 2.6GHz
Xeon (w/HT) is worse than the 933MHz Xeon. Again no indications of
problems in the logs.
4) Using amlat to run the RTC at 1kHz will kill any of these systems
very quickly.

kr



^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  5:28                                       ` Denis Vlasenko
@ 2004-10-26 10:40                                         ` Rui Nuno Capela
  2004-10-26 19:09                                           ` Denis Vlasenko
  0 siblings, 1 reply; 76+ messages in thread
From: Rui Nuno Capela @ 2004-10-26 10:40 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

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

Denis Vlasenko wrote:
>
> <shameless plug>
> Maybe this program will be useful. It is designed to give you
> overall system statistics without the need to scan entire /proc/NNN
> forest. Together with nice -20, it will hopefully not stall.
>
> Compiled with dietlibc. If you will have trouble compiling it,
> binary is attached too.
>
> Latest version is 0.9 but it seems I forgot it in my home box :(
</shameless plug>

Thanks for nmeter. I have changed a couple of little bits to build with
gcc-3.4 here (see diff attached).

Indeed, it says 0.7 as its version string. What's up on 0.9?
-- 
rncbc aka Rui Nuno Capela
rncbc@rncbc.org


[-- Attachment #2: nmeter-1.diff --]
[-- Type: text/plain, Size: 529 bytes --]

--- nmeter.c.orig	2004-10-26 10:01:00.579922368 +0100
+++ nmeter.c	2004-10-26 09:59:48.525876248 +0100
@@ -59,15 +59,15 @@
 char outbuf[4096];
 char *cur_outbuf = outbuf;
 
-extern inline void reset_outbuf() {
+inline void reset_outbuf() {
     cur_outbuf = outbuf;
 }
 
-extern inline int outbuf_count() {
+inline int outbuf_count() {
     return cur_outbuf-outbuf;
 }
 
-extern inline void print_outbuf() {
+inline void print_outbuf() {
     if(cur_outbuf>outbuf) {
 	write(1, outbuf, cur_outbuf-outbuf);
 	cur_outbuf = outbuf;

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 16:45                                     ` K.R. Foley
@ 2004-10-26  8:29                                       ` Eran Mann
  0 siblings, 0 replies; 76+ messages in thread
From: Eran Mann @ 2004-10-26  8:29 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Florian Schmidt, Ingo Molnar, linux-kernel, Lee Revell,
	Rui Nuno Capela, Mark_H_Johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

K.R. Foley wrote:
> Florian Schmidt wrote:
> 
>> doesn't seem so. V0.2 doesn't fix this for me. This time i got a BUG 
>> storm
>> again in syslog (it kinda seems related to starting playback in xmms plus
>> loading pages in mozilla. will boot again to verify):
>>
> 
> Well I have now gotten a couple of these now too (with V0.2). They all 
> seem to be generated by firefox or thunderbird and the traces are all 
> identical except for the offending process.
> 
> 
> Oct 25 11:22:11 swdev14 kernel:
> Oct 25 11:22:20 swdev14 kernel: thunderbird-bin/3946: BUG in futex_wait 
> at kernel/futex.c:542
> Oct 25 11:22:20 swdev14 kernel:  [<c0136389>] futex_wait+0x192/0x19c (12)
> Oct 25 11:22:20 swdev14 kernel:  [<c0135646>] 
> sub_preempt_count+0x75/0xd8 (72)
> Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (4)
> Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (84)
> Oct 25 11:22:20 swdev14 kernel:  [<c01120ac>] mcount+0x14/0x18 (4)
> Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (20)
> Oct 25 11:22:20 swdev14 kernel:  [<c0118e15>] 
> default_wake_function+0x0/0x1c (60)
> Oct 25 11:22:20 swdev14 kernel:  [<c0118e15>] 
> default_wake_function+0x0/0x1c (32)
> Oct 25 11:22:20 swdev14 kernel:  [<c0136777>] sys_futex+0xf0/0xfc (12)
> Oct 25 11:22:20 swdev14 kernel:  [<c01120ac>] mcount+0x14/0x18 (8)
> Oct 25 11:22:20 swdev14 kernel:  [<c0136637>] do_futex+0x47/0x97 (20)
> Oct 25 11:22:20 swdev14 kernel:  [<c0136777>] sys_futex+0xf0/0xfc (40)
> Oct 25 11:22:20 swdev14 kernel:  [<c010623d>] 
> sysenter_past_esp+0x52/0x71 (68)
> Oct 25 11:22:20 swdev14 kernel: preempt count: 00000001
> Oct 25 11:22:20 swdev14 kernel: . 1-level deep critical section nesting:
> Oct 25 11:22:20 swdev14 kernel: .. entry 1: print_traces+0x1d/0x59 
> [<c0135a28>] / (dump_stack+0x23/0x27 [<c01070db>])
> Oct 25 11:22:20 swdev14 kernel:
I see a lot of similar traces too on V0.2 (also either from firefox or 
thunderbird):
Oct 26 10:20:57 eran kernel: thunderbird-bin/4285: BUG in futex_wait at 
kernel/futex.c:542
Oct 26 10:20:57 eran kernel:  [<c01338d9>] futex_wait+0x1b9/0x1c0 (8)
Oct 26 10:20:57 eran kernel:  [<c0132b84>] 
check_preempt_timing+0x64/0x190 (80)
Oct 26 10:20:57 eran kernel:  [<c0132b84>] 
check_preempt_timing+0x64/0x190 (4)
Oct 26 10:20:57 eran kernel:  [<c01191f7>] recalc_task_prio+0xa7/0x1a0 (12)
Oct 26 10:20:57 eran kernel:  [<c0119785>] finish_task_switch+0x35/0xb0 (8)
Oct 26 10:20:57 eran kernel:  [<c011941a>] try_to_wake_up+0x8a/0xc0 (8)
Oct 26 10:20:57 eran kernel:  [<c01191f7>] recalc_task_prio+0xa7/0x1a0 (12)
Oct 26 10:20:57 eran kernel:  [<c01191f7>] recalc_task_prio+0xa7/0x1a0 (12)
Oct 26 10:20:57 eran kernel:  [<c01191f7>] recalc_task_prio+0xa7/0x1a0 (8)
Oct 26 10:20:57 eran kernel:  [<c0119785>] finish_task_switch+0x35/0xb0 (12)
Oct 26 10:20:57 eran kernel:  [<c01191f7>] recalc_task_prio+0xa7/0x1a0 (20)
Oct 26 10:20:57 eran kernel:  [<c0119785>] finish_task_switch+0x35/0xb0 (12)
Oct 26 10:20:57 eran kernel:  [<c0119e20>] 
default_wake_function+0x0/0x10 (64)
Oct 26 10:20:57 eran kernel:  [<c0119e20>] 
default_wake_function+0x0/0x10 (32)
Oct 26 10:20:57 eran kernel:  [<c0108609>] do_IRQ+0x39/0x60 (20)
Oct 26 10:20:57 eran kernel:  [<c0133b55>] do_futex+0x35/0x90 (20)
Oct 26 10:20:57 eran kernel:  [<c022cf3c>] copy_from_user+0x5c/0x90 (8)
Oct 26 10:20:57 eran kernel:  [<c0133c9a>] sys_futex+0xea/0x100 (16)
Oct 26 10:20:57 eran kernel:  [<c01060f9>] sysenter_past_esp+0x52/0x71 (56)
Oct 26 10:20:57 eran kernel: preempt count: 00000001
Oct 26 10:20:57 eran kernel: . 1-level deep critical section nesting:
Oct 26 10:20:57 eran kernel: .. entry 1: print_traces+0xd/0x40 
[<c0132f8d>] / (0x0 [<00000000>])

I also get these errors from 'tail -f /var/log/messages':
tail: cannot read realtime clock: Unknown error 516
(it seems to happen at the same time as the above traces, though less 
often).

-- 
Eran Mann
MRV International
Tel: 972-4-9936297
Fax: 972-4-9890430
www.mrv.com

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 19:40                                     ` Rui Nuno Capela
  2004-10-26  3:01                                       ` Lee Revell
@ 2004-10-26  5:28                                       ` Denis Vlasenko
  2004-10-26 10:40                                         ` Rui Nuno Capela
  1 sibling, 1 reply; 76+ messages in thread
From: Denis Vlasenko @ 2004-10-26  5:28 UTC (permalink / raw)
  To: Rui Nuno Capela; +Cc: linux-kernel

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

On Monday 25 October 2004 22:40, Rui Nuno Capela wrote:
> Ingo Molnar wrote:
> >> ok, i've added it and uploaded -V0.2 together with another fix: there
> >> was a scheduler recursion possible via the delayed-put mechanism using
> >> workqueues - now it's using its own separate lists and per-CPU
> >> threads.
> >
> > -V0.2 seems to behave quite well on my testboxes - i'm unable to
> > reproduce the selinux boot hang anymore.
> >
> 
> OK. RT-V0.2 boots on my laptop (P4/UP), sometimes ;)
> 
> I know that my early impressions are illusive, rather subjective, but I do
> feel overall behavior is getting worst, when regarding low-latency audio
> work with jackd -R.
> 
> To put things straight with RT-V0.2, I get trouble with much less load
> than even before.
> 
> I noticed that something is, now and then, topping the cpu to 99%, leaving
> the system to a crawl, eventually returning back to normal. Can't figure
> out who or what, just because ps or top are stalling to silence, only
> returning results after when the crawl ends, which are of no useful
> evidence. When I'm lucky enough to let top (and gkrellm) telling me
> something, it does look like that most of the time is spent on kernel mode
> (sys time) and none of the running processes are at stake. Puzzled. It's
> just like you're about to loose confidence on the procps tools.

<shameless plug>
Maybe this program will be useful. It is designed to give you
overall system statistics without the need to scan entire /proc/NNN
forest. Together with nice -20, it will hopefully not stall.

Compiled with dietlibc. If you will have trouble compiling it, binary is
attached too.

Latest version is 0.9 but it seems I forgot it in my home box :(
</shameless plug>
--
vda



[-- Attachment #2: nmeter --]
[-- Type: application/x-executable, Size: 9960 bytes --]

[-- Attachment #3: nmeter.c --]
[-- Type: text/x-csrc, Size: 22121 bytes --]

// Based on nanotop.c from floppyfw project
// Released under GPL
// Contact me: vda@port.imtp.ilyichevsk.odessa.ua

//TODO: 
// simplify code
// /proc/locks
// /proc/stat:
// disk_io: (3,0):(22272,17897,410702,4375,54750)
// btime 1059401962

//#include <ctype.h>
#include <sys/time.h>	// gettimeofday
#include <string.h>	// strstr etc
#include <stdarg.h>	// f(...)
#include <fcntl.h>	// O_RDONLY

#define VERSION_STR "0.7"
#define DELIM_CHAR ' '

//==============
#define NL "\n"
typedef unsigned long long ullong;
typedef unsigned long ulong;

typedef ulong sample_t;

//==============
#define proc_file_size 4096

typedef struct proc_file {
    char *name;
    int gen;
    char *file;
} proc_file;

proc_file proc_stat = { "/proc/stat", -1 };
proc_file proc_net_dev = { "/proc/net/dev", -1 };
proc_file proc_meminfo = { "/proc/meminfo", -1 };
proc_file proc_diskstats = { "/proc/diskstats", -1 };
struct timeval tv;
int gen=-1;
int is26=0;

//==============
#if 0
#include <stdio.h>
void dprintf(const char *fmt, ...) {
    va_list ap;
    va_start(ap, fmt);
    vprintf(fmt, ap);
    va_end(ap);
}
#else
extern void dprintf(const char *fmt, ...) {}
#endif

//==============
char outbuf[4096];
char *cur_outbuf = outbuf;

extern inline void reset_outbuf() {
    cur_outbuf = outbuf;
}

extern inline int outbuf_count() {
    return cur_outbuf-outbuf;
}

extern inline void print_outbuf() {
    if(cur_outbuf>outbuf) {
	write(1, outbuf, cur_outbuf-outbuf);
	cur_outbuf = outbuf;
    }
}

void put(const char *s) {
    int sz = strlen(s);
    if(sz > (outbuf+sizeof(outbuf))-cur_outbuf)
	sz = (outbuf+sizeof(outbuf))-cur_outbuf;
    memcpy(cur_outbuf, s, sz);
    cur_outbuf += sz;
}

void put_c(char c) {
    if(cur_outbuf < outbuf+sizeof(outbuf))
	*cur_outbuf++ = c;
}

//==============
char* simple_itoa(char *s, int sz, unsigned long v, int pad) {
//==============
    s += sz;
    *--s = '\0';
    while (--sz > 0) {
        *--s = "0123456789"[v%10];
        pad--;
        v /= 10;
        if(!v && pad<=0) break;
    }
    return s;
}

//==============
int readfile_z(char *buf, int sz, const char* fname) {
//==============
    int fd;
    fd=open(fname,O_RDONLY);
    if(fd<0) return 1;
    sz = read(fd,buf,sz-1);
    close(fd);
    if(sz<0) {
	buf[0]='\0';
	return 1;
    }
    buf[sz]='\0';
    return 0;
}

//==============
int rdval(const char* p, const char* key, sample_t *vec, ...) {
//==============
    va_list arg_ptr;
    int indexline;
    int indexnext;

    p = strstr(p,key);
    if(!p) return 1;
	
    p += strlen(key);
    va_start(arg_ptr, vec);
    indexline = 1;
    indexnext = va_arg(arg_ptr, int);
    while(1) {
    	while(*p==' ' || *p=='\t') p++;
	if(*p=='\n' || *p=='\0') break;

        if(indexline == indexnext) { // read this value
            *vec++ = strtoul(p, NULL, 10);
            indexnext = va_arg(arg_ptr, int);
        }
    	while(*p > ' ') p++; // skip over value
        indexline++;
    }
    va_end(arg_ptr);
    return 0;
}

//==============
int rdval_diskstats(const char* p, sample_t *vec) {
//   1    2 3   4     5     6(rd)  7      8     9     10(wr) 11      12 13    14
//   3    0 hda 51292 14441 841783 926052 25717 79650 843256 3029804 0 148459 3956933
//   3    1 hda1 0 0 0 0 <- ignore if only 4 fields
//==============
    sample_t rd;
    int indexline = 0;
    vec[0] = 0;
    vec[1] = 0;
    while(1) {
        indexline++;
        while(*p==' ' || *p=='\t') p++;
        if(*p=='\0') break;
        if(*p=='\n') {
            indexline = 0;
	    p++;
            continue;
        }
        if(indexline == 6) {
            rd = strtoul(p, NULL, 10);
        } else
        if(indexline == 10) {
            vec[0] += rd;  // TODO: *sectorsize (don't know how to find out sectorsize)
            vec[1] += strtoul(p, NULL, 10);
    	    while(*p!='\n' && *p!='\0') p++;
	    continue;
        }
        while(*p > ' ') p++; // skip over value
    }
    return 0;
}

//==============
void scale(sample_t ul) {
//==============
    char buf[5];
    int index = 0;
    ul *= 10;
    if(ul>9999*10) { // do not scale if 9999 or less
	while(ul >= 10000) {
	    ul /= 1024;
	    index++;
	}
    }

    if(!index) {/* use 1234 format */
	buf[0] = " 123456789"[ul/10000];
	if(buf[0]== ' ') buf[1] = " 123456789"[ul/1000%10];
	            else buf[1] = "0123456789"[ul/1000%10];
	if(buf[1]== ' ') buf[2] = " 123456789"[ul/100%10];
                    else buf[2] = "0123456789"[ul/100%10];
	buf[3] = "0123456789"[ul/10%10];
    } else if(ul>=100) { /* use 123k format */
	if( (buf[0]= " 123456789"[ul/1000]) == ' ')
	    buf[1] = " 123456789"[ul/100%10];
	else
	    buf[1] = "0123456789"[ul/100%10];
	buf[2] = "0123456789"[ul/10%10];
	buf[3] = " kMGTEP"[index];
    } else { /* use 1.2M format */
	buf[0] = "0123456789"[ul/10];
	buf[1] = '.';
	buf[2] = "0123456789"[ul%10];
	buf[3] = " kMGTEP"[index];
    }
    buf[4] = 0;
    put(buf);
}

//==============
const char* prepare(proc_file *pf) {
    if(!pf->file) pf->file = (char*)malloc(proc_file_size);
    if(pf->gen != gen) {
	pf->gen = gen;
	readfile_z(pf->file, proc_file_size, pf->name);
    }
    return pf->file;
}

//==============
#define S_STAT(a) \
typedef struct a { \
    struct s_stat *next; \
    int (*collect)(struct a *s); \
    const char *label; \
    int width;

S_STAT(s_stat)
} s_stat;

#define MALLOC_STAT(type,var) type *var = (type*)malloc(sizeof(type))

//==============
S_STAT(cpu_stat)
    sample_t old[4];
    int bar_sz;
    char *bar;
} cpu_stat;

//==============
int collect_cpu(cpu_stat *s) {
//==============
    sample_t data[4];
    sample_t frac[4];
    sample_t all = 0;
    int norm_all = 0;
    int bar_sz = s->bar_sz;
    char *bar = s->bar;
    int i;

    if(rdval(prepare(&proc_stat), "cpu ", data, 1, 2, 3, 4))
	return 1;
    
    put_c('[');

//dprintf("data1:");
    for(i=0; i<4; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
        s->old[i] = data[i];
        all += (data[i] -= old);
//dprintf(" %lu",data[i]);
    }
//dprintf(" all %lu\n",all);

    if(all) {
//dprintf("data2:");
	for(i=0; i<4; i++) {
	    ullong t = bar_sz*(ullong)data[i];
	    norm_all += data[i] = t / all;
	    frac[i] = t % all;
//dprintf(" %lu/%lu",data[i],frac[i]);
	}
//dprintf(" norm_all %lu\n",norm_all);
    
	while(norm_all<bar_sz) {
	    sample_t max=frac[0]; int pos=0;
	    //for(i=1; i<4; i++) if(frac[i]>=max) max=frac[i], pos=i;
	    if(frac[1]>=max) max=frac[1], pos=1;
	    if(frac[2]>=max) max=frac[2], pos=2;
	    if(frac[3]>=max) max=frac[3], pos=3;
	    frac[pos]=0;	//avoid bumping same value twice
	    data[pos]++;
//dprintf("bumped %i\n",pos);
	    norm_all++;
        }
    
//dprintf("bar_sz %i\n",bar_sz);
//dprintf("sys %i\n",data[2]);
//dprintf("usr %i\n",data[0]);
//dprintf("nice %i\n",data[1]);
	memset(bar,'.',bar_sz);
	memset(bar,'S',data[2]); bar+=data[2]; //sys
	memset(bar,'U',data[0]); bar+=data[0]; //usr
	memset(bar,'N',data[1]); bar+=data[1]; //nice
    } else {
	memset(bar,'?',bar_sz);
    }
    put(s->bar);
    put_c(']');
    return 0;
}

//==============
s_stat* init_cpu(const char *param) {
//==============
    int sz;
    MALLOC_STAT(cpu_stat,s);
    s->collect = collect_cpu;
    s->label = "cpu ";
    s->width = 4;

    sz = strtol(param, NULL, 0);
    if(sz<10) sz=10;
    if(sz>1000) sz=1000;

    s->bar = (char*)malloc(sz+1);
    s->bar[sz]=0;
    s->bar_sz = sz;
    s->width = sz+2;
    return (s_stat*)s;
}

//==============
S_STAT(int_stat)
    sample_t old;
    int no;
    char numlabel[6];
} int_stat;

//==============
int collect_int(int_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "intr", data, s->no))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_int(const char *param) {
//==============
    MALLOC_STAT(int_stat,s);
    s->collect = collect_int;
    s->width = 4;
    if(param[0]=='\0') {
	s->no = 1;
	s->label = "int ";
    } else {
	int n = strtoul(param, NULL, 0);
	s->no = n+2;
	s->label = s->numlabel;
	s->numlabel[0]='i';
	s->numlabel[1]='n';
	s->numlabel[2]='t';
	s->numlabel[3]=(n<=9 ? '0'+n : n+('A'-10));
	s->numlabel[4]=' ';
	s->numlabel[5]='\0';
    }
    return (s_stat*)s;
}

//==============
S_STAT(ctx_stat)
    sample_t old;
} ctx_stat;

//==============
int collect_ctx(ctx_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "ctxt", data, 1))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_ctx(const char *param) {
//==============
    MALLOC_STAT(ctx_stat,s);
    s->collect = collect_ctx;
    s->label = "ctx ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(blk_stat)
    const char* lookfor;
    sample_t old[2];
} blk_stat;

//==============
int collect_blk24(blk_stat *s) {
//==============
    sample_t data[2];
    int i;
    if(rdval(prepare(&proc_stat), s->lookfor, data, 1, 2))
    	return 1;

    for(i=0; i<2; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
	s->old[i] = data[i];
	data[i] -= old;
    }
    scale(data[0]*1024);
    put_c(' ');
    scale(data[1]*1024);
    return 0;
}

//==============
int collect_blk26(blk_stat *s) {
//==============
    sample_t data[2];
    int i;
    if(rdval_diskstats(prepare(&proc_diskstats), data))
	return 1;

    for(i=0; i<2; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
	s->old[i] = data[i];
	data[i] -= old;
    }
    scale(data[0]*512);
    put_c(' ');
    scale(data[1]*512);
    return 0;
}

//==============
int collect_blk(blk_stat *s) {
//==============
    if(is26) return collect_blk26(s);
    return collect_blk24(s);
}

//==============
s_stat* init_blk(const char *param) {
//==============
    MALLOC_STAT(blk_stat,s);
    s->collect = collect_blk;
    if(param[0]=='s') {
	s->label = "sio ";
	s->lookfor = "swap";
    } else {
	s->label = "bio ";
	s->lookfor = "page";
    }
    s->width = 9;
    return (s_stat*)s;
}

//==============
S_STAT(fork_stat)
    sample_t old;
} fork_stat;

//==============
int collect_fork(fork_stat *s) {
//==============
    sample_t data[1];

    if(rdval(prepare(&proc_stat), "processes", data, 1))
	return 1;

    sample_t old = s->old;
    if(data[0] < old) old = data[0];	//sanitize
    s->old = data[0];
    scale(data[0] - old);
    return 0;
}

//==============
s_stat* init_fork(const char *param) {
//==============
    MALLOC_STAT(fork_stat,s);
    s->collect = collect_fork;
    s->label = "fork";  // no trailing space: there usually <1000 forks,
    s->width = 4;       // we trade usual "fork    3" for rare "fork1234"
    return (s_stat*)s;
}

//==============
S_STAT(if_stat)
    sample_t old[4];
    const char *device;
    char *device_colon;
} if_stat;

//==============
int collect_if(if_stat *s) {
//==============
    sample_t data[4];
    int i;

    if(rdval(prepare(&proc_net_dev), s->device_colon, data, 1, 3, 9, 11))
	return 1;

    //dprintf("data1:");
    for(i=0; i<4; i++) {
	sample_t old = s->old[i];
	if(data[i] < old) old = data[i];	//sanitize
        s->old[i] = data[i];
        data[i] -= old;
	//dprintf(" %lu",data[i]);
    }
    //dprintf("\n");
    
    put_c(data[1] ? '*' : ' ');
    scale(data[0]);
    put_c(data[3] ? '*' : ' ');
    scale(data[2]);
    return 0;
}

//==============
s_stat* init_if(const char *device) {
//==============
    MALLOC_STAT(if_stat,s);
    s->collect = collect_if;
    s->label = device;
    s->width = 10;
    
    s->device = device;
    s->device_colon = (char*)malloc(strlen(device)+2);
    strcpy(s->device_colon,device);
    strcat(s->device_colon,":");
    return (s_stat*)s;
}

//==============
S_STAT(mem_stat)
    char opt;
} mem_stat;

//==============
int collect_mem(mem_stat *s) {
//==============
//        total:    used:    free:  shared: buffers:  cached:
//Mem:  29306880 21946368  7360512        0  2101248 11956224
//Swap: 100655104 10207232 90447872
//MemTotal:        28620 kB
//MemFree:          7188 kB
//MemShared:           0 kB  <-- ?
//Buffers:          2052 kB
//Cached:           9080 kB
//SwapCached:       2596 kB  <-- ?

    // Not available in 2.6:
    //if(rdval(prepare(&proc_meminfo), "Mem:", data, 1, 2, 5, 6))
    //    return 1;
    sample_t m_total;
    sample_t m_free;
    sample_t m_bufs;
    sample_t m_cached;
    if(rdval(prepare(&proc_meminfo), "MemTotal:", &m_total , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "MemFree:",  &m_free  , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "Buffers:",  &m_bufs  , 1)) return 1;
    if(rdval(prepare(&proc_meminfo), "Cached:",   &m_cached, 1)) return 1;
    switch(s->opt) {
    case 'f':
        scale((m_free + m_bufs + m_cached)<<10); break;
    case 't':
        scale(m_total<<10); break;
    default:
        scale((m_total - m_free - m_bufs - m_cached)<<10); break;
    }
    return 0;
}

//==============
s_stat* init_mem(const char *param) {
//==============
    MALLOC_STAT(mem_stat,s);
    s->collect = collect_mem;
    s->width = 4;
    s->opt=param[0];
    switch(param[0]) {
    case 'f':
	s->label = "free "; break;
    case 't':
	s->label = "tot "; break;
    default:
	s->label = "mem "; break;
    }
    return (s_stat*)s;
}

//==============
S_STAT(swp_stat)
} swp_stat;

//==============
int collect_swp(swp_stat *s) {
//==============
    sample_t data[1];
    if(rdval(prepare(&proc_meminfo), "Swap:", data, 2))
	return 1;
	
    scale(data[0]);
    return 0;
}

//==============
s_stat* init_swp(const char *param) {
//==============
    MALLOC_STAT(swp_stat,s);
    s->collect = collect_swp;
    s->label = "swp ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(fd_stat)
} fd_stat;

//==============
int collect_fd(fd_stat *s) {
//==============
    char file[4096];
    sample_t data[2];

    readfile_z(file, sizeof(file), "/proc/sys/fs/file-nr");
    if(rdval(file, "", data, 1, 2))
	return 1;

    scale(data[0]-data[1]);
    return 0;
}

//==============
s_stat* init_fd(const char *param) {
//==============
    MALLOC_STAT(fd_stat,s);
    s->collect = collect_fd;
    s->label = "fd ";
    s->width = 4;
    return (s_stat*)s;
}

//==============
S_STAT(time_stat)
    int prec;
    int scale;
} time_stat;

//==============
int collect_time(time_stat *s) {
//==============
    char buf[16];	// 12:34:56.123456<eol>
			// 1234567890123456
    simple_itoa(buf, 3, tv.tv_sec/(60*60)%24, 2);
    buf[2] = ':';
    simple_itoa(buf+3, 3, tv.tv_sec/60%60, 2);
    buf[5] = ':';
    simple_itoa(buf+6, 3, tv.tv_sec%60, 2);
    
    if(s->prec) {
	buf[8] = '.';
	//simple_itoa(buf+9, s->prec+1, (tv.tv_usec + s->scale/2) / s->scale, s->prec);
	// (fixme: round up seconds too!)
	// so... rounding omitted! just use more prec if you need it! ;)
	simple_itoa(buf+9, s->prec+1, tv.tv_usec / s->scale, s->prec);
    }
    put(buf);
    return 0;
}

//==============
s_stat* init_time(const char *param) {
//==============
    int prec;
    MALLOC_STAT(time_stat,s);
    s->collect = collect_time;
    s->label = "";
    prec = param[0]-'0';
    if(prec<0) prec = 0;
    else if(prec>6) prec = 6;
    s->width = 8+prec + (prec!=0);
    s->prec = prec;
    s->scale = 1;
    while(prec++ < 6)
	s->scale *= 10;
    return (s_stat*)s;
}

//==============
S_STAT(extern_stat)
    int ifd,ofd;
    char *buf;
    char *cur;
} extern_stat;

#define WIDTH

//==============
int collect_extern(extern_stat *s) {
//==============
    int sz;
    char *p;
    int buffered = s->cur - s->buf;
    
    s->buf[40] = 0;
    p = strchr(s->buf,'\n');
    if(!p || p > s->cur) {
	do {
	    sz = read(s->ofd,s->cur,40 - buffered);
	    if(sz<0) exit(1);
	    buffered += sz;
	    p = strchr(s->cur,'\n');
	    s->cur = s->buf+buffered;
	    if(p > s->cur) p=0;
	} while(!p && buffered<40);
	if(!p) p=s->buf+40;
    }
    
    *p++ = 0;
    put(s->buf);
    s->cur = s->buf;
    while(p < s->buf+buffered) {
	put_c('=');
	*s->cur++ = *p++;
    }
    while(p <= s->buf+40) {
	put_c('='); p++;
    }
    return 0;
}

//#include <stdio.h>

void myexec(void *param) {
    char **argv = (char **)param;
    execv(argv[0], argv);
}

int start_child(int *i,int *o,void (*f)(void*),void *param) {
    int pid;
//printf("execv(%s, argv);\n",((char**)param)[0]);
    {
	int in[2];
	int out[2];
	pipe(in);
	pipe(out);
	pid = fork();
	switch(pid) {
	case -1: /* error */
	    return -1;
	case 0: /* child */
	    dup2(in[0],0); close(in[0]); close(in[1]);
	    dup2(out[1],1); close(out[0]); close(out[1]);
	    f(param);
	    exit(1);
	default: /* parent */
	    close(in[0]);
	    if(i) *i=in[1]; else close(in[1]);
	    if(o) *o=out[0]; else close(out[0]);
	    close(out[1]); 
	    return pid;
	}
    }
}

//==============
s_stat* init_extern(const char *param) {
//==============
    int pid;
    char *argv[] = { (char*)param, 0 };
    MALLOC_STAT(extern_stat,s);
    s->collect = collect_extern;
    s->label = "extern ";
    s->width = 40;
    s->buf = (char*)malloc(41);
    s->cur = s->buf;
    pid = start_child(&s->ifd, &s->ofd, myexec, argv);
    if(pid<0) exit(1);
//printf("pid,i,o=%d %d %d\n",pid,s->ifd,s->ofd);
    return (s_stat*)s;
}

//==============
char *header;
//==============
void build_n_put_hdr(s_stat *s) {
//==============
    while(s) {
	int l = 0;
        if(s->label[0]!=' ') {
    	    put(s->label);
	    l = strlen(s->label);
	}
	while(l <= s->width) {
	    put_c(' ');	
	    l++;
	}
        s = s->next;
    }
    put_c('\n');

    header = (char*)malloc(outbuf_count()+1);
    memcpy(header, outbuf, outbuf_count());
    header[outbuf_count()] = '\0';
    //print_outbuf();
}

//==============
void put_hdr(s_stat *s) {
//==============
    if(!header) build_n_put_hdr(s);
    else {
	put(header);
	//print_outbuf();
    }
}

//==============
void run_once(s_stat *s, int without_headers) {
//==============
    gen++;
    int first = 1;
    while(s) {
	if(s->label[0]!=' ') {		// "[prev ][LABEL]data
	    if(!first) put_c(DELIM_CHAR);
    	    if(!without_headers) put(s->label);
	} else {			// "prevLABELdata
	    put(s->label+1);
	}
        if(s->collect(s)) {
	    int w = s->width;
	    while(w-- > 0)
		put_c('?');
	}
        s = s->next;
	first = 0;
    }
}

//==============
typedef s_stat* init_func(const char *param);

const char options[] = "ncmsfixptbe";
init_func* init_functions[] = {
    init_if,  
    init_cpu, 
    init_mem, 
    init_swp, 
    init_fd,  
    init_int, 
    init_ctx, 
    init_fork,
    init_time,
    init_blk,
    init_extern,
};

//==============
int main(int argc, char* argv[]) {
//==============
    struct timezone tz;
    s_stat *first = 0;
    s_stat *last = 0;
    s_stat *s;
    int delta = 1000000;
    int deltanz = 1000000;
    int print_headers = 0;
    char *final_str = "\n";
    char *p;
    int fd;
    int i;
    
    if(argc==1) {
	put(
	"nmeter " VERSION_STR " allows you to monitor your system in real time" NL
	NL
	"Options:" NL
	"c[N]	monitor CPU. N - bar size, default 10" NL
	"nIFACE	monitor network interface IFACE" NL
	"m[f/t]	monitor allocated/free/total memory" NL
	"s	monitor allocated swap" NL
	"f	monitor number of used filedescriptors" NL
	"i[NN]	monitor total/specific IRQ rate" NL
	"x	monitor context switch rate" NL
	"p	monitor process creation rate" NL
	"b[s]	monitor block io (swap io)" NL
	"t[N]	show time (with N decimal points)" NL
	"d[N]	milliseconds between updates. Default 1000" NL
	"h[N]	print headers above numbers (each N lines, default once)" NL
	"lLABEL	specify label for previous item" NL
	"LLABEL	same + label will be printed without surrounding blanks" NL
	"r	print <cr> instead of <lf> at EOL. Try it ;)" NL
	);
	print_outbuf();
	return 0;
    }

    fd = open("/proc/version",O_RDONLY);
    if(fd>=0) {
	char buf[32];
	if(0<read(fd,buf,sizeof(buf)))
	    is26 = (strstr(buf,"Linux version 2.6.")!=NULL);
	close(fd);
    }
    for(i=1; i<argc; i++) {
	p = strchr(options,argv[i][0]);
	if(p) {
	    s = init_functions[p-options](argv[i]+1);
	    if(s) {
		s->next = 0;
		if(!first)
		    first = s;
		else
		    last->next = s;
		last = s;
	    }
	}

// You have to see it... gcc 3.2 coded switch() as 40 element jump table
// OH NO! >>>:^O
/*
#define SW(a) switch(a) {
#define ENDSW }
#define CASE(a,b) case (b): {
#define ENDCASE }
*/
#define SW(a) do {
#define ENDSW } while(0);
#define CASE(a,b) if((a)==(b)) {
#define ENDCASE }
	SW(argv[i][0])
	CASE(argv[i][0],'r')
	    final_str = "\r";
	    break;
	ENDCASE
	CASE(argv[i][0],'d')
	    delta = strtol(argv[i]+1, NULL, 0)*1000;
	    deltanz = delta>0? delta : 1;
	    break;
	ENDCASE
	CASE(argv[i][0],'h')
	    if(argv[i][1]=='\0')
		print_headers = -1;
	    else
		print_headers = strtol(argv[i]+1, NULL, 0);
	    break;
	ENDCASE
	CASE(argv[i][0],'l')
	    if(last)
		last->label=argv[i]+1;
	    break;
	ENDCASE
	CASE(argv[i][0],'L')
	    if(last) {
		argv[i][0]=' ';
		last->label=argv[i];
	    }
	    break;
	ENDCASE
	ENDSW
    }
	
    if(print_headers == -1) {
	build_n_put_hdr(first);
	print_outbuf();
    }
    run_once(first, print_headers);
    reset_outbuf();
    if(delta>=0) {
	//gettimeofday(&tv,0);
	gettimeofday(&tv,&tz); //
	usleep(delta>1000000 ? 1000000 : delta-tv.tv_usec%deltanz);
    }
    while(1) {
	gettimeofday(&tv,&tz);
        tv.tv_sec -= tz.tz_minuteswest*60;

	if(print_headers > 0 && gen%print_headers == 0)
	    put_hdr(first);
	run_once(first, print_headers);
	put(final_str);
	print_outbuf();

	// Negative delta -> no usleep at all
	// This will hog the CPU but you can have REALLY GOOD
	// time resolution ;)
	// TODO: detect and avoid useless updates
	// (like: nothing happens except time)
        if(delta>=0) {
	    int rem = delta - ((ullong)tv.tv_sec*1000000+tv.tv_usec)%deltanz;
	    // Sometimes kernel wakes us up just a tiny bit earlier than asked
	    // Do not go to very short sleep in this case
	    if(rem < delta/128) {
		rem += delta;
	    }
	    usleep(rem);
	}
    }

    return 0;
}

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  3:01                                       ` Lee Revell
  2004-10-26  3:11                                         ` K.R. Foley
@ 2004-10-26  5:11                                         ` Fernando Pablo Lopez-Lezcano
  2004-10-26 17:25                                           ` Lee Revell
  1 sibling, 1 reply; 76+ messages in thread
From: Fernando Pablo Lopez-Lezcano @ 2004-10-26  5:11 UTC (permalink / raw)
  To: Lee Revell
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, K.R. Foley,
	linux-kernel, mark_h_johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Alexander Batyrshin,
	Fernando Pablo Lopez-Lezcano

On Mon, 2004-10-25 at 20:01, Lee Revell wrote: 
> On Mon, 2004-10-25 at 20:40 +0100, Rui Nuno Capela wrote:
> > OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
> > relevant IRQ thread handlers to be always higher than jackd's.
> 
> Actually they should be lower, except the soundcard.  I was only able to
> get the xrun free behavior of T3 by setting all IRQ threads except the
> soundcard to SCHED_OTHER.  Especially important was setting ksoftirqd to
> SCHED_OTHER, this actually may have been the only one necessary.
> 
> The relative priorities of jackd and the soundcard irq do not matter as
> these two should never contend (aka they are never both runnable at the
> same time).

What happens when one is blessed with a laptop where everything is
sharing an interrupt?

$ cat /proc/interrupts
           CPU0
  0:    2372239          XT-PIC  timer  0/72239
  1:       5362          XT-PIC  i8042  0/5362
  2:          0          XT-PIC  cascade  0/0
  8:          1          XT-PIC  rtc  0/1
  9:     616176          XT-PIC  acpi, uhci_hcd, uhci_hcd, uhci_hcd,
eth0, yenta, yenta, Intel 82801CA-ICH3, radeon@PCI:1:0:0  0/16176
11:         37          XT-PIC  sonypi  0/35
12:      28392          XT-PIC  i8042  0/28392
14:      21078          XT-PIC  ide0  0/21078
15:        472          XT-PIC  ide1  0/472
NMI:          0
LOC:          0
ERR:          0
MIS:          0

I'm running U10.3 and I'm consistently seeing xruns when Jack clients
start and stop, something I would not see before (I have not tried the
latest V series yet). I have tried changing the priority of IRQ9 and the
scheduler but I still see the xruns. Yesterday I tried enabling
preempt_thresh to a low value but did not see hits when the xruns
occurred. Maybe I'm missing something I need to do...

-- Fernando



^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  3:58                                           ` Lee Revell
@ 2004-10-26  4:15                                             ` K.R. Foley
  0 siblings, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-26  4:15 UTC (permalink / raw)
  To: Lee Revell
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, linux-kernel,
	mark_h_johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Lee Revell wrote:
> On Mon, 2004-10-25 at 22:11 -0500, K.R. Foley wrote:
> 
>> 
>>Not being familiar with jack, does it use rtc?
>>
> 
> 
> No it normally uses the soundcard for timing.  For testing there is a
> dummy backend that just usleep()s.  This makes a pretty useful latency
> tester.
> 
> Lee
> 
> 
Just wondered. I am writing an email right now about my results with
V0.2, one of which happens to be that amlat will kill any of my systems
running it.

kr


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  3:11                                         ` K.R. Foley
@ 2004-10-26  3:58                                           ` Lee Revell
  2004-10-26  4:15                                             ` K.R. Foley
  0 siblings, 1 reply; 76+ messages in thread
From: Lee Revell @ 2004-10-26  3:58 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, linux-kernel,
	mark_h_johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 2004-10-25 at 22:11 -0500, K.R. Foley wrote:
>  
> Not being familiar with jack, does it use rtc?
> 

No it normally uses the soundcard for timing.  For testing there is a
dummy backend that just usleep()s.  This makes a pretty useful latency
tester.

Lee


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-26  3:01                                       ` Lee Revell
@ 2004-10-26  3:11                                         ` K.R. Foley
  2004-10-26  3:58                                           ` Lee Revell
  2004-10-26  5:11                                         ` Fernando Pablo Lopez-Lezcano
  1 sibling, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-26  3:11 UTC (permalink / raw)
  To: Lee Revell
  Cc: Rui Nuno Capela, Ingo Molnar, Florian Schmidt, linux-kernel,
	mark_h_johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Lee Revell wrote:
> On Mon, 2004-10-25 at 20:40 +0100, Rui Nuno Capela wrote:
> 
>>OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
>>relevant IRQ thread handlers to be always higher than jackd's.
> 
> 
> Actually they should be lower, except the soundcard.  I was only able to
> get the xrun free behavior of T3 by setting all IRQ threads except the
> soundcard to SCHED_OTHER.  Especially important was setting ksoftirqd to
> SCHED_OTHER, this actually may have been the only one necessary.
> 
> The relative priorities of jackd and the soundcard irq do not matter as
> these two should never contend (aka they are never both runnable at the
> same time).
> 
> Lee 
> 
> 
Not being familiar with jack, does it use rtc?

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 19:40                                     ` Rui Nuno Capela
@ 2004-10-26  3:01                                       ` Lee Revell
  2004-10-26  3:11                                         ` K.R. Foley
  2004-10-26  5:11                                         ` Fernando Pablo Lopez-Lezcano
  2004-10-26  5:28                                       ` Denis Vlasenko
  1 sibling, 2 replies; 76+ messages in thread
From: Lee Revell @ 2004-10-26  3:01 UTC (permalink / raw)
  To: Rui Nuno Capela
  Cc: Ingo Molnar, Florian Schmidt, K.R. Foley, linux-kernel,
	mark_h_johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 2004-10-25 at 20:40 +0100, Rui Nuno Capela wrote:
> OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
> relevant IRQ thread handlers to be always higher than jackd's.

Actually they should be lower, except the soundcard.  I was only able to
get the xrun free behavior of T3 by setting all IRQ threads except the
soundcard to SCHED_OTHER.  Especially important was setting ksoftirqd to
SCHED_OTHER, this actually may have been the only one necessary.

The relative priorities of jackd and the soundcard irq do not matter as
these two should never contend (aka they are never both runnable at the
same time).

Lee 


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 10:40                   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
                                       ` (2 preceding siblings ...)
  2004-10-25 21:47                     ` Michal Schmidt
@ 2004-10-25 23:04                     ` Remi Colinet
  3 siblings, 0 replies; 76+ messages in thread
From: Remi Colinet @ 2004-10-25 23:04 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	K.R. Foley, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:

>i have released the -V0 Real-Time Preemption patch, which can be
>downloaded from:
>
>  http://redhat.com/~mingo/realtime-preempt/
>  
>

I'am facing three different BUG messages :


Oct 26 01:32:46 tigre02 kernel: BUG: sleeping function called from 
invalid context kpnpbiosd(229) at kernel/mutex.c:28
Oct 26 01:32:46 tigre02 kernel: in_atomic():1 [00000001], irqs_disabled():0
Oct 26 01:32:46 tigre02 kernel:  [<c0121c4a>] __might_sleep+0xca/0xe0 (12)
Oct 26 01:32:46 tigre02 kernel:  [<c013e268>] _mutex_lock+0x38/0x50 (36)
Oct 26 01:32:46 tigre02 kernel:  [<c013e2d6>] 
_mutex_lock_irqsave+0x16/0x20 (24)
Oct 26 01:32:46 tigre02 kernel:  [<c02e5237>] 
pnp_bios_dock_station_info+0x97/0x1f0 (12)
Oct 26 01:32:46 tigre02 kernel:  [<c02e4371>] pnp_dock_thread+0x81/0x100 
(48)
Oct 26 01:32:46 tigre02 kernel:  [<c02e42f0>] pnp_dock_thread+0x0/0x100 (16)
Oct 26 01:32:46 tigre02 kernel:  [<c01033f9>] 
kernel_thread_helper+0x5/0xc (16)
Oct 26 01:32:46 tigre02 kernel: preempt count: 00000002
Oct 26 01:32:46 tigre02 kernel: . 2-level deep critical section nesting:
Oct 26 01:32:46 tigre02 kernel: .. entry 1: 
pnp_bios_dock_station_info+0x4f/0x1f0 [<c02e51ef>] / 
(pnp_dock_thread+0x81/0x100 [<c02e4371>])
Oct 26 01:32:46 tigre02 kernel: .. entry 2: print_traces+0x1d/0x60 
[<c013fa7d>] / (dump_stack+0x23/0x30 [<c01064d3>])
Oct 26 01:32:46 tigre02 kernel:


Oct 26 01:32:45 tigre02 kernel: BUG: using smp_processor_id() in 
preemptible [00000001] code: usb.agent/1479
Oct 26 01:32:45 tigre02 kernel: caller is store_stackinfo+0x5d/0xb0
Oct 26 01:32:45 tigre02 kernel:  [<c011f0d7>] smp_processor_id+0xb7/0xc0 
(12)
Oct 26 01:32:45 tigre02 kernel:  [<c0158fcd>] store_stackinfo+0x5d/0xb0 (8)
Oct 26 01:32:45 tigre02 kernel:  [<c0158fcd>] store_stackinfo+0x5d/0xb0 (24)
Oct 26 01:32:45 tigre02 kernel:  [<c015ac1a>] 
cache_free_debugcheck+0x1aa/0x390 (28)
Oct 26 01:32:45 tigre02 kernel:  [<c018446e>] __user_walk+0x5e/0x80 (12)
Oct 26 01:32:45 tigre02 kernel:  [<c015bba3>] kmem_cache_free+0x33/0xf0 (4)
Oct 26 01:32:45 tigre02 kernel:  [<c0116454>] mcount+0x14/0x18 (8)
Oct 26 01:32:45 tigre02 kernel:  [<c015bbb6>] kmem_cache_free+0x46/0xf0 (28)
Oct 26 01:32:45 tigre02 kernel:  [<c018446e>] __user_walk+0x5e/0x80 (12)
Oct 26 01:32:45 tigre02 kernel:  [<c018446e>] __user_walk+0x5e/0x80 (20)
Oct 26 01:32:45 tigre02 kernel:  [<c017e323>] vfs_stat+0x23/0x60 (32)
Oct 26 01:32:45 tigre02 kernel:  [<c013e8cd>] __mcount+0x1d/0x30 (56)
Oct 26 01:32:45 tigre02 kernel:  [<c017eaae>] sys_stat64+0xe/0x50 (4)
Oct 26 01:32:45 tigre02 kernel:  [<c0105541>] 
sysenter_past_esp+0x52/0x71 (4)
Oct 26 01:32:45 tigre02 kernel:  [<c0116454>] mcount+0x14/0x18 (8)
Oct 26 01:32:45 tigre02 kernel:  [<c017eac0>] sys_stat64+0x20/0x50 (20)
Oct 26 01:32:45 tigre02 kernel:  [<c0291659>] copy_to_user+0x69/0x80 (24)
Oct 26 01:32:45 tigre02 kernel:  [<c01339eb>] 
sys_rt_sigprocmask+0x9b/0xf0 (28)
Oct 26 01:32:45 tigre02 kernel:  [<c0105541>] 
sysenter_past_esp+0x52/0x71 (48)
Oct 26 01:32:45 tigre02 kernel: preempt count: 00000002
Oct 26 01:32:45 tigre02 kernel: . 2-level deep critical section nesting:
Oct 26 01:32:45 tigre02 kernel: .. entry 1: smp_processor_id+0x5f/0xc0 
[<c011f07f>] / (store_stackinfo+0x5d/0xb0 [<c0158fcd>])
Oct 26 01:32:46 tigre02 kernel: .. entry 2: print_traces+0x1d/0x60 
[<c013fa7d>] / (dump_stack+0x23/0x30 [<c01064d3>])
Oct 26 01:32:46 tigre02 kernel:


Oct 26 01:32:46 tigre02 kernel: BUG: using smp_processor_id() in 
preemptible [00000001] code: rc.sysinit/1628
Oct 26 01:32:46 tigre02 kernel: caller is store_stackinfo+0x5d/0xb0
Oct 26 01:32:46 tigre02 kernel:  [<c011f0d7>] smp_processor_id+0xb7/0xc0 
(12)
Oct 26 01:32:46 tigre02 kernel:  [<c0158fcd>] store_stackinfo+0x5d/0xb0 (8)
Oct 26 01:32:46 tigre02 kernel:  [<c0158fcd>] store_stackinfo+0x5d/0xb0 (24)
Oct 26 01:32:46 tigre02 kernel:  [<c015ac1a>] 
cache_free_debugcheck+0x1aa/0x390 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c0121d4c>] free_task+0x1c/0x40 (12)
Oct 26 01:32:46 tigre02 kernel:  [<c015bd2e>] kfree+0x5e/0x120 (4)
Oct 26 01:32:46 tigre02 kernel:  [<c0116454>] mcount+0x14/0x18 (8)
Oct 26 01:32:46 tigre02 kernel:  [<c015bd41>] kfree+0x71/0x120 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c0121d4c>] free_task+0x1c/0x40 (12)
Oct 26 01:32:46 tigre02 kernel:  [<c0121d4c>] free_task+0x1c/0x40 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c0126f9c>] release_task+0xec/0x1a0 (20)
Oct 26 01:32:46 tigre02 kernel:  [<c0129617>] 
wait_task_zombie+0x4b7/0x5d0 (40)
Oct 26 01:32:46 tigre02 kernel:  [<c013e8cd>] __mcount+0x1d/0x30 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c0271ed8>] dummy_task_wait+0x8/0x10 (4)
Oct 26 01:32:46 tigre02 kernel:  [<c0128ed1>] eligible_child+0x71/0xf0 (4)
Oct 26 01:32:46 tigre02 kernel:  [<c0116454>] mcount+0x14/0x18 (8)
Oct 26 01:32:46 tigre02 kernel:  [<c0271ed8>] dummy_task_wait+0x8/0x10 (20)
Oct 26 01:32:46 tigre02 kernel:  [<c012a1ce>] do_wait+0x4ae/0x590 (24)
Oct 26 01:32:46 tigre02 kernel:  [<c0291501>] 
__copy_to_user_ll+0x11/0x80 (40)
Oct 26 01:32:46 tigre02 kernel:  [<c011f1b0>] 
default_wake_function+0x0/0x20 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c011f1b0>] 
default_wake_function+0x0/0x20 (32)
Oct 26 01:32:46 tigre02 kernel:  [<c012a3bc>] sys_waitpid+0x2c/0x30 (12)
Oct 26 01:32:46 tigre02 kernel:  [<c0116454>] mcount+0x14/0x18 (8)
Oct 26 01:32:46 tigre02 kernel:  [<c012a388>] sys_wait4+0x48/0x50 (20)
Oct 26 01:32:46 tigre02 kernel:  [<c012a3bc>] sys_waitpid+0x2c/0x30 (28)
Oct 26 01:32:46 tigre02 kernel:  [<c0105541>] 
sysenter_past_esp+0x52/0x71 (24)
Oct 26 01:32:46 tigre02 kernel: preempt count: 00000002
Oct 26 01:32:46 tigre02 kernel: . 2-level deep critical section nesting:
Oct 26 01:32:47 tigre02 kernel: .. entry 1: smp_processor_id+0x5f/0xc0 
[<c011f07f>] / (store_stackinfo+0x5d/0xb0 [<c0158fcd>])
Oct 26 01:32:47 tigre02 kernel: .. entry 2: print_traces+0x1d/0x60 
[<c013fa7d>] / (dump_stack+0x23/0x30 [<c01064d3>])
Oct 26 01:32:47 tigre02 kernel:

The kernel is stable (X started).

Remi

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 10:40                   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
  2004-10-25 11:08                     ` K.R. Foley
  2004-10-25 18:52                     ` K.R. Foley
@ 2004-10-25 21:47                     ` Michal Schmidt
  2004-10-25 23:04                     ` Remi Colinet
  3 siblings, 0 replies; 76+ messages in thread
From: Michal Schmidt @ 2004-10-25 21:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	K.R. Foley, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> i have released the -V0 Real-Time Preemption patch, which can be
> downloaded from:
> 
>   http://redhat.com/~mingo/realtime-preempt/

I'm testing -V0.2. I'm getting reproducible deadlocks very soon after I 
start anything talking to network (firefox, links, licq).
Example with links:

BUG: semaphore recursion deadlock detected!
.. current task links/4724 is already holding c0430840.
  [<c01c7546>] __rwsem_deadlock+0x176/0x190 (12)
  [<c02cb966>] down_write+0x116/0x250 (20)
  [<c01c743c>] __rwsem_deadlock+0x6c/0x190 (28)
  [<c02cb839>] down_read+0x39/0x50 (20)
  [<c02cb8b2>] down_write+0x62/0x250 (4)
  [<c02cb966>] down_write+0x116/0x250 (24)
  [<c02cb839>] down_read+0x39/0x50 (48)
  [<c0114310>] mcount+0x14/0x18 (12)
  [<c0271c91>] dev_queue_xmit_nit+0x41/0x130 (28)
  [<c01c7bf6>] up_write+0x26/0x60 (12)
  [<c0281443>] qdisc_restart+0x223/0x250 (24)
  [<c027221d>] dev_queue_xmit+0x1ad/0x260 (12)
  [<c0114310>] mcount+0x14/0x18 (8)
  [<c027222f>] dev_queue_xmit+0x1bf/0x260 (36)
  [<c027856e>] neigh_resolve_output+0xfe/0x240 (32)
  [<c029327e>] ip_finish_output2+0xbe/0x240 (56)
  [<c027dc45>] nf_hook_slow+0xd5/0x130 (36)
  [<c02931c0>] ip_finish_output2+0x0/0x240 (28)
  [<c0290a8b>] ip_finish_output+0x26b/0x270 (32)
  [<c02931c0>] ip_finish_output2+0x0/0x240 (24)
  [<c02931aa>] dst_output+0x1a/0x30 (32)
  [<c027dc45>] nf_hook_slow+0xd5/0x130 (12)
  [<c0293190>] dst_output+0x0/0x30 (28)
  [<c029114a>] ip_queue_xmit+0x45a/0x570 (32)
  [<c0293190>] dst_output+0x0/0x30 (24)
  [<c0135c75>] sub_preempt_count+0x65/0xd0 (24)
  [<c01c79f8>] __up_write+0x148/0x320 (8)
  [<c0135708>] check_preempt_timing+0x58/0x2e0 (8)
  [<c0135c75>] sub_preempt_count+0x65/0xd0 (4)
  [<c01c79f8>] __up_write+0x148/0x320 (4)
  [<c0134f9d>] __mcount+0x1d/0x20 (28)
  [<c01c727e>] rwsem_owner_del+0xe/0x120 (4)
  [<c0134f9d>] __mcount+0x1d/0x20 (52)
  [<c02a875e>] tcp_v4_send_check+0xe/0xf0 (4)
  [<c02a2259>] tcp_transmit_skb+0x439/0x880 (4)
  [<c0114310>] mcount+0x14/0x18 (8)
  [<c02a879f>] tcp_v4_send_check+0x4f/0xf0 (20)
  [<c02a2302>] tcp_transmit_skb+0x4e2/0x880 (32)
  [<c0114310>] mcount+0x14/0x18 (28)
  [<c02a4f96>] tcp_send_ack+0xa6/0xf0 (52)
  [<c0297ccc>] tcp_recvmsg+0x2ec/0x750 (36)
  [<c0134f9d>] __mcount+0x1d/0x20 (20)
  [<c0114310>] mcount+0x14/0x18 (44)
  [<c026bb59>] sock_common_recvmsg+0x59/0x70 (20)
  [<c0267f78>] sock_aio_read+0xf8/0x110 (48)
  [<c0114310>] mcount+0x14/0x18 (100)
  [<c015e7fa>] do_sync_read+0xaa/0xe0 (20)
  [<c01344a0>] autoremove_wake_function+0x0/0x60 (116)
  [<c01c11b8>] dummy_file_permission+0x8/0x10 (12)
  [<c015e8d6>] vfs_read+0xa6/0x140 (4)
  [<c015e933>] vfs_read+0x103/0x140 (36)
  [<c0114310>] mcount+0x14/0x18 (24)
  [<c015ebe0>] sys_read+0x50/0x80 (20)
  [<c010527b>] syscall_call+0x7/0xb (44)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: down_write+0x249/0x250 [<c02cba99>] / (down_read+0x39/0x50 
[<c02cb839>])
.. entry 2: print_traces+0x1d/0x90 [<c0135fcd>] / (dump_stack+0x23/0x30 
[<c01060b3>])

BUG: circular semaphore deadlock: ksoftirqd/0/2 is blocked on c0430840, 
deadlocking links/4724
f7c2be00 00000046 f7c24020 c03bfd60 00000202 00001db4 f7c2a000 f7c24020
        f7c24020 f7c2bdec 00000227 e443e1ce 0000001d f7c24020 f7c242b4 
f7c2a000
        f7c24020 f7c24020 f7c2be24 c02ca79f f7c2be24 00000086 c03e3b00 
c02cb9d0
Call Trace:
  [<c02ca79f>] schedule+0x2f/0xe0 (80)
  [<c02cb9d0>] down_write+0x180/0x250 (16)
  [<c02cb9b1>] down_write+0x161/0x250 (20)
  [<c02cb839>] down_read+0x39/0x50 (48)
  [<c0114310>] mcount+0x14/0x18 (12)
  [<c027db97>] nf_hook_slow+0x27/0x130 (28)
  [<c0134f9d>] __mcount+0x1d/0x20 (24)
  [<c028d4ee>] ip_rcv+0xe/0x540 (4)
  [<c027274d>] netif_receive_skb+0x12d/0x240 (4)
  [<c0114310>] mcount+0x14/0x18 (8)
  [<c028d940>] ip_rcv+0x460/0x540 (20)
  [<c028dbc0>] ip_rcv_finish+0x0/0x300 (24)
  [<c0114310>] mcount+0x14/0x18 (8)
  [<c027274d>] netif_receive_skb+0x12d/0x240 (28)
  [<c0270008>] gnet_stats_start_copy+0x18/0x40 (20)
  [<c0272a7f>] net_rx_action+0x7f/0x1a0 (4)
  [<c0114310>] mcount+0x14/0x18 (8)
  [<c02728e8>] process_backlog+0x88/0x1a0 (20)
  [<c0272a7f>] net_rx_action+0x7f/0x1a0 (40)
  [<c01237c7>] ___do_softirq+0x87/0xd0 (36)
  [<c0123898>] _do_softirq+0x8/0x30 (8)
  [<c0123c84>] ksoftirqd+0xb4/0x100 (4)
  [<c01238b0>] _do_softirq+0x20/0x30 (28)
  [<c0123c84>] ksoftirqd+0xb4/0x100 (8)
  [<c0133eea>] kthread+0xaa/0xb0 (24)
  [<c0123bd0>] ksoftirqd+0x0/0x100 (20)
  [<c0133e40>] kthread+0x0/0xb0 (12)
  [<c0103319>] kernel_thread_helper+0x5/0xc (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __schedule+0x4e/0x5f0 [<c02ca1ce>] / (schedule+0x2f/0xe0 
[<c02ca79f>])
.. entry 2: __schedule+0xdd/0x5f0 [<c02ca25d>] / (schedule+0x2f/0xe0 
[<c02ca79f>])


Michal

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 18:52                     ` K.R. Foley
  2004-10-25 20:38                       ` Ingo Molnar
@ 2004-10-25 21:41                       ` Esben Nielsen
  1 sibling, 0 replies; 76+ messages in thread
From: Esben Nielsen @ 2004-10-25 21:41 UTC (permalink / raw)
  To: K.R. Foley
  Cc: Ingo Molnar, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

I see the same problem. It courses no problems. I _think_ the enable_irq()
call have to be removed. I mailed the list about but nobody answered. I am
rather new to Linux kernel programming so I am not sure...

Esben


On Mon, 25 Oct 2004, K.R. Foley wrote:

> Ingo Molnar wrote:
> > i have released the -V0 Real-Time Preemption patch, which can be
> > downloaded from:
> > 
> >   http://redhat.com/~mingo/realtime-preempt/
> > 
> 
> Actually pertaining to V0.2. I just got my UP system booted up on V0.2 
> and got this in the log. I did notice that this is not new to this 
> release. It has been here at least since U10.3. Sorry I didn't catch it 
> sooner.
> 
> Oct 25 13:31:56 daffy kernel: IRQ#11 thread RT prio: 43.
> Oct 25 13:31:56 daffy kernel: ip/2432: BUG in enable_irq at 
> kernel/irq/manage.c:112
> Oct 25 13:31:56 daffy kernel:  [<c01396ab>] enable_irq+0xfb/0x100 (12)
> Oct 25 13:31:56 daffy kernel:  [<d0975614>] e100_up+0x114/0x200 [e100] (48)
> Oct 25 13:31:56 daffy kernel:  [<d0976a20>] e100_open+0x30/0x80 [e100] (48)
> Oct 25 13:31:56 daffy kernel:  [<c0113154>] mcount+0x14/0x18 (12)
> Oct 25 13:31:56 daffy kernel:  [<c0265d98>] dev_open+0x88/0xa0 (20)
> Oct 25 13:31:56 daffy kernel:  [<c02677cd>] dev_change_flags+0x5d/0x140 (28)
> Oct 25 13:31:56 daffy kernel:  [<c02653ee>] __dev_get_by_name+0xe/0xd0 (8)
> Oct 25 13:31:56 daffy kernel:  [<c02af3d7>] devinet_ioctl+0x277/0x6c0 (28)
> Oct 25 13:31:56 daffy kernel:  [<c02b1894>] inet_ioctl+0x64/0xb0 (108)
> Oct 25 13:31:56 daffy kernel:  [<c025c048>] sock_ioctl+0xc8/0x250 (28)
> Oct 25 13:31:56 daffy kernel:  [<c0171cf7>] sys_ioctl+0xf7/0x260 (32)
> Oct 25 13:31:56 daffy kernel:  [<c01064ed>] sysenter_past_esp+0x52/0x71 (48)
> Oct 25 13:31:56 daffy kernel: preempt count: 00000002
> Oct 25 13:31:56 daffy kernel: . 2-level deep critical section nesting:
> Oct 25 13:31:56 daffy kernel: .. entry 1: enable_irq+0x33/0x100 
> [<c01395e3>] / (e100_up+0x114/0x200 [e100] [<d0975614>])
> Oct 25 13:31:56 daffy kernel: .. entry 2: print_traces+0x1d/0x60 
> [<c0132ecd>] / (dump_stack+0x23/0x30 [<c0106b23>])
> Oct 25 13:31:56 daffy kernel:
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 18:52                     ` K.R. Foley
@ 2004-10-25 20:38                       ` Ingo Molnar
  2004-10-26 10:53                         ` K.R. Foley
  2004-10-25 21:41                       ` Esben Nielsen
  1 sibling, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 20:38 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> Actually pertaining to V0.2. I just got my UP system booted up on V0.2
> and got this in the log. I did notice that this is not new to this
> release. It has been here at least since U10.3. Sorry I didn't catch
> it sooner.
> 
> Oct 25 13:31:56 daffy kernel: IRQ#11 thread RT prio: 43.
> Oct 25 13:31:56 daffy kernel: ip/2432: BUG in enable_irq at 
> kernel/irq/manage.c:112

this is pretty harmless and has been happening in -mm for some time. The
e100 device will work fine afterwards.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 14:16                                   ` Ingo Molnar
@ 2004-10-25 19:40                                     ` Rui Nuno Capela
  2004-10-26  3:01                                       ` Lee Revell
  2004-10-26  5:28                                       ` Denis Vlasenko
  0 siblings, 2 replies; 76+ messages in thread
From: Rui Nuno Capela @ 2004-10-25 19:40 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Florian Schmidt, K.R. Foley, linux-kernel, Lee Revell,
	mark_h_johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
>> ok, i've added it and uploaded -V0.2 together with another fix: there
>> was a scheduler recursion possible via the delayed-put mechanism using
>> workqueues - now it's using its own separate lists and per-CPU
>> threads.
>
> -V0.2 seems to behave quite well on my testboxes - i'm unable to
> reproduce the selinux boot hang anymore.
>

OK. RT-V0.2 boots on my laptop (P4/UP), sometimes ;)

I know that my early impressions are illusive, rather subjective, but I do
feel overall behavior is getting worst, when regarding low-latency audio
work with jackd -R.

To put things straight with RT-V0.2, I get trouble with much less load
than even before.

I noticed that something is, now and then, topping the cpu to 99%, leaving
the system to a crawl, eventually returning back to normal. Can't figure
out who or what, just because ps or top are stalling to silence, only
returning results after when the crawl ends, which are of no useful
evidence. When I'm lucky enough to let top (and gkrellm) telling me
something, it does look like that most of the time is spent on kernel mode
(sys time) and none of the running processes are at stake. Puzzled. It's
just like you're about to loose confidence on the procps tools.

OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the
relevant IRQ thread handlers to be always higher than jackd's. This just
doesn't seem like an improvement, not at all :( IMO, given the xrun rate
I'm experiencing with RT-V0.2, it all seems that I'm running on vanilla
2.6.9, with pretty much instability added to the picture.

About that jackd -R issue, which has been hosing the complete system
occasionally, is still an annoyance on RT-V0.2. On this same laptop
(P4/UP), it does happen only if PREEMPT_REALTIME is set. However, I think
I've narrowed it's reproducibility: loading more than two fluidsynth
instances was the easiest way to get the box frozen in less than one
minute, at least on RT-U10.3. With RT-V0.2 is even easier, with just two
fluidsynth instances, or even one.

Sorry for this kind of rant, but I had to distress myself, somehow ;)

Nevertheless, I'll keep on going with my user level trials... and let you
informed, of course.

Cheers,
-- 
rncbc aka Rui Nuno Capela
rncbc@rncbc.org



^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 10:40                   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
  2004-10-25 11:08                     ` K.R. Foley
@ 2004-10-25 18:52                     ` K.R. Foley
  2004-10-25 20:38                       ` Ingo Molnar
  2004-10-25 21:41                       ` Esben Nielsen
  2004-10-25 21:47                     ` Michal Schmidt
  2004-10-25 23:04                     ` Remi Colinet
  3 siblings, 2 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-25 18:52 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> i have released the -V0 Real-Time Preemption patch, which can be
> downloaded from:
> 
>   http://redhat.com/~mingo/realtime-preempt/
> 

Actually pertaining to V0.2. I just got my UP system booted up on V0.2 
and got this in the log. I did notice that this is not new to this 
release. It has been here at least since U10.3. Sorry I didn't catch it 
sooner.

Oct 25 13:31:56 daffy kernel: IRQ#11 thread RT prio: 43.
Oct 25 13:31:56 daffy kernel: ip/2432: BUG in enable_irq at 
kernel/irq/manage.c:112
Oct 25 13:31:56 daffy kernel:  [<c01396ab>] enable_irq+0xfb/0x100 (12)
Oct 25 13:31:56 daffy kernel:  [<d0975614>] e100_up+0x114/0x200 [e100] (48)
Oct 25 13:31:56 daffy kernel:  [<d0976a20>] e100_open+0x30/0x80 [e100] (48)
Oct 25 13:31:56 daffy kernel:  [<c0113154>] mcount+0x14/0x18 (12)
Oct 25 13:31:56 daffy kernel:  [<c0265d98>] dev_open+0x88/0xa0 (20)
Oct 25 13:31:56 daffy kernel:  [<c02677cd>] dev_change_flags+0x5d/0x140 (28)
Oct 25 13:31:56 daffy kernel:  [<c02653ee>] __dev_get_by_name+0xe/0xd0 (8)
Oct 25 13:31:56 daffy kernel:  [<c02af3d7>] devinet_ioctl+0x277/0x6c0 (28)
Oct 25 13:31:56 daffy kernel:  [<c02b1894>] inet_ioctl+0x64/0xb0 (108)
Oct 25 13:31:56 daffy kernel:  [<c025c048>] sock_ioctl+0xc8/0x250 (28)
Oct 25 13:31:56 daffy kernel:  [<c0171cf7>] sys_ioctl+0xf7/0x260 (32)
Oct 25 13:31:56 daffy kernel:  [<c01064ed>] sysenter_past_esp+0x52/0x71 (48)
Oct 25 13:31:56 daffy kernel: preempt count: 00000002
Oct 25 13:31:56 daffy kernel: . 2-level deep critical section nesting:
Oct 25 13:31:56 daffy kernel: .. entry 1: enable_irq+0x33/0x100 
[<c01395e3>] / (e100_up+0x114/0x200 [e100] [<d0975614>])
Oct 25 13:31:56 daffy kernel: .. entry 2: print_traces+0x1d/0x60 
[<c0132ecd>] / (dump_stack+0x23/0x30 [<c0106b23>])
Oct 25 13:31:56 daffy kernel:

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 15:06                                   ` Florian Schmidt
@ 2004-10-25 16:45                                     ` K.R. Foley
  2004-10-26  8:29                                       ` Eran Mann
  0 siblings, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-25 16:45 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: Ingo Molnar, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Florian Schmidt wrote:
> On Mon, 25 Oct 2004 16:10:08 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> 
>>>Btw: i still experience some "pauses". They are different now though.
>>>It seems i can trigger them by reloading a page in mozilla (not
>>>always). This BUG definetly looks related. Dunno, when exactly it
>>>happened (related to what i did at that moment), but it's the only one
>>>in dmesg output on this bootup. Each of the pauses is accompanied by a
>>>high cpu usage of ksoftirqd. I cannot retrigger the BUG though.
>>
>>please try -V0.2 - maybe the delayed-put fix is somehow related. (but
>>only maybe...)
>>
> 
> 
> doesn't seem so. V0.2 doesn't fix this for me. This time i got a BUG storm
> again in syslog (it kinda seems related to starting playback in xmms plus
> loading pages in mozilla. will boot again to verify):
> 

Well I have now gotten a couple of these now too (with V0.2). They all 
seem to be generated by firefox or thunderbird and the traces are all 
identical except for the offending process.


Oct 25 11:22:11 swdev14 kernel:
Oct 25 11:22:20 swdev14 kernel: thunderbird-bin/3946: BUG in futex_wait 
at kernel/futex.c:542
Oct 25 11:22:20 swdev14 kernel:  [<c0136389>] futex_wait+0x192/0x19c (12)
Oct 25 11:22:20 swdev14 kernel:  [<c0135646>] 
sub_preempt_count+0x75/0xd8 (72)
Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (4)
Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (84)
Oct 25 11:22:20 swdev14 kernel:  [<c01120ac>] mcount+0x14/0x18 (4)
Oct 25 11:22:20 swdev14 kernel:  [<c02aa9f2>] _spin_unlock+0x1a/0x34 (20)
Oct 25 11:22:20 swdev14 kernel:  [<c0118e15>] 
default_wake_function+0x0/0x1c (60)
Oct 25 11:22:20 swdev14 kernel:  [<c0118e15>] 
default_wake_function+0x0/0x1c (32)
Oct 25 11:22:20 swdev14 kernel:  [<c0136777>] sys_futex+0xf0/0xfc (12)
Oct 25 11:22:20 swdev14 kernel:  [<c01120ac>] mcount+0x14/0x18 (8)
Oct 25 11:22:20 swdev14 kernel:  [<c0136637>] do_futex+0x47/0x97 (20)
Oct 25 11:22:20 swdev14 kernel:  [<c0136777>] sys_futex+0xf0/0xfc (40)
Oct 25 11:22:20 swdev14 kernel:  [<c010623d>] 
sysenter_past_esp+0x52/0x71 (68)
Oct 25 11:22:20 swdev14 kernel: preempt count: 00000001
Oct 25 11:22:20 swdev14 kernel: . 1-level deep critical section nesting:
Oct 25 11:22:20 swdev14 kernel: .. entry 1: print_traces+0x1d/0x59 
[<c0135a28>] / (dump_stack+0x23/0x27 [<c01070db>])
Oct 25 11:22:20 swdev14 kernel:


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
@ 2004-10-25 15:42 Mark_H_Johnson
  0 siblings, 0 replies; 76+ messages in thread
From: Mark_H_Johnson @ 2004-10-25 15:42 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Alexander Batyrshin, Bill Huey, Adam Heath, K.R. Foley,
	linux-kernel, Florian Schmidt, Fernando Pablo Lopez-Lezcano,
	Lee Revell, Rui Nuno Capela, Thomas Gleixner, Michal Schmidt

>i have released the -V0 Real-Time Preemption patch, which can be
>downloaded from:
>
>  http://redhat.com/~mingo/realtime-preempt/
Actually, I picked up -V0.1 since that was available when I started
this morning and of course -V0.2 came out while I was building....

The kernel I built does not even make it to single user mode unless
I disable selinux.

First try had console messages stop after the message
  INIT: version 2.85 booting
but the Alt-Sysrq keys do work. Alt-Sysrq-L shows...

Pid: 5, comm:   ksoftirqd/1
EIP: 0060:[<c011d808>] CPU:1
EIP is at smp_processor_id+0x28/0xc0
(registers and stack trace...)
preempt count: 00010002
...

Pid: 266, comm:   IRQ 1
EIP: 0060:[<c0115b70>] CPU:0
EIP is at nmi_show_all_regs+0xd0/0x120
(registers and stack trace...)
preempt count: 00010002
...

If I repeat this a few times, the first process changed to "hotplug".
Repeating Alt-Sysrq-L will eventually gets stuck and requires
a hardware reset.

Second try - the INIT message was incomplete, stopping at
INIT:
plus the Alt-Sysrq keys not working at all.

Third try - added
  selinux=0
to the boot parameters. Made it single user mode w/o any errors.
Using telinit 3 got me a few BUG messages related to modprobe
and sleeping from an invalid context. From what I read in
other messages, you may have already fixed that so I will be
building -V0.2 shortly.

I also got the atomic counter underflow (qdisc_destroy) message.

Let me know if you need the system log, it appears to have
captured the messages if you need them.

--Mark H Johnson
  <mailto:Mark_H_Johnson@raytheon.com>


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 14:10                                 ` Ingo Molnar
  2004-10-25 14:16                                   ` Ingo Molnar
@ 2004-10-25 15:06                                   ` Florian Schmidt
  2004-10-25 16:45                                     ` K.R. Foley
  1 sibling, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-25 15:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 25 Oct 2004 16:10:08 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> > Btw: i still experience some "pauses". They are different now though.
> > It seems i can trigger them by reloading a page in mozilla (not
> > always). This BUG definetly looks related. Dunno, when exactly it
> > happened (related to what i did at that moment), but it's the only one
> > in dmesg output on this bootup. Each of the pauses is accompanied by a
> > high cpu usage of ksoftirqd. I cannot retrigger the BUG though.
> 
> please try -V0.2 - maybe the delayed-put fix is somehow related. (but
> only maybe...)
> 

doesn't seem so. V0.2 doesn't fix this for me. This time i got a BUG storm
again in syslog (it kinda seems related to starting playback in xmms plus
loading pages in mozilla. will boot again to verify):

Oct 25 16:53:42 mango kernel: IRQ#3 thread RT prio: 43.
Oct 25 16:53:52 mango kernel: mozilla-bin/741: BUG in futex_wait at kernel/futex.c:542
Oct 25 16:53:52 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:52 mango kernel:  [zlib_inflate_blocks+1352/3088] __up_write+0x148/0x320 (100)
Oct 25 16:53:52 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:52 mango kernel:  [__func__.13+351/922] down_write+0xd5/0x250 (8)
Oct 25 16:53:52 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:52 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:52 mango kernel:  [__func__.13+351/922] down_write+0xd5/0x250 (4)
Oct 25 16:53:52 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (8)
Oct 25 16:53:52 mango kernel:  [zlib_inflate_blocks+1352/3088] __up_write+0x148/0x320 (8)
Oct 25 16:53:52 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:52 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [zlib_inflate_blocks+1352/3088] __up_write+0x148/0x320 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (72)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (32)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:
Oct 25 16:53:56 mango kernel: kernel/futex.c:542
Oct 25 16:53:56 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:56 mango kernel:  [dequeue_task+24/64] effective_prio+0x8/0x60 (80)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+136/624] recalc_task_prio+0x98/0x190 (8)
Oct 25 16:53:56 mango kernel:  [task_rq_lock+98/112] enqueue_task+0x12/0x50 (24)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+487/624] activate_task+0x67/0x80 (16)
Oct 25 16:53:56 mango kernel:  [__mon_yday+161/268] preempt_schedule+0x11/0x80 (12)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (8)
Oct 25 16:53:56 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (60)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (12)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (20)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:
Oct 25 16:53:56 mango kernel: mozilla-bin/741: BUG in futex_wait at kernel/futex.c:542
Oct 25 16:53:56 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:56 mango kernel:  [dequeue_task+24/64] effective_prio+0x8/0x60 (80)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+136/624] recalc_task_prio+0x98/0x190 (8)
Oct 25 16:53:56 mango kernel:  [task_rq_lock+98/112] enqueue_task+0x12/0x50 (24)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+487/624] activate_task+0x67/0x80 (16)
Oct 25 16:53:56 mango kernel:  [__mon_yday+161/268] preempt_schedule+0x11/0x80 (12)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (8)
Oct 25 16:53:56 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (60)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (12)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (20)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:
Oct 25 16:53:56 mango kernel: mozilla-bin/741: BUG in futex_wait at kernel/futex.c:542
Oct 25 16:53:56 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:56 mango kernel:  [dequeue_task+24/64] effective_prio+0x8/0x60 (80)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+136/624] recalc_task_prio+0x98/0x190 (8)
Oct 25 16:53:56 mango kernel:  [task_rq_lock+98/112] enqueue_task+0x12/0x50 (24)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+487/624] activate_task+0x67/0x80 (16)
Oct 25 16:53:56 mango kernel:  [__mon_yday+161/268] preempt_schedule+0x11/0x80 (12)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (8)
Oct 25 16:53:56 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (60)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (12)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (20)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:
Oct 25 16:53:56 mango kernel: mozilla-bin/741: BUG in futex_wait at kernel/futex.c:542
Oct 25 16:53:56 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:56 mango kernel:  [dequeue_task+24/64] effective_prio+0x8/0x60 (80)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+136/624] recalc_task_prio+0x98/0x190 (8)
Oct 25 16:53:56 mango kernel:  [task_rq_lock+98/112] enqueue_task+0x12/0x50 (24)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+487/624] activate_task+0x67/0x80 (16)
Oct 25 16:53:56 mango kernel:  [__mon_yday+161/268] preempt_schedule+0x11/0x80 (12)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (8)
Oct 25 16:53:56 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (60)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (12)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (20)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:
Oct 25 16:53:56 mango kernel: mozilla-bin/741: BUG in futex_wait at kernel/futex.c:542
Oct 25 16:53:56 mango kernel:  [add_preempt_count+130/224] futex_wait+0x192/0x1a0 (12)
Oct 25 16:53:56 mango kernel:  [dequeue_task+24/64] effective_prio+0x8/0x60 (80)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+136/624] recalc_task_prio+0x98/0x190 (8)
Oct 25 16:53:56 mango kernel:  [task_rq_lock+98/112] enqueue_task+0x12/0x50 (24)
Oct 25 16:53:56 mango kernel:  [decay_avgs_and_calculate_rates+487/624] activate_task+0x67/0x80 (16)
Oct 25 16:53:56 mango kernel:  [__mon_yday+161/268] preempt_schedule+0x11/0x80 (12)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (16)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (8)
Oct 25 16:53:56 mango kernel:  [kthread_create+120/208] check_preempt_timing+0x58/0x290 (8)
Oct 25 16:53:56 mango kernel:  [wake_bit_function+5/96] sub_preempt_count+0x65/0xd0 (4)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (4)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (60)
Oct 25 16:53:56 mango kernel:  [__func__.5+7/19] preempt_schedule_irq+0x6f/0xa0 (12)
Oct 25 16:53:56 mango kernel:  [deactivate_task+0/64] default_wake_function+0x0/0x20 (20)
Oct 25 16:53:56 mango kernel:  [print_last_trace+247/256] do_futex+0x47/0xa0 (40)
Oct 25 16:53:56 mango kernel:  [get_futex_key+128/448] sys_futex+0xf0/0x100 (40)
Oct 25 16:53:56 mango kernel:  [syscall_fault+35/40] syscall_call+0x7/0xb (68)
Oct 25 16:53:56 mango kernel: preempt count: 00000001
Oct 25 16:53:56 mango kernel: . 1-level deep critical section nesting:
Oct 25 16:53:56 mango kernel: .. entry 1: print_traces+0x1d/0x70 [__kfifo_put+157/208] / (dump_stack+0x23/0x30 [show_registers+3/464])
Oct 25 16:53:56 mango kernel:

[gazillions more]

flo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 14:10                                 ` Ingo Molnar
@ 2004-10-25 14:16                                   ` Ingo Molnar
  2004-10-25 19:40                                     ` Rui Nuno Capela
  2004-10-25 15:06                                   ` Florian Schmidt
  1 sibling, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 14:16 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> ok, i've added it and uploaded -V0.2 together with another fix: there
> was a scheduler recursion possible via the delayed-put mechanism using
> workqueues - now it's using its own separate lists and per-CPU
> threads.

-V0.2 seems to behave quite well on my testboxes - i'm unable to
reproduce the selinux boot hang anymore.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 14:03                               ` Florian Schmidt
@ 2004-10-25 14:10                                 ` Ingo Molnar
  2004-10-25 14:16                                   ` Ingo Molnar
  2004-10-25 15:06                                   ` Florian Schmidt
  0 siblings, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 14:10 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Florian Schmidt <mista.tapas@gmx.net> wrote:

> > does the patch below fix this?
> 
> looks like it. they didn't show on first boot of the new kernel with
> patch applied. 

ok, i've added it and uploaded -V0.2 together with another fix: there
was a scheduler recursion possible via the delayed-put mechanism using
workqueues - now it's using its own separate lists and per-CPU threads.

> Btw: i still experience some "pauses". They are different now though.
> It seems i can trigger them by reloading a page in mozilla (not
> always). This BUG definetly looks related. Dunno, when exactly it
> happened (related to what i did at that moment), but it's the only one
> in dmesg output on this bootup. Each of the pauses is accompanied by a
> high cpu usage of ksoftirqd. I cannot retrigger the BUG though.

please try -V0.2 - maybe the delayed-put fix is somehow related. (but
only maybe...)

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 13:26                             ` Ingo Molnar
@ 2004-10-25 14:03                               ` Florian Schmidt
  2004-10-25 14:10                                 ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-25 14:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 25 Oct 2004 15:26:05 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> does the patch below fix this?

looks like it. they didn't show on first boot of the new kernel with patch
applied. 

Btw: i still experience some "pauses". They are different now though. It
seems i can trigger them by reloading a page in mozilla (not always). This
BUG definetly looks related. Dunno, when exactly it happened (related to
what i did at that moment), but it's the only one in dmesg output on this
bootup. Each of the pauses is accompanied by a high cpu usage of ksoftirqd.
I cannot retrigger the BUG though.

mozilla-bin/763: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (64)
 [<c01ef17b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef17b>] __up_write+0x13b/0x320 (4)
 [<c02b94d3>] down_read+0xd3/0x2b0 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01eef11>] up_read+0x111/0x240 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01eef11>] up_read+0x111/0x240 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (104)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

Here's the syslog entry:

Oct 25 15:56:31 mango kernel: mozilla-bin/763: BUG in futex_wait at kernel/futex.c:542
Oct 25 15:56:31 mango kernel:  [futex_requeue+162/608] futex_wait+0x192/0x1a0 (12)
Oct 25 15:56:31 mango kernel:  [print_name_offset+149/160] sub_preempt_count+0x65/0xd0 (64)
Oct 25 15:56:31 mango kernel:  [zlib_inflateReset+43/128] __up_write+0x13b/0x320 (8)
Oct 25 15:56:31 mango kernel:  [kfifo_alloc+216/240] check_preempt_timing+0x58/0x290 (8)
Oct 25 15:56:31 mango kernel:  [print_name_offset+149/160] sub_preempt_count+0x65/0xd0 (4)
Oct 25 15:56:31 mango kernel:  [zlib_inflateReset+43/128] __up_write+0x13b/0x320 (4)
Oct 25 15:56:31 mango kernel:  [__func__.0+318/987] down_read+0xd3/0x2b0 (8)
Oct 25 15:56:31 mango kernel:  [print_name_offset+149/160] sub_preempt_count+0x65/0xd0 (4)
Oct 25 15:56:31 mango kernel:  [zlib_inflate_fast+465/1024] up_read+0x111/0x240 (8)
Oct 25 15:56:31 mango kernel:  [kfifo_alloc+216/240] check_preempt_timing+0x58/0x290 (8)
Oct 25 15:56:31 mango kernel:  [print_name_offset+149/160] sub_preempt_count+0x65/0xd0 (4)
Oct 25 15:56:31 mango kernel:  [zlib_inflate_fast+465/1024] up_read+0x111/0x240 (4)
Oct 25 15:56:31 mango kernel:  [wake_up_process+32/48] default_wake_function+0x0/0x20 (104)
Oct 25 15:56:31 mango kernel:  [wake_up_process+32/48] default_wake_function+0x0/0x20 (32)
Oct 25 15:56:31 mango kernel:  [unqueue_me+103/256] do_futex+0x47/0xa0 (40)
Oct 25 15:56:31 mango kernel:  [futex_wait+176/400] sys_futex+0xf0/0x100 (40)
Oct 25 15:56:31 mango kernel:  [irq_entries_start+107/128] syscall_call+0x7/0xb (68)
Oct 25 15:56:31 mango kernel: preempt count: 00000001
Oct 25 15:56:31 mango kernel: . 1-level deep critical section nesting:
Oct 25 15:56:31 mango kernel: .. entry 1: print_traces+0x17/0x90 [update_max_trace+23/160] / (dump_stack+0x23/0x30 [show_registers+131/464])

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 13:39                           ` Florian Schmidt
@ 2004-10-25 13:48                             ` Florian Schmidt
  2004-10-25 13:35                               ` Ingo Molnar
  0 siblings, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-25 13:48 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: Ingo Molnar, K.R. Foley, linux-kernel, Lee Revell,
	Rui Nuno Capela, Mark_H_Johnson, Bill Huey, Adam Heath,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 25 Oct 2004 15:39:40 +0200
Florian Schmidt <mista.tapas@gmx.net> wrote:

> On Mon, 25 Oct 2004 14:12:10 +0200
> Ingo Molnar <mingo@elte.hu> wrote:
> 
> > i think i found the bug - now selinux boots fine. I've uploaded -V0.1
> > with the fix included. This fix could solve a number of other complaints
> > as well.
> 
> some more:

[snip]

i forgot to mention these were from the same session as the previous one.
also i think i missed the first ones, so the reports in this mail are
probably useless(?).

flo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 12:12                         ` Ingo Molnar
  2004-10-25 13:24                           ` Florian Schmidt
@ 2004-10-25 13:39                           ` Florian Schmidt
  2004-10-25 13:48                             ` Florian Schmidt
  1 sibling, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-25 13:39 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

On Mon, 25 Oct 2004 14:12:10 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> i think i found the bug - now selinux boots fine. I've uploaded -V0.1
> with the fix included. This fix could solve a number of other complaints
> as well.

some more:

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

mozilla-bin/753: BUG in futex_wait at kernel/futex.c:542
 [<c0132962>] futex_wait+0x192/0x1a0 (12)
 [<c01ef27b>] __up_write+0x13b/0x320 (84)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (16)
 [<c02b9880>] down_write+0xd0/0x2b0 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c02b9880>] down_write+0xd0/0x2b0 (4)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (8)
 [<c01ef27b>] __up_write+0x13b/0x320 (8)
 [<c0131788>] check_preempt_timing+0x58/0x290 (8)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (4)
 [<c01ef27b>] __up_write+0x13b/0x320 (4)
 [<c0115f60>] default_wake_function+0x0/0x20 (72)
 [<c0115f60>] default_wake_function+0x0/0x20 (32)
 [<c0132c17>] do_futex+0x47/0xa0 (40)
 [<c0132d60>] sys_futex+0xf0/0x100 (40)
 [<c010617b>] syscall_call+0x7/0xb (68)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])


^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 13:48                             ` Florian Schmidt
@ 2004-10-25 13:35                               ` Ingo Molnar
  0 siblings, 0 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 13:35 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Florian Schmidt <mista.tapas@gmx.net> wrote:

> [snip]
> 
> i forgot to mention these were from the same session as the previous
> one. also i think i missed the first ones, so the reports in this mail
> are probably useless(?).

i think the futex assert is a separate problem not triggered by the
module.c warnings.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 13:24                           ` Florian Schmidt
@ 2004-10-25 13:26                             ` Ingo Molnar
  2004-10-25 14:03                               ` Florian Schmidt
  0 siblings, 1 reply; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 13:26 UTC (permalink / raw)
  To: Florian Schmidt
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Florian Schmidt <mista.tapas@gmx.net> wrote:

> hi, i saw these during boot (config and complete dmesg attached):
> 
> Freeing unused kernel memory: 348k freed
> Adding 289160k swap on /dev/hda3.  Priority:-1 extents:1
> EXT3 FS on hdc1, internal journal
> IRQ#8 thread RT prio: 45.
> BUG: sleeping function called from invalid context modprobe(116) at kernel/mutex.c:28
> in_atomic():1 [00000001], irqs_disabled():1
>  [<c0117182>] __might_sleep+0xc2/0xe0 (12)
>  [<c0134989>] resolve_symbol+0xb9/0xc0 (24)
>  [<c01309f8>] _mutex_lock+0x38/0x50 (12)
>  [<c0144995>] kmem_cache_alloc+0x45/0x100 (24)
>  [<c0134989>] resolve_symbol+0xb9/0xc0 (8)

does the patch below fix this?

	Ingo

--- linux/kernel/module.c.orig
+++ linux/kernel/module.c
@@ -53,7 +53,7 @@
 #define INIT_OFFSET_MASK (1UL << (BITS_PER_LONG-1))
 
 /* Protects module list */
-static DECLARE_RAW_SPINLOCK(modlist_lock);
+static DECLARE_SPINLOCK(modlist_lock);
 
 /* List of modules, protected by module_mutex AND modlist_lock */
 static DECLARE_MUTEX(module_mutex);

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 12:12                         ` Ingo Molnar
@ 2004-10-25 13:24                           ` Florian Schmidt
  2004-10-25 13:26                             ` Ingo Molnar
  2004-10-25 13:39                           ` Florian Schmidt
  1 sibling, 1 reply; 76+ messages in thread
From: Florian Schmidt @ 2004-10-25 13:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: K.R. Foley, linux-kernel, Lee Revell, Rui Nuno Capela,
	Mark_H_Johnson, Bill Huey, Adam Heath, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

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

On Mon, 25 Oct 2004 14:12:10 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> i think i found the bug - now selinux boots fine. I've uploaded -V0.1
> with the fix included. This fix could solve a number of other complaints
> as well.



hi, i saw these during boot (config and complete dmesg attached):

Freeing unused kernel memory: 348k freed
Adding 289160k swap on /dev/hda3.  Priority:-1 extents:1
EXT3 FS on hdc1, internal journal
IRQ#8 thread RT prio: 45.
BUG: sleeping function called from invalid context modprobe(116) at kernel/mutex.c:28
in_atomic():1 [00000001], irqs_disabled():1
 [<c0117182>] __might_sleep+0xc2/0xe0 (12)
 [<c0134989>] resolve_symbol+0xb9/0xc0 (24)
 [<c01309f8>] _mutex_lock+0x38/0x50 (12)
 [<c0144995>] kmem_cache_alloc+0x45/0x100 (24)
 [<c0134989>] resolve_symbol+0xb9/0xc0 (8)
 [<c0133cfc>] use_module+0x4c/0x160 (4)
 [<c0133d50>] use_module+0xa0/0x160 (20)
 [<f08414f0>] unregister_sound_special+0x0/0x40 [soundcore] (12)
 [<c0134989>] resolve_symbol+0xb9/0xc0 (16)
 [<c0134fe2>] simplify_symbols+0xb2/0x120 (48)
 [<c0135cc3>] load_module+0x573/0xa90 (44)
 [<c013100d>] __mcount+0x1d/0x20 (48)
 [<c0136236>] sys_init_module+0x56/0x260 (112)
 [<c010617b>] syscall_call+0x7/0xb (28)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: resolve_symbol+0x21/0xc0 [<c01348f1>] / (simplify_symbols+0xb2/0x120 [<c0134fe2>])
.. entry 2: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

PCI: Found IRQ 3 for device 0000:00:0f.0
sis900.c: v1.08.07 11/02/2003

[...]

EXT3-fs: mounted filesystem with ordered data mode.
eth0: Media Link On 100mbps full-duplex 
IRQ#5 thread RT prio: 44.
ip_tables: (C) 2000-2002 Netfilter core team
BUG: sleeping function called from invalid context modprobe(591) at kernel/mutex.c:28
in_atomic():1 [00000001], irqs_disabled():1
 [<c0117182>] __might_sleep+0xc2/0xe0 (12)
 [<c0131c55>] sub_preempt_count+0x65/0xd0 (24)
 [<c01309f8>] _mutex_lock+0x38/0x50 (12)
 [<c0144995>] kmem_cache_alloc+0x45/0x100 (24)
 [<c0134989>] resolve_symbol+0xb9/0xc0 (8)
 [<c0133cfc>] use_module+0x4c/0x160 (4)
 [<c0133d50>] use_module+0xa0/0x160 (20)
 [<f0914030>] ipt_do_table+0x0/0x320 [ip_tables] (12)
 [<c0134989>] resolve_symbol+0xb9/0xc0 (16)
 [<c0134fe2>] simplify_symbols+0xb2/0x120 (48)
 [<c0135cc3>] load_module+0x573/0xa90 (44)
 [<c01ef27b>] __up_write+0x13b/0x320 (48)
 [<c0136236>] sys_init_module+0x56/0x260 (112)
 [<c010617b>] syscall_call+0x7/0xb (28)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: resolve_symbol+0x21/0xc0 [<c01348f1>] / (simplify_symbols+0xb2/0x120 [<c0134fe2>])
.. entry 2: print_traces+0x17/0x90 [<c0131fc7>] / (dump_stack+0x23/0x30 [<c0106733>])

ip_conntrack version 2.1 (6144 buckets, 49152 max) - 452 bytes per conntrack

Module                  Size  Used by
ipt_addrtype            2112  1 
ipt_state               1920  1 
ip_conntrack           51096  1 ipt_state
iptable_filter          3136  1 
ip_tables              19584  3 ipt_addrtype,ipt_state,iptable_filter
bsd_comp                5952  0 
ppp_deflate             6272  0 
zlib_deflate           22360  1 ppp_deflate
ppp_async              13784  1 
ppp_generic            34276  7 bsd_comp,ppp_deflate,ppp_async
slhc                    8320  1 ppp_generic
crc_ccitt               2112  1 ppp_async
sis900                 20036  0 
crc32                   4352  1 sis900
snd_cs46xx             84168  1 
snd_rawmidi            26592  1 snd_cs46xx
snd_seq_device          8972  1 snd_rawmidi
snd_ac97_codec         77472  1 snd_cs46xx
snd_pcm               100600  2 snd_cs46xx,snd_ac97_codec
snd_timer              27612  1 snd_pcm
snd                    57668  8 snd_cs46xx,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer
soundcore              10688  1 snd
snd_page_alloc         10244  2 snd_cs46xx,snd_pcm
gameport                4992  1 snd_cs46xx


flo

[-- Attachment #2: .config --]
[-- Type: application/octet-stream, Size: 26191 bytes --]

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.9-mm1-RT-V0.1
# Mon Oct 25 14:57:54 2004
#
CONFIG_X86=y
CONFIG_MMU=y
CONFIG_UID16=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y

#
# Code maturity level options
#
CONFIG_EXPERIMENTAL=y
CONFIG_CLEAN_COMPILE=y
CONFIG_BROKEN_ON_SMP=y

#
# General setup
#
CONFIG_LOCALVERSION=""
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_BSD_PROCESS_ACCT=y
# CONFIG_BSD_PROCESS_ACCT_V3 is not set
CONFIG_SYSCTL=y
# CONFIG_AUDIT is not set
CONFIG_LOG_BUF_SHIFT=14
# CONFIG_HOTPLUG is not set
CONFIG_KOBJECT_UEVENT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_EMBEDDED is not set
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_AS=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_SHMEM=y
CONFIG_CC_ALIGN_FUNCTIONS=0
CONFIG_CC_ALIGN_LABELS=0
CONFIG_CC_ALIGN_LOOPS=0
CONFIG_CC_ALIGN_JUMPS=0
# CONFIG_TINY_SHMEM is not set

#
# Loadable module support
#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
CONFIG_OBSOLETE_MODPARM=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y

#
# Processor type and features
#
CONFIG_X86_PC=y
# CONFIG_X86_ELAN is not set
# CONFIG_X86_VOYAGER is not set
# CONFIG_X86_NUMAQ is not set
# CONFIG_X86_SUMMIT is not set
# CONFIG_X86_BIGSMP is not set
# CONFIG_X86_VISWS is not set
# CONFIG_X86_GENERICARCH is not set
# CONFIG_X86_ES7000 is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
CONFIG_MK7=y
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP2 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_X86_GENERIC is not set
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_RWSEM_GENERIC=y
CONFIG_GENERIC_SEMAPHORES=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_GOOD_APIC=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_USE_3DNOW=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
# CONFIG_SMP is not set
CONFIG_PREEMPT=y
CONFIG_PREEMPT_SOFTIRQS=y
CONFIG_PREEMPT_HARDIRQS=y
CONFIG_PREEMPT_REALTIME=y
CONFIG_PREEMPT_BKL=y
# CONFIG_X86_UP_APIC is not set
CONFIG_X86_TSC=y
# CONFIG_X86_MCE is not set
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_HAVE_DEC_LOCK=y

#
# Performance-monitoring counters support
#
# CONFIG_PERFCTR is not set
CONFIG_KERN_PHYS_OFFSET=1
# CONFIG_KEXEC is not set

#
# Power management options (ACPI, APM)
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
# CONFIG_SOFTWARE_SUSPEND is not set

#
# ACPI (Advanced Configuration and Power Interface) Support
#
# CONFIG_ACPI is not set
CONFIG_ACPI_BLACKLIST_YEAR=0

#
# APM (Advanced Power Management) BIOS Support
#
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
# CONFIG_APM_DO_ENABLE is not set
# CONFIG_APM_CPU_IDLE is not set
# CONFIG_APM_DISPLAY_BLANK is not set
# CONFIG_APM_RTC_IS_GMT is not set
# CONFIG_APM_ALLOW_INTS is not set
CONFIG_APM_REAL_MODE_POWER_OFF=y

#
# CPU Frequency scaling
#
# CONFIG_CPU_FREQ is not set

#
# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
# CONFIG_PCI_LEGACY_PROC is not set
CONFIG_PCI_NAMES=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set

#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_AOUT=y
CONFIG_BINFMT_MISC=y

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
# CONFIG_DEBUG_DRIVER is not set

#
# Memory Technology Devices (MTD)
#
# CONFIG_MTD is not set

#
# Parallel port support
#
# CONFIG_PARPORT is not set

#
# Plug and Play support
#

#
# Block devices
#
CONFIG_BLK_DEV_FD=m
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_LBD is not set
# CONFIG_CDROM_PKTCDVD is not set

#
# ATA/ATAPI/MFM/RLL support
#
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
#
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_BLK_DEV_HD_IDE is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEFLOPPY is not set
CONFIG_BLK_DEV_IDESCSI=m
# CONFIG_IDE_TASK_IOCTL is not set
# CONFIG_IDE_TASKFILE_IO is not set

#
# IDE chipset support/bugfixes
#
CONFIG_IDE_GENERIC=y
# CONFIG_BLK_DEV_CMD640 is not set
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
# CONFIG_BLK_DEV_OFFBOARD is not set
CONFIG_BLK_DEV_GENERIC=y
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
CONFIG_IDEDMA_PCI_AUTO=y
# CONFIG_IDEDMA_ONLYDISK is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CY82C693 is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_HPT34X is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
CONFIG_BLK_DEV_SIS5513=y
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_IDE_ARM is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_IVB is not set
CONFIG_IDEDMA_AUTO=y
# CONFIG_BLK_DEV_HD is not set

#
# SCSI device support
#
CONFIG_SCSI=m
CONFIG_SCSI_PROC_FS=y

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
# CONFIG_BLK_DEV_SR_VENDOR is not set
CONFIG_CHR_DEV_SG=m

#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
#
# CONFIG_SCSI_MULTI_LUN is not set
CONFIG_SCSI_CONSTANTS=y
# CONFIG_SCSI_LOGGING is not set

#
# SCSI Transport Attributes
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set

#
# SCSI low-level drivers
#
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
CONFIG_SCSI_AIC7XXX=m
CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
CONFIG_AIC7XXX_RESET_DELAY_MS=15000
# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
CONFIG_AIC7XXX_DEBUG_MASK=0
# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_SCSI_SATA is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_EATA_PIO is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_ISP is not set
# CONFIG_SCSI_QLOGIC_FC is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLOGIC_1280_1040 is not set
CONFIG_SCSI_QLA2XXX=m
# CONFIG_SCSI_QLA21XX is not set
# CONFIG_SCSI_QLA22XX is not set
# CONFIG_SCSI_QLA2300 is not set
# CONFIG_SCSI_QLA2322 is not set
# CONFIG_SCSI_QLA6312 is not set
# CONFIG_SCSI_QLA6322 is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set

#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set

#
# Fusion MPT device support
#
# CONFIG_FUSION is not set

#
# IEEE 1394 (FireWire) support
#
# CONFIG_IEEE1394 is not set

#
# I2O device support
#
# CONFIG_I2O is not set

#
# Networking support
#
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not set
CONFIG_NETLINK_DEV=y
CONFIG_UNIX=y
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_MULTIPLE_TABLES is not set
# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE is not set
# CONFIG_IP_MROUTE is not set
# CONFIG_ARPD is not set
# CONFIG_SYN_COOKIES is not set
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_TUNNEL is not set

#
# IP: Virtual Server Configuration
#
# CONFIG_IP_VS is not set
# CONFIG_IPV6 is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=m
# CONFIG_IP_NF_CT_ACCT is not set
# CONFIG_IP_NF_CT_PROTO_SCTP is not set
# CONFIG_IP_NF_FTP is not set
# CONFIG_IP_NF_IRC is not set
# CONFIG_IP_NF_TFTP is not set
# CONFIG_IP_NF_AMANDA is not set
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_IPRANGE=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_PKTTYPE=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_DSCP=m
CONFIG_IP_NF_MATCH_AH_ESP=m
CONFIG_IP_NF_MATCH_LENGTH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_TCPMSS=m
CONFIG_IP_NF_MATCH_HELPER=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_CONNTRACK=m
CONFIG_IP_NF_MATCH_OWNER=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_MATCH_REALM=m
# CONFIG_IP_NF_MATCH_SCTP is not set
# CONFIG_IP_NF_MATCH_COMMENT is not set
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_SAME=m
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_DSCP=m
CONFIG_IP_NF_TARGET_MARK=m
CONFIG_IP_NF_TARGET_CLASSIFY=m
# CONFIG_IP_NF_RAW is not set
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set

#
# SCTP Configuration (EXPERIMENTAL)
#
# CONFIG_IP_SCTP is not set
# CONFIG_ATM is not set
# CONFIG_BRIDGE is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_NET_DIVERT is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_NET_HW_FLOWCONTROL is not set

#
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CLK_JIFFIES=y
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
# CONFIG_NET_SCH_HFSC is not set
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
# CONFIG_NET_SCH_NETEM is not set
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
# CONFIG_CLS_U32_PERF is not set
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_KGDBOE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_HAMRADIO is not set
# CONFIG_IRDA is not set
# CONFIG_BT is not set
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
# CONFIG_BONDING is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_ETHERTAP is not set

#
# ARCnet devices
#
# CONFIG_ARCNET is not set

#
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
CONFIG_MII=m
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_NET_VENDOR_3COM is not set

#
# Tulip family network device support
#
# CONFIG_NET_TULIP is not set
# CONFIG_HP100 is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_DGRS is not set
# CONFIG_EEPRO100 is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
CONFIG_SIS900=m
# CONFIG_EPIC100 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_VIA_RHINE is not set

#
# Ethernet (1000 Mbit)
#
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
# CONFIG_E1000 is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SK98LIN is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set

#
# Ethernet (10000 Mbit)
#
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set

#
# Token Ring devices
#
# CONFIG_TR is not set

#
# Wireless LAN (non-hamradio)
#
# CONFIG_NET_RADIO is not set

#
# Wan interfaces
#
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPPOE=m
# CONFIG_SLIP is not set
# CONFIG_NET_FC is not set
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set

#
# ISDN subsystem
#
# CONFIG_ISDN is not set

#
# Telephony Support
#
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
# CONFIG_INPUT_TSDEV is not set
# CONFIG_INPUT_EVDEV is not set
# CONFIG_INPUT_EVBUG is not set

#
# Input I/O drivers
#
CONFIG_GAMEPORT=m
CONFIG_SOUND_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_VORTEX is not set
# CONFIG_GAMEPORT_FM801 is not set
# CONFIG_GAMEPORT_CS461x is not set
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
CONFIG_SERIO_PCIPS2=m
CONFIG_SERIO_LIBPS2=y
# CONFIG_SERIO_RAW is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TOUCHSCREEN is not set
CONFIG_INPUT_MISC=y
CONFIG_INPUT_PCSPKR=y
# CONFIG_INPUT_UINPUT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_SERIAL_NONSTANDARD is not set

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not set
CONFIG_SERIAL_8250_NR_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set

#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_UNIX98_PTYS=y
CONFIG_LEGACY_PTYS=y
CONFIG_LEGACY_PTY_COUNT=256

#
# IPMI
#
# CONFIG_IPMI_HANDLER is not set

#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_HW_RANDOM is not set
CONFIG_NVRAM=y
CONFIG_RTC=y
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
CONFIG_AGP=m
# CONFIG_AGP_ALI is not set
# CONFIG_AGP_ATI is not set
# CONFIG_AGP_AMD is not set
# CONFIG_AGP_AMD64 is not set
# CONFIG_AGP_INTEL is not set
# CONFIG_AGP_INTEL_MCH is not set
# CONFIG_AGP_NVIDIA is not set
CONFIG_AGP_SIS=m
# CONFIG_AGP_SWORKS is not set
# CONFIG_AGP_VIA is not set
# CONFIG_AGP_EFFICEON is not set
# CONFIG_DRM is not set
# CONFIG_MWAVE is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HANGCHECK_TIMER=m

#
# I2C support
#
CONFIG_I2C=m
CONFIG_I2C_CHARDEV=m

#
# I2C Algorithms
#
CONFIG_I2C_ALGOBIT=m
CONFIG_I2C_ALGOPCF=m
# CONFIG_I2C_ALGOPCA is not set

#
# I2C Hardware Bus support
#
CONFIG_I2C_ALI1535=m
CONFIG_I2C_ALI1563=m
CONFIG_I2C_ALI15X3=m
CONFIG_I2C_AMD756=m
CONFIG_I2C_AMD8111=m
CONFIG_I2C_I801=m
CONFIG_I2C_I810=m
CONFIG_I2C_ISA=m
CONFIG_I2C_NFORCE2=m
CONFIG_I2C_PARPORT_LIGHT=m
CONFIG_I2C_PIIX4=m
CONFIG_I2C_PROSAVAGE=m
CONFIG_I2C_SAVAGE4=m
CONFIG_SCx200_ACB=m
CONFIG_I2C_SIS5595=m
CONFIG_I2C_SIS630=m
CONFIG_I2C_SIS96X=m
# CONFIG_I2C_STUB is not set
CONFIG_I2C_VIA=m
CONFIG_I2C_VIAPRO=m
CONFIG_I2C_VOODOO3=m
# CONFIG_I2C_PCA_ISA is not set

#
# Hardware Sensors Chip support
#
CONFIG_I2C_SENSOR=m
CONFIG_SENSORS_ADM1021=m
CONFIG_SENSORS_ADM1025=m
CONFIG_SENSORS_ADM1031=m
CONFIG_SENSORS_ASB100=m
CONFIG_SENSORS_DS1621=m
CONFIG_SENSORS_FSCHER=m
CONFIG_SENSORS_GL518SM=m
CONFIG_SENSORS_IT87=m
CONFIG_SENSORS_LM75=m
CONFIG_SENSORS_LM77=m
CONFIG_SENSORS_LM78=m
CONFIG_SENSORS_LM80=m
CONFIG_SENSORS_LM83=m
CONFIG_SENSORS_LM85=m
# CONFIG_SENSORS_LM87 is not set
CONFIG_SENSORS_LM90=m
CONFIG_SENSORS_MAX1619=m
# CONFIG_SENSORS_SMSC47M1 is not set
CONFIG_SENSORS_VIA686A=m
CONFIG_SENSORS_W83781D=m
CONFIG_SENSORS_W83L785TS=m
CONFIG_SENSORS_W83627HF=m

#
# Other I2C Chip support
#
CONFIG_SENSORS_EEPROM=m
CONFIG_SENSORS_PCF8574=m
CONFIG_SENSORS_PCF8591=m
CONFIG_SENSORS_RTC8564=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set

#
# Dallas's 1-wire bus
#
# CONFIG_W1 is not set

#
# Misc devices
#
# CONFIG_IBM_ASM is not set

#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set

#
# Digital Video Broadcasting Devices
#
# CONFIG_DVB is not set

#
# Graphics support
#
# CONFIG_FB is not set
CONFIG_VIDEO_SELECT=y

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y

#
# Sound
#
CONFIG_SOUND=m

#
# Advanced Linux Sound Architecture
#
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_RTCTIMER=m
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set

#
# Generic devices
#
CONFIG_SND_DUMMY=m
CONFIG_SND_VIRMIDI=m
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set

#
# PCI devices
#
CONFIG_SND_AC97_CODEC=m
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
CONFIG_SND_CS46XX=m
CONFIG_SND_CS46XX_NEW_DSP=y
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_YMFPCI is not set
# CONFIG_SND_ALS4000 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
CONFIG_SND_INTEL8X0=m
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VX222 is not set

#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set

#
# USB support
#
# CONFIG_USB is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y

#
# USB Gadget Support
#
# CONFIG_USB_GADGET is not set

#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
# CONFIG_EXT2_FS_POSIX_ACL is not set
# CONFIG_EXT2_FS_SECURITY is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISER4_FS is not set
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_MINIX_FS is not set
CONFIG_ROMFS_FS=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_ZISOFS_FS=y
CONFIG_UDF_FS=y
CONFIG_UDF_NLS=y

#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_SYSFS=y
# CONFIG_DEVFS_FS is not set
CONFIG_DEVPTS_FS_XATTR=y
# CONFIG_DEVPTS_FS_SECURITY is not set
CONFIG_TMPFS=y
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not set
CONFIG_RAMFS=y

#
# Miscellaneous filesystems
#
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
CONFIG_CRAMFS=m
# CONFIG_VXFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set

#
# Network File Systems
#
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_EXPORTFS is not set
# CONFIG_SMB_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
CONFIG_AFS_FS=m
CONFIG_RXRPC=m

#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y

#
# Native Language Support
#
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
CONFIG_NLS_CODEPAGE_1250=y
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set

#
# Profiling support
#
# CONFIG_PROFILING is not set

#
# Kernel hacking
#
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_PREEMPT=y
CONFIG_PREEMPT_TIMING=y
CONFIG_PREEMPT_TRACE=y
CONFIG_LATENCY_TRACE=y
CONFIG_MCOUNT=y
CONFIG_RWSEM_DEADLOCK_DETECT=y
CONFIG_RWSEM_MAX_OWNERS=32
# CONFIG_DEBUG_INFO is not set
CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_KPROBES is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_KGDB is not set

#
# Security options
#
# CONFIG_KEYS is not set
CONFIG_SECURITY=y
# CONFIG_SECURITY_NETWORK is not set
CONFIG_SECURITY_CAPABILITIES=m
# CONFIG_SECURITY_SECLVL is not set
# CONFIG_SECURITY_SELINUX is not set

#
# Cryptographic options
#
CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_AES_586 is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_ARC4 is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_TEST is not set

#
# Library routines
#
CONFIG_CRC_CCITT=m
CONFIG_CRC32=m
CONFIG_LIBCRC32C=m
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=m
CONFIG_GENERIC_HARDIRQS=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_X86_BIOS_REBOOT=y
CONFIG_PC=y

[-- Attachment #3: log --]
[-- Type: application/octet-stream, Size: 1107 bytes --]

Module                  Size  Used by
ipt_addrtype            2112  1 
ipt_state               1920  1 
ip_conntrack           51096  1 ipt_state
iptable_filter          3136  1 
ip_tables              19584  3 ipt_addrtype,ipt_state,iptable_filter
bsd_comp                5952  0 
ppp_deflate             6272  0 
zlib_deflate           22360  1 ppp_deflate
ppp_async              13784  1 
ppp_generic            34276  7 bsd_comp,ppp_deflate,ppp_async
slhc                    8320  1 ppp_generic
crc_ccitt               2112  1 ppp_async
sis900                 20036  0 
crc32                   4352  1 sis900
snd_cs46xx             84168  1 
snd_rawmidi            26592  1 snd_cs46xx
snd_seq_device          8972  1 snd_rawmidi
snd_ac97_codec         77472  1 snd_cs46xx
snd_pcm               100600  2 snd_cs46xx,snd_ac97_codec
snd_timer              27612  1 snd_pcm
snd                    57668  8 snd_cs46xx,snd_rawmidi,snd_seq_device,snd_ac97_codec,snd_pcm,snd_timer
soundcore              10688  1 snd
snd_page_alloc         10244  2 snd_cs46xx,snd_pcm
gameport                4992  1 snd_cs46xx

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 11:10                       ` Ingo Molnar
  2004-10-25 11:13                         ` K.R. Foley
@ 2004-10-25 12:12                         ` Ingo Molnar
  2004-10-25 13:24                           ` Florian Schmidt
  2004-10-25 13:39                           ` Florian Schmidt
  1 sibling, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 12:12 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


* Ingo Molnar <mingo@elte.hu> wrote:

> > >[ NOTE: there's one known bug in this release: selinux on one of my
> > >testsystems broke, it hangs during bootup. With CONFIG_SECURITY disabled
> > >it works fine. I'm working on the fix. So please keep CONFIG_SECURITY
> > >disabled for the time being. ]
> > >
> > Does this include all models of security or just the selinux stuff?
> 
> i have only tried selinux. (which is installed/enabled by default on
> FC3 so it's easy for me to test on an out of box distro.)

i think i found the bug - now selinux boots fine. I've uploaded -V0.1
with the fix included. This fix could solve a number of other complaints
as well.

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 11:10                       ` Ingo Molnar
@ 2004-10-25 11:13                         ` K.R. Foley
  2004-10-25 12:12                         ` Ingo Molnar
  1 sibling, 0 replies; 76+ messages in thread
From: K.R. Foley @ 2004-10-25 11:13 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:
> * K.R. Foley <kr@cybsft.com> wrote:
> 
> 
>>>[ NOTE: there's one known bug in this release: selinux on one of my
>>>testsystems broke, it hangs during bootup. With CONFIG_SECURITY disabled
>>>it works fine. I'm working on the fix. So please keep CONFIG_SECURITY
>>>disabled for the time being. ]
>>>
>>
>>Does this include all models of security or just the selinux stuff?
> 
> 
> i have only tried selinux. (which is installed/enabled by default on FC3
> so it's easy for me to test on an out of box distro.)
> 
> 	Ingo
> 

Well I will know when it boots, or doesn't. :) I will report back when I 
know.

kr

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 11:08                     ` K.R. Foley
@ 2004-10-25 11:10                       ` Ingo Molnar
  2004-10-25 11:13                         ` K.R. Foley
  2004-10-25 12:12                         ` Ingo Molnar
  0 siblings, 2 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 11:10 UTC (permalink / raw)
  To: K.R. Foley
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


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

> >[ NOTE: there's one known bug in this release: selinux on one of my
> >testsystems broke, it hangs during bootup. With CONFIG_SECURITY disabled
> >it works fine. I'm working on the fix. So please keep CONFIG_SECURITY
> >disabled for the time being. ]
> >
> Does this include all models of security or just the selinux stuff?

i have only tried selinux. (which is installed/enabled by default on FC3
so it's easy for me to test on an out of box distro.)

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

* Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-25 10:40                   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
@ 2004-10-25 11:08                     ` K.R. Foley
  2004-10-25 11:10                       ` Ingo Molnar
  2004-10-25 18:52                     ` K.R. Foley
                                       ` (2 subsequent siblings)
  3 siblings, 1 reply; 76+ messages in thread
From: K.R. Foley @ 2004-10-25 11:08 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin

Ingo Molnar wrote:

> [ NOTE: there's one known bug in this release: selinux on one of my
> testsystems broke, it hangs during bootup. With CONFIG_SECURITY disabled
> it works fine. I'm working on the fix. So please keep CONFIG_SECURITY
> disabled for the time being. ]
>
Does this include all models of security or just the selinux stuff?


> other changes in -V0:
> 
>  - build fixes: more driver fixes from Thomas Gleixner
> 
>  - crash fix: fixed a bug found by Thomas Gleixner: rwsem runtime
>    initialization was racy.
> 
>  - deadlock fix: fixed lockup bug caused by __schedule clearing
>    PREEMPT_ACTIVE. The need_resched loop is now outside of __schedule(). 
>    This might solve lockups/slowdowns reported by some people.
> 
>  - latency fix: made keventd SCHED_FIFO - this could fix the mouse
>    related delays reported by a number of people.
> 
>  - latency fix: fixed SMP lock-break mechanism of mutexes.
> 
>  - usability feature: hard-interrupts get decreasing SCHED_FIFO priority
>    starting at prio 49 and stopping at prio 25. This should give a good
>    default.
> 
>  - debug feature: implemented SysRq-D to show the list of tasks with
>    locks blocked on, if RW_SEM_DEADLOCK_DETECTION is enabled.
> 
> to create a -V0 tree from scratch, the patching order is:
> 
>    http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2
>  + http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9/2.6.9-mm1/2.6.9-mm1.bz2
>  + http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-V0
> 
> 	Ingo
> 



^ permalink raw reply	[flat|nested] 76+ messages in thread

* [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
  2004-10-22 17:56                 ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2 Ingo Molnar
@ 2004-10-25 10:40                   ` Ingo Molnar
  2004-10-25 11:08                     ` K.R. Foley
                                       ` (3 more replies)
  0 siblings, 4 replies; 76+ messages in thread
From: Ingo Molnar @ 2004-10-25 10:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Lee Revell, Rui Nuno Capela, Mark_H_Johnson, K.R. Foley,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Alexander Batyrshin


i have released the -V0 Real-Time Preemption patch, which can be
downloaded from:

  http://redhat.com/~mingo/realtime-preempt/

NOTE: this is a highly experimental release, a more experimental one
than -U10.3.

the big change in the '-V' series of the patchset is that i have
converted the last couple of non-preemptible kernel subsystems to
fully-preemptible mutex-based locking. These subsystems are:

 - the SLAB allocator
 - the buddy page allocator
 - waitqueue handling
 - soft-timer subsystem
 - security/selinux
 - workqueues
 - the random driver

this is probably the last 'big leap forward' in terms of the scope of
the patch. (having reached the ultimate scope: it now encompasses
everything ;)

But as an inevitable result of this big leap it will likely break in a
couple of places. Unfortunately these subsystems were largely
interdependent so it's an all-or-nothing step with not much middle
ground between the locking done in -U10.3 and in -V0.

another result of these changes is that the number of critical sections
in -V0 is roughly 30% of that in -U10.3. Now we only have the scheduler
and very lowlevel IRQ-hardware locks as raw spinlocks. (plus the lone
holdout vga_lock - which i will probably make a mutex too in the near
future)

[ NOTE: there's one known bug in this release: selinux on one of my
testsystems broke, it hangs during bootup. With CONFIG_SECURITY disabled
it works fine. I'm working on the fix. So please keep CONFIG_SECURITY
disabled for the time being. ]

other changes in -V0:

 - build fixes: more driver fixes from Thomas Gleixner

 - crash fix: fixed a bug found by Thomas Gleixner: rwsem runtime
   initialization was racy.

 - deadlock fix: fixed lockup bug caused by __schedule clearing
   PREEMPT_ACTIVE. The need_resched loop is now outside of __schedule(). 
   This might solve lockups/slowdowns reported by some people.

 - latency fix: made keventd SCHED_FIFO - this could fix the mouse
   related delays reported by a number of people.

 - latency fix: fixed SMP lock-break mechanism of mutexes.

 - usability feature: hard-interrupts get decreasing SCHED_FIFO priority
   starting at prio 49 and stopping at prio 25. This should give a good
   default.

 - debug feature: implemented SysRq-D to show the list of tasks with
   locks blocked on, if RW_SEM_DEADLOCK_DETECTION is enabled.

to create a -V0 tree from scratch, the patching order is:

   http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2
 + http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9/2.6.9-mm1/2.6.9-mm1.bz2
 + http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-V0

	Ingo

^ permalink raw reply	[flat|nested] 76+ messages in thread

end of thread, other threads:[~2004-10-28  7:11 UTC | newest]

Thread overview: 76+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-25 18:55 [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Mark_H_Johnson
2004-10-25 21:01 ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-10-25 15:42 Mark_H_Johnson
2004-10-15 10:26 [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U3 Ingo Molnar
2004-10-16 15:33 ` [patch] Real-Time Preemption, -VP-2.6.9-rc4-mm1-U4 Ingo Molnar
2004-10-18 14:50   ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U5 Ingo Molnar
2004-10-19 12:46     ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U6 Ingo Molnar
2004-10-19 18:00       ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U7 Ingo Molnar
2004-10-20  9:45         ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8 Ingo Molnar
2004-10-21 13:27           ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9 Ingo Molnar
2004-10-22 13:35             ` [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9.3 Ingo Molnar
2004-10-22 15:50               ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10 Ingo Molnar
2004-10-22 17:56                 ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2 Ingo Molnar
2004-10-25 10:40                   ` [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0 Ingo Molnar
2004-10-25 11:08                     ` K.R. Foley
2004-10-25 11:10                       ` Ingo Molnar
2004-10-25 11:13                         ` K.R. Foley
2004-10-25 12:12                         ` Ingo Molnar
2004-10-25 13:24                           ` Florian Schmidt
2004-10-25 13:26                             ` Ingo Molnar
2004-10-25 14:03                               ` Florian Schmidt
2004-10-25 14:10                                 ` Ingo Molnar
2004-10-25 14:16                                   ` Ingo Molnar
2004-10-25 19:40                                     ` Rui Nuno Capela
2004-10-26  3:01                                       ` Lee Revell
2004-10-26  3:11                                         ` K.R. Foley
2004-10-26  3:58                                           ` Lee Revell
2004-10-26  4:15                                             ` K.R. Foley
2004-10-26  5:11                                         ` Fernando Pablo Lopez-Lezcano
2004-10-26 17:25                                           ` Lee Revell
2004-10-26 17:45                                             ` Fernando Pablo Lopez-Lezcano
2004-10-26 17:55                                               ` Lee Revell
2004-10-26  5:28                                       ` Denis Vlasenko
2004-10-26 10:40                                         ` Rui Nuno Capela
2004-10-26 19:09                                           ` Denis Vlasenko
2004-10-27  8:23                                             ` Rui Nuno Capela
2004-10-25 15:06                                   ` Florian Schmidt
2004-10-25 16:45                                     ` K.R. Foley
2004-10-26  8:29                                       ` Eran Mann
2004-10-25 13:39                           ` Florian Schmidt
2004-10-25 13:48                             ` Florian Schmidt
2004-10-25 13:35                               ` Ingo Molnar
2004-10-25 18:52                     ` K.R. Foley
2004-10-25 20:38                       ` Ingo Molnar
2004-10-26 10:53                         ` K.R. Foley
2004-10-26 10:57                           ` Ingo Molnar
2004-10-27  0:24                           ` Ingo Molnar
2004-10-27  0:53                             ` K.R. Foley
2004-10-27  3:32                             ` K.R. Foley
2004-10-27  8:28                               ` Ingo Molnar
2004-10-27  8:44                                 ` Ingo Molnar
2004-10-27  8:52                                   ` Ingo Molnar
2004-10-27  9:06                                     ` Ingo Molnar
2004-10-27 10:03                                       ` Ingo Molnar
2004-10-27 10:33                                       ` Florian Schmidt
2004-10-27 10:29                                         ` Ingo Molnar
2004-10-27 10:58                                           ` Florian Schmidt
2004-10-27 10:45                                         ` Florian Schmidt
2004-10-27 11:09                                           ` Ingo Molnar
2004-10-27  9:24                               ` Ingo Molnar
2004-10-27  9:32                                 ` Ingo Molnar
2004-10-27 12:19                                   ` K.R. Foley
2004-10-27 13:29                               ` Ingo Molnar
2004-10-27 15:00                                 ` K.R. Foley
2004-10-27 15:05                                   ` Ingo Molnar
2004-10-27 15:13                                     ` Lee Revell
2004-10-27 15:17                                       ` Ingo Molnar
2004-10-27 17:14                                         ` Lee Revell
2004-10-27 17:21                                           ` K.R. Foley
2004-10-27 17:26                                             ` Lee Revell
2004-10-27 17:40                                               ` K.R. Foley
2004-10-27 17:44                                                 ` Lee Revell
2004-10-27 17:43                                               ` K.R. Foley
2004-10-27 19:47                                                 ` Lee Revell
2004-10-27 21:40                                                   ` K.R. Foley
2004-10-27 20:09                                         ` Andrew Morton
2004-10-27 21:43                                           ` K.R. Foley
2004-10-27 15:16                                     ` K.R. Foley
2004-10-27 20:49                                     ` Bill Huey
2004-10-27 20:54                                       ` Bill Huey
2004-10-27 21:01                                         ` Bill Huey
2004-10-28  7:11                                           ` Ingo Molnar
2004-10-27  3:48                             ` K.R. Foley
2004-10-25 21:41                       ` Esben Nielsen
2004-10-25 21:47                     ` Michal Schmidt
2004-10-25 23:04                     ` Remi Colinet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).