CONFIG_PREEMPT_REALTIME, 'Fully Preemptible Kernel', VP-2.6.9-rc4-mm1-T4
Subsystems (28)
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
In reply to Rui Nuno CapelaQuoted 8 lines · Rui Nuno Capela
Quoted 5 lines · Ingo Molnar
i have released the -U8 Real-Time Preemption patch:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U8
[...]
Quoted 8 lines
b) Laptop P4 2.533Ghz UP (Mandrake 10.1c)
config-2.6.9-rc4-mm1-RT-U8.1.gzThis box was known to work without major issues until U4. With U8 it's
a real pain. Once trivial operations turns out fatal now. Running jackd -R, which has been a flagship before, now freezes the whole system in no time. (I'll take some netconsole capture sessions later)
OK.
Now that the usb-storage crash has been ironed out, thanks to Thomas Gleixner's patch, I proceeded with some local experiments regarding the jackd -R issue.
The fact is jackd -R (realtime mode; SCHED_FIFO) hosing the system, and thats exposed as soon as some jack audio client application enters into the chain.
Running jackd non-realtime (SCHED_OTHER) does not expose this problem, so I think it's a scheduling related one.
With a default scenario, with all IRQ handlers under SCHED_OTHER scheduling class and default priority, running jackd -R freezes completely the system. Only a hard-reset or power-off is the way out.
Then I try tweaking the keyboard (IRQs 1,12), rtc (IRQ 8) and soundcard (IRQ 5) scheduling policies to SCHED_FIFO and priority to something higher than jackd's (e.g. chrt --fifo 60).
This way, running jack -R still hoses the system, in a somewhat less egoistic manner, but still seems that it's the only process running on the system taking full control of it. The evidence I could find was that jackd's verbose output keeps pumping, as it would usually, but all the rest poor things freeze to death. This time however, magic SysRq is of some use, barely thanks to the i8042 IRQ scheduling promotion.
So it all seems that jackd -R is not crashing, nor anything else, for this matter.
I really hate to say this, but this should be investigated for the RT patch sake, obviously because the only purpose I find to it is precisely running jackd -R, and I can swear it has been near perfection until U4 inclusive (think it was called VP back then :).
I hope I'm not the only one.
(IIRC Florian Schmidt was experiencing something similar, like system intermitence, pauses, whatever, while also running jackd -R.)
Strange enough, all this is running on another SMP/HT box of mine, without major issues. Guess that SMP makes the difference here.
But wait, now I remember to notice something there yet: running some jack clients (e.g. fluidsynth) is much more expensive than usual wrt.CPU usage, reaching very unusual levels above 40% sustained (this is actual CPU% as reported by procps tools, not the DSP usage as reported by jack itself). IMHO the SMP/HT effect just seems to mask the real trouble, as the increased cost affects only one of the (virtual) CPUs.
I wonder if this does ring some bell out there. :)
Cheers,
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
Quoted 6 lines · Rui Nuno Capela
The fact is jackd -R (realtime mode;
SCHED_FIFO) hosing the system, and thats exposed as soon as some jack audio client application enters into the chain.Running jackd non-realtime (
SCHED_OTHER) does not expose this problem, so I think it's a scheduling related one.
i tried to pole jackd a little bit (just using things like jack_freewheel and jack_impulse_grabber - i dont even know what they do), and got jackd into some sort of userspace loop:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2558 root 16 0 27900 1852 2152 S 97.8 0.8 2:36.38 jackd
attaching gdb to it shows:
Loaded symbols for /usr/local/lib/jack/jack_oss.so 0xffffe410 in ?? ()
(gdb) bt
#0 0xffffe410 in ?? () #1 0xbffff7f8 in ?? () #2 0x00000a67 in ?? () #3 0x00000000 in ?? () #4 0x4db8adf8 in pthread_join () from /lib/tls/libpthread.so.0 #5 0xb77d6e66 in oss_driver_stop (driver=0x8055938) at oss_driver.c:696 #6 0x0804ba03 in jack_engine_delete (engine=0x805c308) at engine.c:2466 #7 0x0804ade7 in main (argc=3, argv=0xbffffb44) at jackd.c:207
(gdb)
it's looping somewhere in the pthread code, and it does no system-calls at all and thus no scheduling as well.
i dont know much about jackit, and it could easily be that something in this kernel broke its interaction with pthread, but it seems to me that this loop is in userspace and is only 'fatal' if the looping thread runs at SCHED_FIFO priority. Could someone with more jackit experience try to figure out what's going on here?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
Quoted 6 lines · Ingo Molnar
i tried to pole jackd a little bit (just using things like
jack_freewheelandjack_impulse_grabber- i dont even know what they do), and got jackd into some sort of userspace loop:PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2558 root 16 0 27900 1852 2152 S 97.8 0.8 2:36.38 jackd
ah ... i should have guessed that "jack_freewheel y" puts jackd into ... freewheeling mode. So this is by design.
i still suspect that it's some sort of userspace loop causing the jackd problems - just that under SCHED_OTHER you dont normally notice it, while with jack -R it's fatal.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
In reply to Rui Nuno CapelaQuoted 9 lines
Quoted 6 lines · Rui Nuno Capela
Quoted 5 lines · Ingo Molnar
i have released the -U8 Real-Time Preemption patch:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U8
[...]
Quoted 8 lines
The fact is jackd -R (realtime mode;
SCHED_FIFO) hosing the system, and thats exposed as soon as some jack audio client application enters into the chain.Running jackd non-realtime (
SCHED_OTHER) does not expose this problem, so I think it's a scheduling related one.[...]
After some trial-and-error cycle, changing kernel configuration options, I come to believe the obvious, that this jackd -R nasty behavior seems to be present (only) if PREEMPT_REALTIME is set (Y).
When PREEMPT_REALTIME is not set (N), it just runs and I can throw any client at 'jackd -R' without hosing the whole system. However, I'm seeing plenty of these:
BUG: scheduling while atomic: jackd/0x00000002/3968 caller is schedule_timeout+0x5a/0xa8 [<c0104ec8>] dump_stack+0x1e/0x20 (20) [<c02cd6d2>] __schedule+0x4c4/0x69e (76) [<c02ce45f>] schedule_timeout+0x5a/0xa8 (60) [<c0169c75>] do_poll+0x9b/0xb9 (48) [<c0169e02>] sys_poll+0x16f/0x225 (76) [<c010408d>] sysenter_past_esp+0x52/0x71 (-8124)
preempt count: 00000003
. 3-level deep critical section nesting:
.. entry 1: ipc_lock_writer+0x2f/0xae / (sys_shmctl+0x88/0x895) .. entry 2: ipc_lock_writer+0xa3/0xae / (sys_shmctl+0x88/0x895) .. entry 3: print_traces+0x16/0x4a / (dump_stack+0x1e/0x20)
BUG: sleeping function called from invalid context jackd(3968) at mm/slab.c:2055 in_atomic():1 [00000002], irqs_disabled():0 [<c0104ec8>] dump_stack+0x1e/0x20 (20) [<c011505f>] __might_sleep+0xb2/0xc5 (36) [<c013e7f8>] __kmalloc+0xa3/0xaa (28) [<c0169d60>] sys_poll+0xcd/0x225 (76) [<c010408d>] sysenter_past_esp+0x52/0x71 (-8124)
preempt count: 00000003
. 3-level deep critical section nesting:
.. entry 1: ipc_lock_writer+0x2f/0xae / (sys_shmctl+0x88/0x895) .. entry 2: ipc_lock_writer+0xa3/0xae / (sys_shmctl+0x88/0x895) .. entry 3: print_traces+0x16/0x4a / (dump_stack+0x1e/0x20)
OTOH, I do get in some trouble elsewhere, but not related to jackd. For example, the system hangs on udev, never managed to shutdown cleanly, and some system monitoring applications just keeps failing completely (e.g. gkrellm).
But I found this on late init:
BUG: Unable to handle kernel NULL pointer dereference at virtual address
00000000
printing eip:c01cbb7d
*pde = 00000000
Oops: 0000 [#1] PREEMPT Modules linked in: realtime commoncap snd_seq_oss snd_seq_midi_event
snd_seq snd_pcm_oss snd_mixer_oss snd_usb_usx2y snd_usb_lib snd_rawmidi snd_seq_device snd_hwdep snd_ali5451 snd_ac97_codec snd_pcm snd_timer snd_page_alloc snd soundcore prism2_cs p80211 ds yenta_socket pcmcia_core natsemi crc32 loop subfs evdev ohci_hcd usbcore thermal processor fan button battery ac
CPU: 0 EIP: 0060:[<c01cbb7d>] Not tainted VLI EFLAGS: 00210246 (2.6.9-rc4-mm1-U9.2)
EIP is at acpi_os_signal_semaphore+0x30/0x4e
eax: df75b700 ebx: 00000001 ecx: 00000000 edx: 00000010
esi: c155c400 edi: 00000000 ebp: de48dd9c esp: de48dd98
ds: 007b es: 007b ss: 0068 preempt: 00000001
Process kdeinit (pid: 3862, threadinfo=de48c000 task=de5af400)
Stack: df750700 de48ddac c01d4b88 df74b160 00000001 de48ddc4 c01d67a2
df750700
df750700 c155c400 c155c400 de48ddd8 c01d3abe df750700 c155c400
00000000
de48ddf8 c01cd2e2 c155c400 00000000 c149c820 c155c400 c155c5ec
00000000
Call Trace:
[<c0104e94>] show_stack+0x80/0x96 (28)
[<c010502f>] show_registers+0x165/0x1de (56)
[<c0105241>] die+0xf6/0x191 (64)
[<c01123ab>] do_page_fault+0x483/0x6a4 (212)
[<c0104af1>] error_code+0x2d/0x38 (72)
[<c01d4b88>] acpi_ex_system_release_mutex+0x28/0x2a (16)
[<c01d67a2>] acpi_ex_release_mutex+0x135/0x154 (24)
[<c01d3abe>] acpi_ex_opcode_1A_0T_0R+0x2a/0x92 (20)
[<c01cd2e2>] acpi_ds_exec_end_op+0xb4/0x28e (32)
[<c01db23e>] acpi_ps_parse_loop+0x528/0x810 (40)
[<c01db57d>] acpi_ps_parse_aml+0x57/0x1c2 (32)
[<c01dbea5>] acpi_psx_execute+0x15d/0x1c4 (28)
[<c01d914d>] acpi_ns_execute_control_method+0x41/0x51 (20)
[<c01d90f2>] acpi_ns_evaluate_by_handle+0x74/0x8e (16)
[<c01d8fed>] acpi_ns_evaluate_relative+0xa9/0xc5 (32)
[<c01d88a5>] acpi_evaluate_object+0xfd/0x1ae (52)
[<c01cbedd>] acpi_evaluate_integer+0x32/0x4f (52)
[<e001a06c>] acpi_button_state_seq_show+0x27/0x64 [button] (32)
[<c0175562>] seq_read+0xd3/0x2cf (60)
[<c015461c>] vfs_read+0xc1/0x13a (44)
[<c015490b>] sys_read+0x4b/0x75 (44)
[<c010408d>] sysenter_past_esp+0x52/0x71 (-8124)preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: die+0x3a/0x191 / (do_page_fault+0x483/0x6a4) .. entry 2: print_traces+0x16/0x4a / (show_stack+0x80/0x96)
Code: 4d 08 8b 5d 0c 85 c9 0f 94 c2 85 db 0f 94 c0 09 d0 ba 01 10 00 00 a8
01 75 28 83 fb 01 66 ba 10 00 77 1f ff 01 0f 8e d2 00 00 00 <8b> 01 48 7e 10 68 29 7e 2e c0 e8 5a c3 f4 ff 5b e8 18 93 f3 ff
As it seemed an ACPI issue, I turned it off and the troubles went away. Again, all this is happening with PREEMPT_REALTIME off.
Bye now.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
In reply to Ingo MolnarQuoted 4 lines · Ingo Molnar
i have released the -U8 Real-Time Preemption patch:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U8
Grr. I got this -U8 mail *before* I got the -U7 mail.
All thruout these U# kernels, I get stalls in X(everything pauses, not sure if remote pings stop). Nothing shows in dmesg when this occurs.
I had been running rc kernels for awhile, without these problems. I had not run any mm kernels, but I have run all the U kernels(but not U7).
Compiling/rebooting.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U8
Quoted 11 lines · Adam Heath
Quoted 4 lines · Ingo Molnar
i have released the -U8 Real-Time Preemption patch:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U8
Grr. I got this -U8 mail *before* I got the -U7 mail.
All thruout these U# kernels, I get stalls in
X(everything pauses, not sure if remote pings stop). Nothing shows in dmesg when this occurs.
Got some input on this.
Heavy disk and/or network i/o seems to cause the pauses. Doing a copy over nfs(writing to disk), or using scp gives me 1-2 MB/s. If I boot plain rc4, I get full network speed(10-11 MB/s with nfs, 5-8 MB/s with scp).
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo Molnari have released the -U9 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this too is a fixes-only release. It includes more driver fixes and improvements from Thomas Gleixner.
Changes since -U8.1:
- USB semaphore->completion conversion from Thomas Gleixner
- netconsole fixes from Michal Schmidt
- fbcon fixes
- added counted semaphores, this is now used by firewire, XFS and ACPI. This could fix the firewire breakage - but testing would be welcome.
- PREEMPT_ACTIVE irqs-enabled critical path removal.
- fixed irqs-off raw spinlock primitives on UP: they enabled irqs before enabling preemption, creating a window for an interrupt to slip in and increase the critical path.
- made the deadlock detector not crash the current process - it will just hang. This produces far nicer log output while still not endangering stability. Also, fixed a bug in the detector that happens if the trace buffer overflows.
- made the atomic-counter-underflow detector non-fatal as well, for the same reasons.
to create a -U9 tree from scratch, the patching order is:
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.8.tar.bz2
+ http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.9-rc4.bz2
+ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/2.6.9-rc4-mm1.bz2
+ http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U9
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 5 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
impi watchdog conversion to completion api.
tglx
diff --exclude='*~' -urN 2.6.9-rc4-mm1-RT-U9/drivers/char/ipmi/ipmi_watchdog.c 2.6.9-rc4-mm1-U9-E0/drivers/char/ipmi/ipmi_watchdog.c
--- 2.6.9-rc4-mm1-RT-U9/drivers/char/ipmi/ipmi_watchdog.c 2004-10-21
15:47:23.000000000 +0200
+++ 2.6.9-rc4-mm1-U9-E0/drivers/char/ipmi/ipmi_watchdog.c 2004-10-21
15:41:53.000000000 +0200
@@ -386,16 +386,16 @@
when both messages are free. */
static atomic_t heartbeat_tofree = ATOMIC_INIT(0); static DECLARE_MUTEX(heartbeat_lock);
-static DECLARE_MUTEX(heartbeat_wait_lock); +static DECLARE_COMPLETION(heartbeat_received);
static void heartbeat_free_smi(struct ipmi_smi_msg *msg) {
if (atomic_dec_and_test(&heartbeat_tofree))
- up(&heartbeat_wait_lock);
+ complete(&heartbeat_received);
}
static void heartbeat_free_recv(struct ipmi_recv_msg *msg) {
if (atomic_dec_and_test(&heartbeat_tofree))
- up(&heartbeat_wait_lock);
+ complete(&heartbeat_received);
}
static struct ipmi_smi_msg heartbeat_smi_msg =
{
@@ -473,7 +473,7 @@
}
/* Wait for the heartbeat to be sent. */
- down(&heartbeat_wait_lock);
+ wait_for_completion(&heartbeat_received);
if (heartbeat_recv_msg.msg.data[0] != 0) {
/* Got an error in the heartbeat response. It was already
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 8 lines · Thomas Gleixner
Quoted 5 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
impi watchdog conversion to completion api.
Sorry, I copied the wrong file to the correct place.
tglx
diff --exclude='*~' -urN 2.6.9-rc4-mm1-RT-U9/drivers/char/ipmi/ipmi_watchdog.c 2.6.9-rc4-mm1-U9-E0/drivers/char/ipmi/ipmi_watchdog.c
--- 2.6.9-rc4-mm1-RT-U9/drivers/char/ipmi/ipmi_watchdog.c 2004-10-21
15:47:23.000000000 +0200
+++ 2.6.9-rc4-mm1-U9-E0/drivers/char/ipmi/ipmi_watchdog.c 2004-10-21
16:25:14.000000000 +0200
@@ -47,6 +47,7 @@
#include <linux/reboot.h>
#include <linux/wait.h>
#include <linux/poll.h>
+#include <linux/completion.h>
#ifdef CONFIG_X86_LOCAL_APIC
#include <asm/apic.h>
#endif
@@ -386,16 +387,16 @@
when both messages are free. */
static atomic_t heartbeat_tofree = ATOMIC_INIT(0); static DECLARE_MUTEX(heartbeat_lock);
-static DECLARE_MUTEX(heartbeat_wait_lock); +static DECLARE_COMPLETION(heartbeat_received);
static void heartbeat_free_smi(struct ipmi_smi_msg *msg) {
if (atomic_dec_and_test(&heartbeat_tofree))
- up(&heartbeat_wait_lock);
+ complete(&heartbeat_received);
}
static void heartbeat_free_recv(struct ipmi_recv_msg *msg) {
if (atomic_dec_and_test(&heartbeat_tofree))
- up(&heartbeat_wait_lock);
+ complete(&heartbeat_received);
}
static struct ipmi_smi_msg heartbeat_smi_msg =
{
@@ -473,7 +474,7 @@
}
/* Wait for the heartbeat to be sent. */
- down(&heartbeat_wait_lock);
+ wait_for_completion(&heartbeat_received);
if (heartbeat_recv_msg.msg.data[0] != 0) {
/* Got an error in the heartbeat response. It was already
@@ -944,7 +945,6 @@
{
int rv;
- init_MUTEX_LOCKED(&heartbeat_wait_lock);
printk(KERN_INFO PFX "driver version "
IPMI_WATCHDOG_VERSION "\n");
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 3 lines · Ingo Molnar
- netconsole fixes from Michal Schmidt
The #ifdef is not right. Patch attached.
Michal
drivers/net/netconsole.c +1 -1
@@ -74,7 +74,7 @@ static void write_msg(struct console *coreturn ;local_irq_save (flags); -#ifdef PREEMPT_REALTIME +#ifdef CONFIG_PREEMPT_REALTIME /* * A bit hairy. Netconsole uses mutexes (indirectly) and * thus must have interrupts enabled:
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 6 lines · Michal Schmidt
Quoted 3 lines · Ingo Molnar
- netconsole fixes from Michal Schmidt
The #ifdef is not right. Patch attached.
indeed - i've added this to -U9.2 too.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 40 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this too is a fixes-only release. It includes more driver fixes and improvements from Thomas Gleixner.
Changes since -U8.1:
- USB
semaphore->completionconversion from Thomas Gleixner- netconsole fixes from Michal Schmidt
- fbcon fixes
- added counted semaphores, this is now used by firewire, XFS and ACPI. This could fix the firewire breakage - but testing would be welcome.
-
PREEMPT_ACTIVEirqs-enabled critical path removal.- fixed irqs-off raw spinlock primitives on UP: they enabled irqs before enabling preemption, creating a window for an interrupt to slip in and increase the critical path.
- made the deadlock detector not crash the current process - it will just hang. This produces far nicer log output while still not endangering stability. Also, fixed a bug in the detector that happens if the trace buffer overflows.
- made the atomic-counter-underflow detector non-fatal as well, for the same reasons.
to create a -U9 tree from scratch, the patching order is:
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.8.tar.bz2
+ http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.9-rc4.bz2
+ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/2.6.9-rc4-mm1.bz2
+ http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U9
Quoted 9 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hey,
The kernel booted now with my firewire card plugged in. However when i try to mount my reiser4 partition i get following error
BUG: semaphore recursion deadlock detected!
.. current task mount/10514 is already holding ccb5bb4c.
c022d6cb cf25d8f0 ccb5bae8 00002912 ccb5bb4c 00000000 ccb5bb48 ccb5a000
ccb5bb4c cf25d8f0 00000000 ccb5bb48 c0344760 ccb5bb4c 0000019d
ccb5bb50
ccb5bb50 cf25d8f0 00000002 ccabdc00 ccb5bb4c d0b26a08 ccabdd4c
c0120005
Call Trace:
[<c022d6cb>] __rwsem_deadlock+0xd9/0x12d (4)
[<c0344760>] down_write+0x103/0x1a6 (48)
[<d0b26a08>] kcond_wait+0xaa/0xac [reiser4] (36)
[<c0120005>] do_fork+0x133/0x18a (8)
[<c03443a8>] out_of_line_wait_on_bit+0x91/0x99 (32)
[<c0134273>] wake_bit_function+0x0/0x55 (28)
[<c0134c36>] check_preempt_timing+0x6e/0x1a4 (16)
[<c034471a>] down_write+0xbd/0x1a6 (56)
[<c034471a>] down_write+0xbd/0x1a6 (12)
[<d0b280b0>] start_ktxnmgrd+0x98/0x9a [reiser4] (36)
[<d0b33716>] reiser4_fill_super+0x3b/0x71 [reiser4] (28)
[<c0160854>] sb_set_blocksize+0x2e/0x5d (588)
[<c01603fd>] get_sb_bdev+0xf9/0x132 (24)
[<d0b2d569>] reiser4_get_sb+0x2f/0x33 [reiser4] (68)
[<d0b336db>] reiser4_fill_super+0x0/0x71 [reiser4] (20)
[<c016061a>] do_kern_mount+0x4f/0xc0 (4)
[<c0175945>] do_new_mount+0x9c/0xe1 (36)
[<c0175feb>] do_mount+0x145/0x194 (44)
[<c034471a>] down_write+0xbd/0x1a6 (48)
[<c0175e4d>] copy_mount_options+0x63/0xbc (32)
[<c0176459>] sys_mount+0x9f/0xe0 (32)
[<c01060b1>] sysenter_past_esp+0x52/0x71 (44)preempt count: 00000003
. 3-level deep critical section nesting:
.. entry 1: down_write+0x1a1/0x1a6 / (0x0)
.. entry 2: down_write+0x6a/0x1a6 / (0x0)
.. entry 3: print_traces+0x17/0x50 / (0x0)
------------[ cut here ]------------ kernel BUG at lib/rwsem-generic.c:601! invalid operand: 0000 [#1] PREEMPT Modules linked in: reiser4 airo_cs airo ohci_hcd ehci_hcd 8139cp mii ohci1394 ieee1394 snd_intel8x0 snd_ac97_codec usbhid uhci_hcd intel_agp agpgart snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_pcm snd_timer snd_page_alloc snd_mixer_oss snd usbcore vfat fat CPU: 0 EIP: 0060:[<c022dc15>] Not tainted VLI EFLAGS: 00010202 (2.6.9-rc4-mm1-RT-U9.1)
EIP is at up_write+0x1dc/0x1e9
eax: cca0a000 ebx: ccb5bb48 ecx: 0000002f edx: cf25d8f0
esi: ccb5bb4c edi: ccabdc00 ebp: cf1ad970 esp: cca0bf84
ds: 007b es: 007b ss: 0068 preempt: 00000001
Process ktxnmgrd (pid: 10544, threadinfo=cca0a000 task=cf1ad970)
Stack: 00000001 cf1ad970 ccabdc00 cf1ad970 ccb5bb48 ccabdc00 ccabdc00 cf1ad970
d0b26b9f ccabdc00 cdf87000 ccabdd4c d0b27de5 ccabdc00 c0105fda
cf205260
d0b27d4c 00000000 cc9d5400 00000000 00000000 00000000 cca0a000
d0b27d4c
Call Trace:
[<d0b26b9f>] kcond_broadcast+0x23/0x46 [reiser4] (36)
[<d0b27de5>] ktxnmgrd+0x99/0x22c [reiser4] (16)
[<c0105fda>] ret_from_fork+0x6/0x14 (8)
[<d0b27d4c>] ktxnmgrd+0x0/0x22c [reiser4] (8)
[<d0b27d4c>] ktxnmgrd+0x0/0x22c [reiser4] (28)
[<c01042a9>] kernel_thread_helper+0x5/0xb (16)preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: die+0x39/0x198 / (0x0)
.. entry 2: print_traces+0x17/0x50 / (0x0)
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 6 lines · Gunther Persoons
The kernel booted now with my firewire card plugged in. However when i try to mount my reiser4 partition i get following error
BUG: semaphore recursion deadlock detected!.. current task mount/10514 is already holding
ccb5bb4c.
Quoted 10 lines
[<c0344760>] down_write+0x103/0x1a6 (48) [<d0b26a08>] kcond_wait+0xaa/0xac [reiser4] (36) [<d0b280b0>] start_ktxnmgrd+0x98/0x9a [reiser4] (36) [<d0b33716>] reiser4_fill_super+0x3b/0x71 [reiser4] (28) [<d0b2d569>] reiser4_get_sb+0x2f/0x33 [reiser4] (68) [<c016061a>] do_kern_mount+0x4f/0xc0 (4) [<c0175945>] do_new_mount+0x9c/0xe1 (36) [<c0175feb>] do_mount+0x145/0x194 (44) [<c0176459>] sys_mount+0x9f/0xe0 (32) [<c01060b1>] sysenter_past_esp+0x52/0x71 (44)
reiser4 has some pretty ugly locking abstraction called kcond, i took a look but it doesnt seem simple to convert it. Reiserfs should really use a normal Linux waitqueue and nothing more...
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 20 lines · Ingo Molnar
Quoted 6 lines · Gunther Persoons
The kernel booted now with my firewire card plugged in. However when i try to mount my reiser4 partition i get following error
BUG: semaphore recursion deadlock detected!.. current task mount/10514 is already holding
ccb5bb4c.Quoted 10 lines
[<c0344760>] down_write+0x103/0x1a6 (48) [<d0b26a08>] kcond_wait+0xaa/0xac [reiser4] (36) [<d0b280b0>] start_ktxnmgrd+0x98/0x9a [reiser4] (36) [<d0b33716>] reiser4_fill_super+0x3b/0x71 [reiser4] (28) [<d0b2d569>] reiser4_get_sb+0x2f/0x33 [reiser4] (68) [<c016061a>] do_kern_mount+0x4f/0xc0 (4) [<c0175945>] do_new_mount+0x9c/0xe1 (36) [<c0175feb>] do_mount+0x145/0x194 (44) [<c0176459>] sys_mount+0x9f/0xe0 (32) [<c01060b1>] sysenter_past_esp+0x52/0x71 (44)
Quoted 1 line
reiser4 has some pretty ugly locking abstraction called kcond, i took a
It's fairly standard condition variable.
Quoted 2 lines
look but it doesnt seem simple to convert it. Reiserfs should really use a normal Linux waitqueue and nothing more...
Why? Condition variable is very well known and widely used concept. In the area of their applicability (where predicate whose change is waited upon is protected by a single lock) they provide clean and easily recognizable synchronization device.
Real problem in this case is failure of "semaphore deadlock detection" to cope with perfectly legal semaphore usage (down() by thread T1, up() by thread T2). As one possible solution kcond can be re-written on top of beloved "normal Linux waitqueue".
Nikita.
Quoted 2 lines
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 7 lines · Nikita Danilov
Quoted 2 lines
look but it doesnt seem simple to convert it. Reiserfs should really use a normal Linux waitqueue and nothing more...
Why? Condition variable is very well known and widely used concept. In the area of their applicability (where predicate whose change is waited upon is protected by a single lock) they provide clean and easily recognizable synchronization device.
sorry, but just look at the kcond code and compare the 'fastpath' with say the fastpath of Linux semaphores or waitqueue handling.
condition variables (here i dont mean your code specifically, but the general pthread concept) are simply trying to achieve too much via a single object, which increases their complexity quite significantly.
Separating out a few select atomic synchronization primitives that can be used for each appropriate purpose does the job equally well.
condition variables are fine if you 1) already know them from userspace and 2) want to use a single locking abstraction for everything. It is thus also a kitchen-sink primitive that is inevitably slow and complex. I still have to see a locking problem where condvars are the cleanest/simplest answer, and i've yet to see a locking problem where condvars are not the slowest answer ;)
of course this too is valid kernel code so i'm not complaining at all. It was simply too complex to be converted at first sight to PREEMPT_REALTIME.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 6 lines · Ingo Molnar
Quoted 3 lines · Nikita Danilov
Quoted 2 lines
look but it doesnt seem simple to convert it. Reiserfs should really use a normal Linux waitqueue and nothing more...
Quoted 7 lines
Quoted 4 lines
Why? Condition variable is very well known and widely used concept. In the area of their applicability (where predicate whose change is waited upon is protected by a single lock) they provide clean and easily recognizable synchronization device.
sorry, but just look at the kcond code and compare the 'fastpath' with say the fastpath of Linux semaphores or waitqueue handling.
Agree completely. kcond implementation is very inefficient. But it's "obviously correct" at that. Idea was to optimize it later, when we would have time for this. Didn't happen so far.
Quoted 4 lines
condition variables (here i dont mean your code specifically, but the general pthread concept) are simply trying to achieve too much via a single object, which increases their complexity quite significantly.
This is quite questionable. Where is this complexity? Standard condition variable usage looks like
spin_lock(&lock);
while (!predicate)
kcond_wait(&cond_var, &lock);
/*
* at this point predicate is true and @lock is held
*/This can, of course, be implemented with wait-queues, but:
- condition variables are used idiomatically, and hence, contain strong hint about what code tries to achieve.
- their API is designed to match their (rather narrow) usage. For example, kcond_wait() takes lock as an argument and can (given proper debugging support in the spin-lock implementation) check that this lock is actually locked by the calling thread.
Quoted 3 lines
Separating out a few select atomic synchronization primitives that can be used for each appropriate purpose does the job equally well.
Difference between a condition variable and "atomic synchronization primitives" is like difference between a spin-lock and open-coded Dekker
algorithm: both provide you with mutual exclusion, but the former gives one distinct clue about what is going on.
Umm... I have better example: every algorithm can be coded without loop statements, with goto-s only. And (given proper programmer) goto produces better assembly than while(). Does this constitutes an argument in favor of throwing away all these wimpy loops that no Real Programmer should use?
Quoted 7 lines
condition variables are fine if you 1) already know them from userspace and 2) want to use a single locking abstraction for everything. It is thus also a kitchen-sink primitive that is inevitably slow and complex. I still have to see a locking problem where condvars are the cleanest/simplest answer, and i've yet to see a locking problem where condvars are not the slowest answer ;)
A kernel daemon that waits for some work to do is an example.
(And just to fight what seems to be common misconception: condition variables were not introduced by POSIX committee, they are much older than that. As all synchronization primitives they originate from the kernel land.)
Quoted 2 lines
of course this too is valid kernel
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 8 lines · Nikita Danilov
Quoted 6 lines
condition variables are fine if you 1) already know them from userspace and 2) want to use a single locking abstraction for everything. It is thus also a kitchen-sink primitive that is inevitably slow and complex. I still have to see a locking problem where condvars are the cleanest/simplest answer, and i've yet to see a locking problem where condvars are not the slowest answer ;)
A kernel daemon that waits for some work to do is an example.
what type of work - could you be a bit more specific?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 10 lines · Ingo Molnar
Quoted 7 lines · Nikita Danilov
Quoted 6 lines
condition variables are fine if you 1) already know them from userspace and 2) want to use a single locking abstraction for everything. It is thus also a kitchen-sink primitive that is inevitably slow and complex. I still have to see a locking problem where condvars are the cleanest/simplest answer, and i've yet to see a locking problem where condvars are not the slowest answer ;)
Quoted 3 lines
Quoted 1 line
A kernel daemon that waits for some work to do is an example.
what type of work - could you be a bit more specific?
Take a loop in fs/cifs/cifsfs.c:cifs_oplock_thread() (I won't copy it here to avoid you all going blind). It can be recoded as
while(1) {
spin_lock(&GlobalMid_Lock);
while (list_empty(&GlobalOplock_Q)) {
if (kcond_timedwait(&SomeCIFSCVAR, &GlobalMid_Lock, HZ) == -EINTR) {
spin_unlock(&GlobalMid_Lock);
complete_and_exit(&cifs_oplock_exited, 0);
}
}
oplock_item = list_entry(GlobalOplock_Q.next, struct oplock_q_entry, qhead);
/* do stuff with oplock_item ... */
spin_unlock(&GlobalMid_Lock);
....
}Point is that this is very stylistic usage---easily recognizable.
Quoted 2 lines
Ingo
Nikita.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 7 lines · Nikita Danilov
Quoted 3 lines
Quoted 1 line
A kernel daemon that waits for some work to do is an example.
what type of work - could you be a bit more specific?
Take a loop in fs/cifs/cifsfs.c:cifs_oplock_thread() (I won't copy it here to avoid you all going blind). It can be recoded as
Quoted 13 lines
while(1) {
spin_lock(&GlobalMid_Lock);
while (list_empty(&GlobalOplock_Q)) {
if (kcond_timedwait(&SomeCIFSCVAR, &GlobalMid_Lock, HZ) == -EINTR) {
spin_unlock(&GlobalMid_Lock);
complete_and_exit(&cifs_oplock_exited, 0);
}
}
oplock_item = list_entry(GlobalOplock_Q.next, struct oplock_q_entry, qhead);
/* do stuff with oplock_item ... */
spin_unlock(&GlobalMid_Lock);
....
}in this particular case i'd use a workqueue, which would simplify this down to something like:
workqueue_handler()
{
spin_lock(&GlobalMid_Lock);
oplock_item = list_entry(GlobalOplock_Q.next, ...);
/* do stuff with oplock_item */
spin_unlock(&GlobalMid_Lock);
}and instead of playing games with signals to exit the worker thread, i'd use destroy_workqueue().
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 31 lines · Ingo Molnar
Quoted 10 lines · Gunther Persoons
The kernel booted now with my firewire card plugged in. However when i try to mount my reiser4 partition i get following error
BUG: semaphore recursion deadlock detected!.. current task mount/10514 is already holding
ccb5bb4c.Quoted 12 lines
[<c0344760>] down_write+0x103/0x1a6 (48) [<d0b26a08>] kcond_wait+0xaa/0xac [reiser4] (36) [<d0b280b0>] start_ktxnmgrd+0x98/0x9a [reiser4] (36) [<d0b33716>] reiser4_fill_super+0x3b/0x71 [reiser4] (28) [<d0b2d569>] reiser4_get_sb+0x2f/0x33 [reiser4] (68) [<c016061a>] do_kern_mount+0x4f/0xc0 (4) [<c0175945>] do_new_mount+0x9c/0xe1 (36) [<c0175feb>] do_mount+0x145/0x194 (44) [<c0176459>] sys_mount+0x9f/0xe0 (32) [<c01060b1>] sysenter_past_esp+0x52/0x71 (44)reiser4 has some pretty ugly locking abstraction called kcond, i took a look but it doesnt seem simple to convert it. Reiserfs should really use a normal Linux waitqueue and nothing more...
Quoted 9 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Got a second error, while compiling a new kernel my network connection got down
BUG: semaphore recursion deadlock detected!
.. current task eth0/10202 is already holding cc9345ac.
cc9345ac c03433b7 cfe51260 ccb5e000 cc9345ac cd11c740 ccb5ff8c ffffe000
c034490c cc9345ac 000001d9 cc9345b0 cc9345b0 cd11c740 00000002
cc9343e0
ccb5e000 cc934644 ffffe000 d0a7a136 c5fcd280 cc934000 ccb5e000
c0105fda
Call Trace:
[<c03433b7>] __sched_text_start+0x2e3/0x5e2 (8)
[<c034490c>] down_write_interruptible+0x109/0x243 (28)
[<d0a7a136>] airo_thread+0x82/0x2a0 [airo] (44)
[<c0105fda>] ret_from_fork+0x6/0x14 (16)
[<c011d046>] default_wake_function+0x0/0x12 (12)
[<d0a7a0b4>] airo_thread+0x0/0x2a0 [airo] (24)
[<c01042a9>] kernel_thread_helper+0x5/0xb (16)preempt count: 00000003
. 3-level deep critical section nesting:
.. entry 1: down_write_interruptible+0x23e/0x243 / (0x0) .. entry 2: down_write_interruptible+0x6c/0x243 / (0x0) .. entry 3: print_traces+0x17/0x50 / (0x0)
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9 HOTFIX
In reply to Ingo MolnarQuoted 2 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
tglx
diff --exclude='*~' -urN 2.6.9-rc4-mm1-RT-U9/kernel/sched.c 2.6.9-rc4-mm1-U9-E0/kernel/sched.c
--- 2.6.9-rc4-mm1-RT-U9/kernel/sched.c 2004-10-21 15:47:21.000000000
+0200
+++ 2.6.9-rc4-mm1-U9-E0/kernel/sched.c 2004-10-21 17:17:44.000000000
+0200
@@ -3185,9 +3185,9 @@
__set_current_state(TASK_UNINTERRUPTIBLE); spin_unlock_irq(&x->wait.lock); timeout = schedule_timeout(timeout);
+ spin_lock_irq(&x->wait.lock);
if (!timeout)
goto out;
- spin_lock_irq(&x->wait.lock);
} while (!x->done); __remove_wait_queue(&x->wait, &wait);
}
@@ -3250,8 +3250,10 @@
} __set_current_state(TASK_INTERRUPTIBLE); spin_unlock_irq(&x->wait.lock);
- schedule();
- spin_lock_irq(&x->wait.lock);
+ timeout = schedule_timeout(timeout);
+ spin_lock_irq(&x->wait.lock);
+ if (!timeout)
+ goto out;
} while (!x->done); __remove_wait_queue(&x->wait, &wait);
}
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9 HOTFIX
Review
Quoted 11 lines · Thomas Gleixner
(quoted diff) +5
-3+ spin_lock_irq(&x->wait.lock); if (!timeout) goto out; - spin_lock_irq(&x->wait.lock); - schedule(); - spin_lock_irq(&x->wait.lock); + timeout = schedule_timeout(timeout); + spin_lock_irq(&x->wait.lock); + if (!timeout) + goto out;
yeah. I've added these fixes and uploaded -U9.2.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
Finally a patch that I can get booted on my older SMP system at home again. More correctly it is U9.2. I have been having problems with these hanging after U5. Haven't had a ton of time to try to track down the problems and didn't want to report problems without having done enough troubleshooting. Anyway, I got this while booting U9.2.
kr
Oct 21 12:33:22 porky kernel: BUG: atomic counter underflow at: Oct 21 12:33:22 porky kernel: [<c0254dd8>] qdisc_destroy+0x98/0xa0 (12) Oct 21 12:33:22 porky kernel: [<c0254fed>] dev_shutdown+0x3d/0xa0 (16) Oct 21 12:33:22 porky kernel: [<c024773b>] unregister_netdevice+0x13b/0x280 (28) Oct 21 12:33:22 porky netfs: Mounting other filesystems: succeeded Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (12) Oct 21 12:33:22 porky kernel: [<e09a6160>] tulip_remove_one+0x0/0xa0 [tulip] (4) Oct 21 12:33:22 porky kernel: [<c02058de>] unregister_netdev+0x1e/0x30 (24) Oct 21 12:33:22 porky kernel: [<e09a618f>] tulip_remove_one+0x2f/0xa0 [tulip] (16) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (8) Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (8) Oct 21 12:33:22 porky kernel: [<c01c4e26>] pci_device_remove+0x76/0x80 (20) Oct 21 12:33:22 porky kernel: [<c01f573b>] device_detach_shutdown+0xb/0x40 (12) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (12) Oct 21 12:33:22 porky kernel: [<c01f293b>] driver_detach+0x2b/0x40 (24) Oct 21 12:33:22 porky kernel: [<c01f2daf>] bus_remove_driver+0x3f/0x70 (20) Oct 21 12:33:22 porky kernel: [<c01f32b9>] driver_unregister+0x19/0x30 (20) Oct 21 12:33:22 porky kernel: [<c01c50cc>] pci_unregister_driver+0x1c/0x30 (16) Oct 21 12:33:22 porky kernel: [<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) Oct 21 12:33:22 porky kernel: [<c0139801>] sys_delete_module+0x121/0x150 (12) Oct 21 12:33:22 porky kernel: [<c01531a1>] sys_munmap+0x51/0x60 (64) Oct 21 12:33:22 porky kernel: [<c0116a20>] do_page_fault+0x0/0x660 (16) Oct 21 12:33:22 porky kernel: [<c0106719>] sysenter_past_esp+0x52/0x71 (16) Oct 21 12:33:22 porky kernel: preempt count: 00000001 Oct 21 12:33:22 porky kernel: . 1-level deep critical section nesting: Oct 21 12:33:22 porky kernel: .. entry 1: print_traces+0x1d/0x60 / (dump_stack+0x23/0x30) Oct 21 12:33:22 porky kernel: Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 4 lines · K.R. Foley
Quoted 3 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
Quoted 8 lines
Quoted 2 lines
Finally a patch that I can get booted on my older SMP system at home again. More correctly it is U9.2. I have been having problems with these hanging after U5. Haven't had a ton of time to try to track down the problems and didn't want to report problems without having done enough troubleshooting. Anyway, I got this while booting U9.2.
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
tglx
Quoted 28 lines
Oct 21 12:33:22 porky kernel: BUG: atomic counter underflow at: Oct 21 12:33:22 porky kernel: [<c0254dd8>] qdisc_destroy+0x98/0xa0 (12) Oct 21 12:33:22 porky kernel: [<c0254fed>] dev_shutdown+0x3d/0xa0 (16) Oct 21 12:33:22 porky kernel: [<c024773b>] unregister_netdevice+0x13b/0x280 (28) Oct 21 12:33:22 porky netfs: Mounting other filesystems: succeeded Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (12) Oct 21 12:33:22 porky kernel: [<e09a6160>] tulip_remove_one+0x0/0xa0 [tulip] (4) Oct 21 12:33:22 porky kernel: [<c02058de>] unregister_netdev+0x1e/0x30 (24) Oct 21 12:33:22 porky kernel: [<e09a618f>] tulip_remove_one+0x2f/0xa0 [tulip] (16) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (8) Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (8) Oct 21 12:33:22 porky kernel: [<c01c4e26>] pci_device_remove+0x76/0x80 (20) Oct 21 12:33:22 porky kernel: [<c01f573b>] device_detach_shutdown+0xb/0x40 (12) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (12) Oct 21 12:33:22 porky kernel: [<c01f293b>] driver_detach+0x2b/0x40 (24) Oct 21 12:33:22 porky kernel: [<c01f2daf>] bus_remove_driver+0x3f/0x70 (20) Oct 21 12:33:22 porky kernel: [<c01f32b9>] driver_unregister+0x19/0x30 (20) Oct 21 12:33:22 porky kernel: [<c01c50cc>] pci_unregister_driver+0x1c/0x30 (16) Oct 21 12:33:22 porky kernel: [<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) Oct 21 12:33:22 porky kernel: [<c0139801>] sys_delete_module+0x121/0x150 (12) Oct 21 12:33:22 porky kernel: [<c01531a1>] sys_munmap+0x51/0x60 (64) Oct 21 12:33:22 porky kernel: [<c0116a20>] do_page_fault+0x0/0x660 (16) Oct 21 12:33:22 porky kernel: [<c0106719>] sysenter_past_esp+0x52/0x71 (16) Oct 21 12:33:22 porky kernel: preempt count: 00000001 Oct 21 12:33:22 porky kernel: . 1-level deep critical section nesting: Oct 21 12:33:22 porky kernel: .. entry 1: print_traces+0x1d/0x60 / (dump_stack+0x23/0x30) Oct 21 12:33:22 porky kernel: Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 13 lines · Thomas Gleixner
Quoted 9 lines · K.R. Foley
Quoted 5 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
Finally a patch that I can get booted on my older SMP system at home again. More correctly it is U9.2. I have been having problems with these hanging after U5. Haven't had a ton of time to try to track down the problems and didn't want to report problems without having done enough troubleshooting. Anyway, I got this while booting U9.2.
Quoted 6 lines
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
tglx
Actually I do have the tulip card in the box and I am pulling this stuff from the logs over that connection now. Here are the next lines from the log that might help.
Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removed without pro perly calling pci_disable_device(). This may need fixing. Oct 21 12:33:22 porky kernel: hda: ATAPI 48X CD-ROM CD-R/RW drive, 8192kB Cache, UDMA(33) Oct 21 12:33:22 porky kernel: Uniform CD-ROM driver Revision: 3.20 Oct 21 12:33:22 porky kernel: hdc: ATAPI 48X CD-ROM drive, 120kB Cache, UDMA(33) Oct 21 12:33:22 porky kernel: ip_tables: (C) 2000-2002 Netfilter core team Oct 21 12:33:22 porky kernel: Linux Tulip driver version 1.1.13 (May 11, 2002) Oct 21 12:33:22 porky kernel: PCI: Found IRQ 5 for device 0000:04:0a.0 Oct 21 12:33:22 porky kernel: PCI: Sharing IRQ 5 with 0000:04:05.1 Oct 21 12:33:22 porky kernel: tulip0: EEPROM default media type Autosense. Oct 21 12:33:22 porky kernel: tulip0: Index #0 - Media MII (#11) described by a 21140 MII PHY (1) block. Oct 21 12:33:22 porky kernel: tulip0: MII transceiver #3 config 3100 status 780 9 advertising 01e1. Oct 21 12:33:22 porky kernel: eth0: Digital DS21140 Tulip rev 32 at 0xe480, 00:0
0:C0:7F:A0:E9, IRQ 5.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 8 lines · K.R. Foley
Quoted 4 lines
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
Actually I do have the tulip card in the box and I am pulling this stuff from the logs over that connection now. Here are the next lines from the log that might help.
Not really. We must figure out, why sys_delete_module is called.
[<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) [<c0139801>] sys_delete_module+0x121/0x150 (12) <<-------- [<c01531a1>] sys_munmap+0x51/0x60 (64) [<c0116a20>] do_page_fault+0x0/0x660 (16) [<c0106719>] sysenter_past_esp+0x52/0x71 (16)
Quoted 3 lines
Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removedwithout pro
perly callingpci_disable_device(). This may need fixing.
This one is a result of the BUG()
tglx
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 11 lines · Thomas Gleixner
Quoted 6 lines · K.R. Foley
Quoted 4 lines
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
Actually I do have the tulip card in the box and I am pulling this stuff from the logs over that connection now. Here are the next lines from the log that might help.
Not really. We must figure out, why
sys_delete_moduleis called.
Understand. I did not mean the log would help figure it out, but that it would explain that the card really is present. :)
My guess is that it is prematurely unloading the driver before it's fully registered, like you said. The question is why? Also I am not in front of the system right now so I can't unload the module to see if it generates the error again, but I will try it when I get home.
Quoted 18 lines
[<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) [<c0139801>] sys_delete_module+0x121/0x150 (12) <<-------- [<c01531a1>] sys_munmap+0x51/0x60 (64) [<c0116a20>] do_page_fault+0x0/0x660 (16) [<c0106719>] sysenter_past_esp+0x52/0x71 (16)Quoted 2 lines
Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling
pci_disable_device(). This may need fixing.This one is a result of the
BUG()tglx
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Thomas GleixnerQuoted 10 lines · Thomas Gleixner
Quoted 6 lines · K.R. Foley
Quoted 4 lines
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
Actually I do have the tulip card in the box and I am pulling this stuff from the logs over that connection now. Here are the next lines from the log that might help.
More info on this:
As mentioned before, I get this on boot (every boot):
Oct 21 12:33:22 porky kernel: Linux Tulip driver version 1.1.13 (May 11, 2002) Oct 21 12:33:22 porky kernel: PCI: Found IRQ 5 for device 0000:04:0a.0 Oct 21 12:33:22 porky kernel: PCI: Sharing IRQ 5 with 0000:04:05.1 Oct 21 12:33:22 porky kernel: tulip0: EEPROM default media type Autosense. Oct 21 12:33:22 porky kernel: tulip0: Index #0 - Media MII (#11) described by a 21140 MII PHY (1) block. Oct 21 12:33:22 porky kernel: tulip0: MII transceiver #3 config 3100 status 7809 advertising 01e1. Oct 21 12:33:22 porky kernel: eth0: Digital DS21140 Tulip rev 32 at 0xe480, 00:00:C0:7F:A0:E9, IRQ 5. Oct 21 12:33:22 porky kernel: BUG: atomic counter underflow at: Oct 21 12:33:22 porky kernel: [<c0254dd8>] qdisc_destroy+0x98/0xa0 (12) Oct 21 12:33:22 porky kernel: [<c0254fed>] dev_shutdown+0x3d/0xa0 (16) Oct 21 12:33:22 porky kernel: [<c024773b>] unregister_netdevice+0x13b/0x280 (28) Oct 21 12:33:22 porky netfs: Mounting other filesystems: succeeded Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (12) Oct 21 12:33:22 porky kernel: [<e09a6160>] tulip_remove_one+0x0/0xa0 [tulip] (4) Oct 21 12:33:22 porky kernel: [<c02058de>] unregister_netdev+0x1e/0x30 (24) Oct 21 12:33:22 porky kernel: [<e09a618f>] tulip_remove_one+0x2f/0xa0 [tulip] (16) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (8) Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (8) Oct 21 12:33:22 porky kernel: [<c01c4e26>] pci_device_remove+0x76/0x80 (20) Oct 21 12:33:22 porky kernel: [<c01f573b>] device_detach_shutdown+0xb/0x40 (12) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (12) Oct 21 12:33:22 porky kernel: [<c01f293b>] driver_detach+0x2b/0x40 (24) Oct 21 12:33:22 porky kernel: [<c01f2daf>] bus_remove_driver+0x3f/0x70 (20) Oct 21 12:33:22 porky kernel: [<c01f32b9>] driver_unregister+0x19/0x30 (20) Oct 21 12:33:22 porky kernel: [<c01c50cc>] pci_unregister_driver+0x1c/0x30 (16) Oct 21 12:33:22 porky kernel: [<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) Oct 21 12:33:22 porky kernel: [<c0139801>] sys_delete_module+0x121/0x150 (12) Oct 21 12:33:22 porky kernel: [<c01531a1>] sys_munmap+0x51/0x60 (64) Oct 21 12:33:22 porky kernel: [<c0116a20>] do_page_fault+0x0/0x660 (16) Oct 21 12:33:22 porky kernel: [<c0106719>] sysenter_past_esp+0x52/0x71 (16) Oct 21 12:33:22 porky kernel: preempt count: 00000001 Oct 21 12:33:22 porky kernel: . 1-level deep critical section nesting: Oct 21 12:33:22 porky kernel: .. entry 1: print_traces+0x1d/0x60 / (dump_stack+0x23/0x30) Oct 21 12:33:22 porky kernel: Oct 21 12:33:22 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
I am not sure why the tulip driver is being loaded,unloaded,reloaded every time on boot? Anyway, I wanted to check to see if I could generate the above bug on subsequent unloads of the module. I downed the network and the unloaded the tulip module. I did get the message below when unloading the module but no "BUG: atomic counter underflow" message.
Oct 22 05:43:33 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing. Oct 22 05:43:33 porky net.agent[921]: remove event not handled
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 9 lines · K.R. Foley
I am not sure why the tulip driver is being loaded,unloaded,reloaded every time on boot? Anyway, I wanted to check to see if I could generate the above bug on subsequent unloads of the module. I downed the network and the unloaded the tulip module. I did get the message below when unloading the module but no "BUG: atomic counter underflow" message.
Oct 22 05:43:33 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing. Oct 22 05:43:33 porky net.agent[921]: remove event not handled
Can you please verify this against vanilla 2.6.9 and 2.6.9-mm1 ?
tglx
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 4 lines · Thomas Gleixner
Quoted 2 lines · K.R. Foley
I am not sure why the tulip driver is being loaded,unloaded,reloaded every time on boot? Anyway, I wanted to check to see if I could generate the above bug on subsequent unloads of the module. I downed the network and the unloaded the tulip module. I did get the message below when unloading the module but no "BUG: atomic counter underflow" message.
Quoted 8 lines
Quoted 2 lines
Oct 22 05:43:33 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing. Oct 22 05:43:33 porky net.agent[921]: remove event not handledCan you please verify this against vanilla 2.6.9 and 2.6.9-mm1 ?
tglx
I will verify it against 2.6.9 when I get time. I did verify the "Device was removed without properly calling pci_disable_device(). This may need fixing." message is generated with 2.6.9-rc3-mm3 without preempt patches. Also thanks to Mark Johnson's suggestion I verified that the reason the driver is being loaded twice is because kudzu is loading it once then unloading it.
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Quoted 19 lines · K.R. Foley
Quoted 8 lines · Thomas Gleixner
Quoted 6 lines · K.R. Foley
I am not sure why the tulip driver is being loaded,unloaded,reloaded every time on boot? Anyway, I wanted to check to see if I could generate the above bug on subsequent unloads of the module. I downed the network and the unloaded the tulip module. I did get the message below when unloading the module but no "BUG: atomic counter underflow" message.
Quoted 9 lines
Quoted 3 lines
Oct 22 05:43:33 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing. Oct 22 05:43:33 porky net.agent[921]: remove event not handledCan you please verify this against vanilla 2.6.9 and 2.6.9-mm1 ?
tglx
Quoted 8 lines
I will verify it against 2.6.9 when I get time. I did verify the "Device was removed without properly calling
pci_disable_device(). This may need fixing." message is generated with 2.6.9-rc3-mm3 without preempt patches. Also thanks to Mark Johnson's suggestion I verified that the reason the driver is being loaded twice is because kudzu is loading it once then unloading it.kr
--- 2.6.9-rc4-mm1/drivers/net/tulip/tulip_core.c 2004-10-12
09:41:27.000000000 +0200
+++ 2.6.9-rc4-mm1-U9-E0/drivers/net/tulip/tulip_core.c 2004-10-22
17:54:31.000000000 +0200
@@ -1784,6 +1784,7 @@
#endif
free_netdev (dev);
pci_release_regions (pdev);
+ pci_disable_device (pdev);
pci_set_drvdata (pdev, NULL);
/* pci_power_off (pdev, -1); */
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
Review
Quoted 5 lines · Thomas Gleixner
---
2.6.9-rc4-mm1/drivers/net/tulip/tulip_core.c2004-10-12(quoted diff) +1
-0pci_release_regions (pdev); + pci_disable_device (pdev); pci_set_drvdata (pdev, NULL);
i've uploaded -U10.1 with this fix included plus a fix to the tg3 and 3c59x drivers. (the drivers would disable interrupts in hard_start_xmit). I've also added debugging code to catch future instances of this network driver related problem.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Thomas GleixnerQuoted 31 lines · Thomas Gleixner
Quoted 11 lines · K.R. Foley
Quoted 9 lines · Thomas Gleixner
Quoted 4 lines · K.R. Foley
I am not sure why the tulip driver is being loaded,unloaded,reloaded every time on boot? Anyway, I wanted to check to see if I could generate the above bug on subsequent unloads of the module. I downed the network and the unloaded the tulip module. I did get the message below when unloading the module but no "BUG: atomic counter underflow" message.
Oct 22 05:43:33 porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing. Oct 22 05:43:33 porky net.agent[921]: remove event not handledQuoted 8 lines
Quoted 4 lines
Can you please verify this against vanilla 2.6.9 and 2.6.9-mm1 ?
tglx
I will verify it against 2.6.9 when I get time. I did verify the "Device was removed without properly calling
pci_disable_device(). This may need fixing." message is generated with 2.6.9-rc3-mm3 without preempt patches. Also thanks to Mark Johnson's suggestion I verified that the reason the driver is being loaded twice is because kudzu is loading it once then unloading it.kr
---
2.6.9-rc4-mm1/drivers/net/tulip/tulip_core.c2004-10-12
09:41:27.000000000 +0200
+++2.6.9-rc4-mm1-U9-E0/drivers/net/tulip/tulip_core.c2004-10-22
17:54:31.000000000 +0200
Review line 1790
Quoted 7 lines
(quoted diff) +1
-0@@ -1784,6 +1784,7 @@ #endif free_netdev (dev); pci_release_regions (pdev); + pci_disable_device (pdev); pci_set_drvdata (pdev, NULL); /* pci_power_off (pdev, -1); */
This does fix this error:
porky kernel: tulip 0000:04:0a.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
thanks,
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Thomas GleixnerQuoted 13 lines · Thomas Gleixner
Quoted 9 lines · K.R. Foley
Quoted 5 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
Finally a patch that I can get booted on my older SMP system at home again. More correctly it is U9.2. I have been having problems with these hanging after U5. Haven't had a ton of time to try to track down the problems and didn't want to report problems without having done enough troubleshooting. Anyway, I got this while booting U9.2.
Quoted 6 lines
I guess, you don't have a tulip network card in your box, as the module is removed.
The question is, if it got registered correctly before the removal.
tglx
Actually I do have the tulip card in the box and I am pulling this stuff from the logs over that connection now. Here are the next lines from the log that might help.
Sorry brainfart before completing that thought. It is not unusual for the tulip to get loaded, unloaded,loaded again when this system starts up. Not sure why. It has never really caused me any problems so I haven't bothered figuring it out.
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to K.R. FoleyQuoted 15 lines · K.R. Foley
Oct 21 12:33:22 porky kernel: BUG: atomic counter underflow at: Oct 21 12:33:22 porky kernel: [<c0254dd8>] qdisc_destroy+0x98/0xa0 (12) Oct 21 12:33:22 porky kernel: [<c0254fed>] dev_shutdown+0x3d/0xa0 (16) Oct 21 12:33:22 porky kernel: [<c024773b>] unregister_netdevice+0x13b/0x280 (28) Oct 21 12:33:22 porky netfs: Mounting other filesystems: succeeded Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (12) Oct 21 12:33:22 porky kernel: [<e09a6160>] tulip_remove_one+0x0/0xa0 [tulip] (4) Oct 21 12:33:22 porky kernel: [<c02058de>] unregister_netdev+0x1e/0x30 (24) Oct 21 12:33:22 porky kernel: [<e09a618f>] tulip_remove_one+0x2f/0xa0 [tulip] (16) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (8) Oct 21 12:33:22 porky kernel: [<c0112fb0>] mcount+0x14/0x18 (8) Oct 21 12:33:22 porky kernel: [<c01c4e26>] pci_device_remove+0x76/0x80 (20) Oct 21 12:33:22 porky kernel: [<c01f573b>] device_detach_shutdown+0xb/0x40 (12) Oct 21 12:33:22 porky kernel: [<c01f2907>] device_release_driver+0x67/0x70 (12) Oct 21 12:33:22 porky kernel: [<c01f293b>] driver_detach+0x2b/0x40 (24)
Quoted 8 lines
Oct 21 12:33:22 porky kernel: [<c01f2daf>] bus_remove_driver+0x3f/0x70 (20) Oct 21 12:33:22 porky kernel: [<c01f32b9>] driver_unregister+0x19/0x30 (20) Oct 21 12:33:22 porky kernel: [<c01c50cc>] pci_unregister_driver+0x1c/0x30 (16) Oct 21 12:33:22 porky kernel: [<e09a7767>] tulip_cleanup+0x17/0x1b [tulip] (16) Oct 21 12:33:22 porky kernel: [<c0139801>] sys_delete_module+0x121/0x150 (12) Oct 21 12:33:22 porky kernel: [<c01531a1>] sys_munmap+0x51/0x60 (64) Oct 21 12:33:22 porky kernel: [<c0116a20>] do_page_fault+0x0/0x660 (16) Oct 21 12:33:22 porky kernel: [<c0106719>] sysenter_past_esp+0x52/0x71 (16)
i think this is an upstream bug that the atomic-counter debugging assert triggers. Jeff, the assert above shows qdisc->refcnt underflowing from 0 to -1. So the qdisc_destroy() [or dev_shutdown()?] use is inbalanced. Plus rtl8139 is doing this too, see the log below. The upstream kernel does not notice this condition. Or is ->refcnt allowed to underflow?
Ingo
Oct 20 16:47:18 localhost kernel: BUG: atomic counter underflow at: Oct 20 16:47:18 localhost kernel: [<c02b8d88>] qdisc_destroy+0x98/0xa0 (12) Oct 20 16:47:18 localhost kernel: [<c02b8f9d>] dev_shutdown+0x3d/0xa0 (16) Oct 20 16:47:18 localhost kernel: [<c02aa38b>] unregister_netdevice+0x13b/0x280 (28) Oct 20 16:47:18 localhost kernel: [<c01148b0>] mcount+0x14/0x18 (8) Oct 20 16:47:18 localhost kernel: [<e0836b10>] rtl8139_remove_one+0x0/0xa0 [8139too] (4) Oct 20 16:47:18 localhost kernel: [<c0241f8e>] unregister_netdev+0x1e/0x30 (24) Oct 20 16:47:18 localhost kernel: [<e0836b3a>] rtl8139_remove_one+0x2a/0xa0 [8139too] (16) Oct 20 16:47:18 localhost kernel: [<c01148b0>] mcount+0x14/0x18 (12) Oct 20 16:47:18 localhost kernel: [<c01e4016>] pci_device_remove+0x76/0x80 (20) Oct 20 16:47:18 localhost kernel: [<c02306cb>] device_detach_shutdown+0xb/0x40 (12) Oct 20 16:47:18 localhost kernel: [<c022d817>] device_release_driver+0x67/0x70 (12) Oct 20 16:47:18 localhost kernel: [<c022d84b>] driver_detach+0x2b/0x40 (24) Oct 20 16:47:18 localhost kernel: [<c022dcbf>] bus_remove_driver+0x3f/0x70 (20) Oct 20 16:47:18 localhost kernel: [<c022e1c9>] driver_unregister+0x19/0x30 (20) Oct 20 16:47:18 localhost kernel: [<c01e42bc>] pci_unregister_driver+0x1c/0x30 (16) Oct 20 16:47:18 localhost kernel: [<e0838b07>] rtl8139_cleanup_module+0x17/0x1b [8139too] (16) Oct 20 16:47:18 localhost kernel: [<c013c8d1>] sys_delete_module+0x121/0x150 (12) Oct 20 16:47:18 localhost kernel: [<c01596a4>] sys_munmap+0x54/0x70 (64) Oct 20 16:47:18 localhost kernel: [<c0118560>] do_page_fault+0x0/0x6d0 (16) Oct 20 16:47:18 localhost kernel: [<c0107b49>] sysenter_past_esp+0x52/0x71 (16)
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 1 line · Ingo Molnar
+ http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U9
For those using kernel-package, I just submitted a patch to allow for uppercase versions.
Re: [patch] Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9
In reply to Ingo MolnarQuoted 4 lines · Ingo Molnar
i have released the -U9 Real-Time Preemption patch, which can be downloaded from:
I have a reproducible BUG which I first hit in -U9 and it's in -U9.2 too. It occurs always when a packet hits a REJECT rule in the INPUT chain of iptables. To reproduce: iptables -I INPUT 1 -p tcp --dport 666 -j REJECT
...and telnet your TCP port 666 from the network.
BUG: semaphore recursion deadlock detected!
.. current task ksoftirqd/0/2 is already holding f890a6d4.
c0414ec4 f7c27f64 0000012c 00000001 f7c26000 00000000 f7c27f9c c0121687
c03c8118 c0121758 c0121ae4 0000000a c03c8118 f7c26000 f7c26000
00000000
f7c27fa4 c0121770 f7c27fbc c0121ae4 00000001 fffffff6 f7c26000
f7c25f70
Call Trace:
[<c0121687>] ___do_softirq+0x87/0xd0 (32)
[<c0121758>] _do_softirq+0x8/0x30 (8)
[<c0121ae4>] ksoftirqd+0x94/0xe0 (4)
[<c0121770>] _do_softirq+0x20/0x30 (28)
[<c0121ae4>] ksoftirqd+0x94/0xe0 (8)
[<c013116a>] kthread+0xaa/0xb0 (24)
[<c0121a50>] ksoftirqd+0x0/0xe0 (20)
[<c01310c0>] kthread+0x0/0xb0 (12)
[<c0103319>] kernel_thread_helper+0x5/0xc (16)preempt count: 00000003
. 3-level deep critical section nesting:
.. entry 1: down_write+0x1a4/0x1b0 / (ipt_do_table+0x6a/0x330 [ip_tables]) .. entry 2: down_write+0x72/0x1b0 / (ipt_do_table+0x6a/0x330 [ip_tables]) .. entry 3: print_traces+0x1d/0x90 / (show_stack+0x83/0xa0)
Michal
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-rc4-mm1-U9.3
In reply to Ingo Molnari have released the -U9.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this too is a fixes-only release.
Changes since -U9.2:
- tons more driver/mutex/completion conversion done by Thomas Gleixner
for: ppp, ipmi, parport/ieeee1284, scsi, hotplug, and more.
- iptables/netfilter deadlock fix, this should fix the bug reported by Michal Schmidt.
- .config housekeeping: disallow the turning off of PREEMPT_BKL when PREEMPT_REALTIME is on. This solves the build error reported by Matthew L Foster.
- print the full stacktrace of the current task in the deadlock detector and dont use show_stack(). This explains some of the weird partial stackdumps reported.
- some more minor updates to the case when the deadlock detector turns itself off due to reaching the limit. We kept the spinlock locked.
to create a -U9.3 tree from scratch, the patching order is:
http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.8.tar.bz2
+ http://kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.9-rc4.bz2
+ http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc4/2.6.9-rc4-mm1/2.6.9-rc4-mm1.bz2
+ http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-rc4-mm1-U9.3
Ingo
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-U10
i have released the -U10 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is purely a rebasing of -U9.3 to 2.6.9-mm1.
to create a -U10 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-U10
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
Quoted 9 lines · Ingo Molnar
i have released the -U10 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is purely a rebasing of -U9.3 to 2.6.9-mm1.
to create a -U10 tree from scratch, the patching order is:
Quoted 8 lines
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-mm
1-U10Ingo
As sort of the ultimate dummy test, I'm building this right now. The only oddments so far are a bunch of deprecated variable warnings, quite a few but many are dups.
I'll repost after I've tried it.
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 8 lines
Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.28% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attorneys please note, additions to this message by Gene Heskett are: Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
Quoted 3 lines · Gene Heskett
As sort of the ultimate dummy test, I'm building this right now. The only oddments so far are a bunch of deprecated variable warnings, quite a few but many are dups.
these warnings are present in -mm1 too.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
Quoted 10 lines · Ingo Molnar
Quoted 5 lines · Gene Heskett
As sort of the ultimate dummy test, I'm building this right now. The only oddments so far are a bunch of deprecated variable warnings, quite a few but many are dups.
Quoted 11 lines
these warnings are present in -mm1 too.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hey Ingo,
Bite Me.
:-)
Jeff
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
Quoted 6 lines · Jeff V. Merkey
Hey Ingo,
Bite Me.
:-)
Hey, Jeff,
This is a very high traffic list. If you have nothing constructive to say, don't say it. Many here are already not happy with your attitude already, you're not helping.
For my part, you're getting a shiny new procmail entry right to dave null. I'm sick of it.
Sorry, everyone else, for adding to the noise. But someone's gotta say it.
--Russell
Signature · 3 lines
Russell Miller - [email protected] - Le Mars, IA Duskglow Consulting - Helping companies just like you to succeed for ~ 10 yrs. http://www.duskglow.com - 712-546-5886
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
Quoted 7 lines · Russell Miller
Hey, Jeff,
This is a very high traffic list. If you have nothing constructive to say, don't say it. --Russell
I'll stick to bugs from now own Russell. Please forward the same to Ingo ....
Jeff
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10
In reply to Jeff V. MerkeyQuoted 16 lines · Jeff V. Merkey
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Gene Heskett
As sort of the ultimate dummy test, I'm building this right now. The only oddments so far are a bunch of deprecated variable warnings, quite a few but many are dups.
these warnings are present in -mm1 too.
Quoted 7 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 7 lines
Hey Ingo,
Bite Me.
:-)
Jeff
Frankly Jeff, we'd best be afraid of food poisoning if we got that hungry.
Signature · 8 lines
Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.28% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attorneys please note, additions to this message by Gene Heskett are: Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Ingo Molnari have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release.
Changes since -U10:
- fixed a big bug present ever since: the BKL got dropped when a spinlock-mutex was acquired and it scheduled away. This reduced the locking efficiency of the BKL. A number of outstanding problems could be affected, in particular this should fix the tty locking breakage reported by Alexander Batyrshin and Adam Heath. UP and SMP systems are affected too, with SMP systems having a higher chance to trigger this condition.
- tulip.c breakage fix from Thomas Gleixner
- tg3 and 3c59x fixes.
- made the hardirq threads SCHED_FIFO by default. They get priorities between 25 and 50, depending on the irq #. (this is pretty random but i found no better scheme.) Made the softirq thread SCHED_FIFO by default as well, albeit this probably will have to change. These changes should make it easier to debug a hung system.
to create a -U10.2 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-U10.2
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 28 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release.
Changes since -U10:
- fixed a big bug present ever since: the BKL got dropped when a spinlock-mutex was acquired and it scheduled away. This reduced
the locking efficiency of the BKL. A number of outstanding problems could be affected, in particular this should fix the tty locking breakage reported by Alexander Batyrshin and Adam Heath. UP and SMP systems are affected too, with SMP systems having a higher chance to trigger this condition.-
tulip.cbreakage fix from Thomas Gleixner- tg3 and 3c59x fixes.
- made the hardirq threads
SCHED_FIFOby default. They get priorities between 25 and 50, depending on the irq #. (this is pretty random but i found no better scheme.) Made the softirq threadSCHED_FIFOby default as well, albeit this probably will have to change. These changes should make it easier to debug a hung system.
Quoted 8 lines
to create a -U10.2 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-mm
1-U10.2
Mmm, I get a 404 page not found. when I click on on thsi link.
Quoted 6 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 8 lines
Cheers, Gene "There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order." -Ed Howdershelt (Author) 99.28% setiathome rank, not too shabby for a WV hillbilly Yahoo.com attorneys please note, additions to this message by Gene Heskett are: Copyright 2004 by Maurice Eugene Heskett, all rights reserved.
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 1 line · Gene Heskett
Mmm, I get a 404 page not found. when I click on on thsi link.
Same here. The current version is 10.3:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-U10.3
I did not get an announcement, it looks like the listserv is backlogged, or Ingo did not announce it yet.
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 6 lines · Lee Revell
Quoted 1 line · Gene Heskett
Mmm, I get a 404 page not found. when I click on on thsi link.
Same here. The current version is 10.3:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-U10.3
OK, U10.3 is the first since T3 for me that boots flawlessly. Latency numbers forthcoming...
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Lee RevellQuoted 9 lines · Lee Revell
Quoted 1 line · Gene Heskett
Mmm, I get a 404 page not found. when I click on on thsi link.
Same here. The current version is 10.3:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-U10.3
I did not get an announcement, it looks like the listserv is backlogged, or Ingo did not announce it yet.
had to do it in the last minute and didnt have time to announce it. -RT-U10.3 fixes a UP compilation error reported by John Gilbert.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 11 lines · Ingo Molnar
Quoted 8 lines · Lee Revell
Quoted 2 lines · Gene Heskett
Mmm, I get a 404 page not found. when I click on on thsi link.
Same here. The current version is 10.3:
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-U10.3
I'm seeing an odd build error in the -U10.3 patch to 2.6.9-mm1:
<snip>
AS arch/i386/boot/compressed/head.o
CC arch/i386/boot/compressed/misc.o
OBJCOPY arch/i386/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.bss' to huge (ie negative) file offset 0xc03ac000.
objcopy: arch/i386/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2
[root@otaku linux-2.6.9]# objdump -f vmlinux
vmlinux: file format elf32-i386
architecture: i386, flags 0x00000112:EXEC_P, HAS_SYMS, D_PAGED
start address 0x00100000
This appears a result of changes in:
arch/i386/kernel/vmlinux.lds.S
apparently for support of CONFIG_KERN_PHYS_OFFSET. This causes the kernel LMA start address to change from 0xc0100000 to 0x100000 and objcopy to gag. I rolled back to a 2.6.9-mm1 version of the above linker map file and did get the kernel to build and boot.
Anyone else seeing this? .config attached.
BTW, the -U10.2 patch seems to have disappeared
from:
http://people.redhat.com/mingo/realtime-preempt/older/
Signature · 1 line
[email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Hi,
Quoted 25 lines
I'm seeing an odd build error in the -U10.3 patch to 2.6.9-mm1:
<snip>AS
arch/i386/boot/compressed/head.o
CCarch/i386/boot/compressed/misc.o
OBJCOPYarch/i386/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.bss' to huge (ie negative) file offset0xc03ac000.
objcopy:arch/i386/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1 make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2[root@otaku linux-2.6.9]# objdump -f vmlinux
vmlinux: file format elf32-i386
architecture: i386, flags0x00000112:EXEC_P,HAS_SYMS,D_PAGED
start address0x00100000This appears a result of changes in:
arch/i386/kernel/vmlinux.lds.S
Quoted 8 lines
apparently for support of
CONFIG_KERN_PHYS_OFFSET. This causes the kernel LMA start address to change from0xc0100000to0x100000and objcopy to gag. I rolled back to a 2.6.9-mm1 version of the above linker map file and did get the kernel to build and boot.Anyone else seeing this? .config attached.
Yes.
You probably need to upgrade your binutil package. The .bss LMA start address section is not dealt the way it should by ld.
An other (bad) way to work around this compile problem is to force the .bss LMA start address with the following OBJCOPYFLAGS at objcopy time.
OBJCOPYFLAGS := -O binary --change-section-lma .bss-0xc0000000 -R .note -R .comment -S
Hope this help,
Remi
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 43 lines · [email protected] wrote:
Hi,
Quoted 25 lines
I'm seeing an odd build error in the -U10.3 patch to 2.6.9-mm1:
<snip>AS
arch/i386/boot/compressed/head.o
CCarch/i386/boot/compressed/misc.o
OBJCOPYarch/i386/boot/compressed/vmlinux.bin
BFD: Warning: Writing section `.bss' to huge (ie negative) file offset0xc03ac000.
objcopy:arch/i386/boot/compressed/vmlinux.bin: File truncated make[2]: *** [arch/i386/boot/compressed/vmlinux.bin] Error 1 make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2[root@otaku linux-2.6.9]# objdump -f vmlinux
vmlinux: file format elf32-i386
architecture: i386, flags0x00000112:EXEC_P,HAS_SYMS,D_PAGED
start address0x00100000This appears a result of changes in:
arch/i386/kernel/vmlinux.lds.SQuoted 9 lines
apparently for support of
CONFIG_KERN_PHYS_OFFSET. This causes the kernel LMA start address to change from0xc0100000to0x100000and objcopy to gag. I rolled back to a 2.6.9-mm1 version of the above linker map file and did get the kernel to build and boot.Anyone else seeing this? .config attached.
Yes.
You probably need to upgrade your binutil package. The .bss LMA start address section is not dealt the way it should by ld.
Quoted 9 lines
An other (bad) way to work around this compile problem is to force the .bss LMA start address with the following OBJCOPYFLAGS at objcopy time.
OBJCOPYFLAGS := -O binary --change-section-lma .bss-0xc0000000 -R .note -R .comment -S
Hope this help,
Remi
Already tried a recent (2.15) version of objcopy
with the same results. But LD was the issue.
BTW the offending version of binutils was 2.13.
Thanks!
Signature · 1 line
[email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release.
I got quite a few BUG traces this afternoon running this one on my workstation. I am just attaching the relevant chunk of the log because there are 7 or 8 of them.
kr
Oct 22 14:11:29 swdev14 kernel: NET: Registered protocol family 4 Oct 22 14:13:11 swdev14 ntpd[2865]: synchronized to 151.131.44.70, stratum=4 Oct 22 14:13:11 swdev14 ntpd[2865]: kernel time sync disabled 0041 Oct 22 14:26:00 swdev14 ntpd[2865]: kernel time sync enabled 0001 Oct 22 14:37:14 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 14:37:14 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 14:37:14 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 14:37:14 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 14:37:14 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:14 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:14 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 14:37:14 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 14:37:14 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 14:37:14 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 14:37:14 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 14:37:14 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 14:37:14 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 14:37:14 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 14:37:14 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 14:37:14 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 14:37:14 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 14:37:14 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 14:37:14 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 14:37:14 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 14:37:14 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 14:37:14 swdev14 kernel: preempt count: 00000002 Oct 22 14:37:14 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 14:37:14 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 14:37:14 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 14:37:14 swdev14 kernel: Oct 22 14:37:16 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 14:37:16 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 14:37:16 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 14:37:16 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 14:37:16 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:16 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:16 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 14:37:16 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 14:37:16 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 14:37:16 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 14:37:16 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 14:37:16 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 14:37:16 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 14:37:16 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 14:37:16 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 14:37:16 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 14:37:16 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 14:37:16 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 14:37:16 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 14:37:16 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 14:37:16 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 14:37:16 swdev14 kernel: preempt count: 00000002 Oct 22 14:37:16 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 14:37:16 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 14:37:16 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 14:37:16 swdev14 kernel: Oct 22 14:37:17 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 14:37:17 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 14:37:17 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 14:37:17 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 14:37:17 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:17 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:17 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 14:37:17 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 14:37:17 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 14:37:17 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 14:37:17 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 14:37:17 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 14:37:17 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 14:37:17 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 14:37:17 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 14:37:17 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 14:37:17 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 14:37:17 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 14:37:17 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 14:37:17 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 14:37:17 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 14:37:17 swdev14 kernel: preempt count: 00000002 Oct 22 14:37:17 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 14:37:17 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 14:37:17 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 14:37:17 swdev14 kernel: Oct 22 14:37:17 swdev14 kernel: BUG: scheduling while atomic: ksoftirqd/0/0x10000001/3 Oct 22 14:37:17 swdev14 kernel: caller is cond_resched+0x64/0x78 Oct 22 14:37:17 swdev14 kernel: [<c029dd88>] __sched_text_start+0xbdc/0xc2c (12) Oct 22 14:37:17 swdev14 kernel: [<c029e6da>] cond_resched+0x64/0x78 (8) Oct 22 14:37:17 swdev14 kernel: [<c01338ce>] check_preempt_timing+0x5d/0x289 (12) Oct 22 14:37:17 swdev14 kernel: [<c0133b40>] touch_preempt_timing+0x46/0x4a (4) Oct 22 14:37:17 swdev14 kernel: [<c029e69c>] cond_resched+0x26/0x78 (4) Oct 22 14:37:17 swdev14 kernel: [<c029deab>] preempt_schedule+0x11/0x6f (4) Oct 22 14:37:17 swdev14 kernel: [<c01070c3>] dump_stack+0x23/0x27 (4) Oct 22 14:37:17 swdev14 kernel: [<c0112038>] mcount+0x14/0x18 (8) Oct 22 14:37:17 swdev14 kernel: [<c0132aed>] _mutex_lock+0x43/0x63 (60) Oct 22 14:37:17 swdev14 kernel: [<c029e6da>] cond_resched+0x64/0x78 (20) Oct 22 14:37:17 swdev14 kernel: [<c0132aed>] _mutex_lock+0x43/0x63 (16) Oct 22 14:37:17 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:17 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:17 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 14:37:17 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 14:37:17 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 14:37:17 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 14:37:17 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 14:37:17 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 14:37:17 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 14:37:17 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 14:37:17 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 14:37:18 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 14:37:18 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 14:37:18 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 14:37:18 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 14:37:18 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 14:37:18 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 14:37:18 swdev14 kernel: preempt count: 10000002 Oct 22 14:37:18 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 14:37:18 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 14:37:18 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 14:37:18 swdev14 kernel: Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_0 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_1 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_0 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_1 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_0 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_1 Oct 22 15:22:47 swdev14 modprobe: FATAL: Error running install command for sound_slot_0 Oct 22 15:22:47 swdev14 last message repeated 2 times Oct 22 15:25:07 swdev14 su(pam_unix)[15830]: session opened for user root by aaektkf(uid=19990) Oct 22 15:30:34 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 15:30:34 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 15:30:34 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 15:30:34 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 15:30:34 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 15:30:34 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 15:30:34 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 15:30:34 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 15:30:34 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 15:30:34 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 15:30:34 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 15:30:34 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 15:30:34 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 15:30:34 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 15:30:34 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 15:30:34 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 15:30:34 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 15:30:34 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 15:30:34 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 15:30:34 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 15:30:34 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 15:30:34 swdev14 kernel: preempt count: 00000002 Oct 22 15:30:34 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 15:30:34 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 15:30:34 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 15:30:34 swdev14 kernel: Oct 22 15:30:35 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 15:30:35 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 15:30:35 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 15:30:35 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 15:30:35 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 15:30:35 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 15:30:35 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 15:30:35 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 15:30:35 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 15:30:35 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 15:30:35 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 15:30:35 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 15:30:35 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 15:30:35 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 15:30:35 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 15:30:35 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 15:30:35 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 15:30:35 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 15:30:35 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 15:30:35 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 15:30:35 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 15:30:35 swdev14 kernel: preempt count: 00000002 Oct 22 15:30:35 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 15:30:35 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 15:30:35 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 15:30:35 swdev14 kernel: Oct 22 15:30:37 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 15:30:37 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 15:30:37 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 15:30:37 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 15:30:37 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 15:30:37 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 15:30:37 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32) Oct 22 15:30:37 swdev14 kernel: [<c023fadc>] llc_rcv+0x19b/0x2a3 (24) Oct 22 15:30:37 swdev14 kernel: [<c02325df>] netif_receive_skb+0x201/0x30c (32) Oct 22 15:30:37 swdev14 kernel: [<c0130400>] remove_from_abslist+0x6/0x64 (20) Oct 22 15:30:37 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (8) Oct 22 15:30:37 swdev14 kernel: [<c0232780>] process_backlog+0x96/0x164 (28) Oct 22 15:30:37 swdev14 kernel: [<c02328ef>] net_rx_action+0xa1/0x178 (40) Oct 22 15:30:37 swdev14 kernel: [<c012299c>] ___do_softirq+0xb8/0x107 (40) Oct 22 15:30:37 swdev14 kernel: [<c013317c>] __mcount+0x1d/0x21 (12) Oct 22 15:30:37 swdev14 kernel: [<c0122a9b>] _do_softirq+0x20/0x22 (36) Oct 22 15:30:37 swdev14 kernel: [<c0122f85>] ksoftirqd+0xcd/0x105 (8) Oct 22 15:30:37 swdev14 kernel: [<c0132227>] kthread+0xbc/0xc1 (32) Oct 22 15:30:37 swdev14 kernel: [<c0122eb8>] ksoftirqd+0x0/0x105 (20) Oct 22 15:30:37 swdev14 kernel: [<c013216b>] kthread+0x0/0xc1 (12) Oct 22 15:30:37 swdev14 kernel: [<c01043b1>] kernel_thread_helper+0x5/0xb (16) Oct 22 15:30:37 swdev14 kernel: preempt count: 00000002 Oct 22 15:30:37 swdev14 kernel: . 2-level deep critical section nesting: Oct 22 15:30:37 swdev14 kernel: .. entry 1: snap_rcv+0x1b/0xe0 [<c023fadc>] / (llc_rcv+0x19b/0x2a3 [<c023fadc>]) Oct 22 15:30:37 swdev14 kernel: .. entry 2: print_traces+0x1d/0x59 [<c01070c3>] / (dump_stack+0x23/0x27 [<c01070c3>]) Oct 22 15:30:37 swdev14 kernel:
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 7 lines · K.R. Foley
Oct 22 14:37:14 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 14:37:14 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 14:37:14 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 14:37:14 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 14:37:14 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:14 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:14 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32)
does the patch below fix these?
Ingo
net/802/psnap.c renamed from net/802/psnap.c.orig +2 -2
@@ -55,7 +55,7 @@ static int snap_rcv(struct sk_buff *skb, .type = __constant_htons(ETH_P_SNAP), }; -rcu_read_lock (); +rcu_read_lock_spin (&snap_lock); proto =find_snap_client (skb->h.raw);if (proto) {/* Pass the frame on. */
@@ -68,7 +68,7 @@ static int snap_rcv(struct sk_buff *skb, rc =1 ; } -rcu_read_unlock (); +rcu_read_unlock_spin (&snap_lock);return rc; }
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 12 lines · Ingo Molnar
Quoted 7 lines · K.R. Foley
Oct 22 14:37:14 swdev14 kernel: BUG: sleeping function called from invalid context ksoftirqd/0(3) at kernel/mutex.c:37 Oct 22 14:37:14 swdev14 kernel: in_atomic():1 [00000001], irqs_disabled():0 Oct 22 14:37:14 swdev14 kernel: [<c011ac3d>] __might_sleep+0xc4/0xd6 (12) Oct 22 14:37:14 swdev14 kernel: [<c0132ae8>] _mutex_lock+0x3e/0x63 (36) Oct 22 14:37:14 swdev14 kernel: [<e0a8b297>] ipxitf_find_using_phys+0x1e/0x4c [ipx] (28) Oct 22 14:37:14 swdev14 kernel: [<e0a8d5a6>] ipx_rcv+0xdc/0x1dd [ipx] (20) Oct 22 14:37:14 swdev14 kernel: [<c024050b>] snap_rcv+0x5f/0xe0 (32)
Quoted 4 lines
does the patch below fix these?
Ingo
I will try reproducing it here (at home). Otherwise it'll have to wait till Monday.
Quoted 21 lines
net/802/psnap.c renamed from net/802/psnap.c.orig +2
-2@@ -55,7 +55,7 @@ static int snap_rcv(struct sk_buff *skb, .type = __constant_htons(ETH_P_SNAP), }; -rcu_read_lock (); +rcu_read_lock_spin (&snap_lock); proto =find_snap_client (skb->h.raw);if (proto) {/* Pass the frame on. */ @@ -68,7 +68,7 @@ static int snap_rcv(struct sk_buff *skb, rc =1 ; } -rcu_read_unlock (); +rcu_read_unlock_spin (&snap_lock);return rc; }
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Ingo MolnarQuoted 6 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
Regarding the jackd -R issue, I was trying to capture some debug data via netconsole on my laptop (P4/UP) running RT-U10.2, and when the system freezes as reported before, I was able to kick the SysRq+T. But, instead of a task trace list, I get the following:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at kernel/mutex.c:37
in_atomic():1 [00000001], irqs_disabled():1
[<c0104ee4>] dump_stack+0x1e/0x20 (20) [<c0114a23>] __might_sleep+0xb2/0xc7 (36) [<c012c0f2>] _mutex_lock+0x39/0x5e (28) [<c012c13a>] _mutex_lock_irqsave+0x11/0x15 (12) [<c027f927>] refill_skbs+0x13/0x6d (20) [<c027fa4c>] find_skb+0x5d/0x9d (24) [<c027fb74>] netpoll_send_udp+0x3b/0x298 (48) [<e00ef047>] write_msg+0x47/0x5c [netconsole] (36) [<c0117804>] __call_console_drivers+0x51/0x60 (32) [<c0117910>] call_console_drivers+0x6d/0x147 (40) [<c0117caf>] release_console_sem+0x48/0x100 (36) [<c0117bd5>] vprintk+0x127/0x174 (36) [<c0117aac>] printk+0x18/0x1a (16) [<c01f4849>] __handle_sysrq+0x38/0xed (40) [<c01ee426>] kbd_event+0xeb/0xfa (40) [<c025f6a8>] input_event+0x160/0x3d4 (44) [<c02620b6>] atkbd_report_key+0x3b/0x95 (32) [<c026236c>] atkbd_interrupt+0x25c/0x590 (60) [<c01f6fd2>] serio_interrupt+0x4f/0xa5 (44) [<c01f78cb>] i8042_interrupt+0xb8/0x1b8 (40) [<c0131dbc>] handle_IRQ_event+0x48/0x79 (32) [<c01325dd>] do_hardirq+0x86/0x123 (40) [<c0132712>] do_irqd+0x98/0xc9 (36) [<c012b7d7>] kthread+0x9c/0xc9 (48) [<c0102305>] kernel_thread_helper+0x5/0xb (548454420)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __sysrq_lock_table+0x12/0x14 [<c01f482b>] / (__handle_sysrq+0x1a/0xed [<c01f482b>])
.. entry 2: print_traces+0x16/0x48 [<c0104ee4>] / (dump_stack+0x1e/0x20 [<c0104ee4>])
Other SysRq key combinations dumps similar.
Any suggestions?
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 8 lines · Rui Nuno Capela
Quoted 4 lines · Ingo Molnar
Quoted 1 line
i have released the -U10.2 Real-Time Preemption patch, which can be
downloaded from:
Regarding the jackd -R issue, I was trying to capture some debug data via netconsole on my laptop (P4/UP) running RT-U10.2
Just starting to test U10.3. So far no freezes but I do see problems with Jack kicking out Hydrogen from the graph and some xruns.
I see this on boot (athlon64 system):
ACPI: PCI interrupt 0000:00:0e.0[A] -> GSI 19 (level, low) -> IRQ 19
ohci1394: fw-host0: OHCI-1394 1.0 (PCI): IRQ=[19] MMIO=[cfffe000-cfffe7ff] Max Packet=[2048]
ohci1394 0000:00:0e.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
r8169 Gigabit Ethernet driver 1.6LK loaded
ACPI: PCI interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16
divert: allocating divert_blk for eth0
eth0: Identified chip type is 'RTL8169s/8110s'.
eth0: RTL8169 at 0xf88c8f00, 00:0c:76:b3:c2:43, IRQ 16
BUG: atomic counter underflow at: [<c02b99a1>] qdisc_destroy+0x91/0xa0 (8) [<c02b9b6f>] dev_shutdown+0x2f/0x90 (12) [<c030dfc7>] cond_resched+0x17/0x70 (8) [<c02acea5>] unregister_netdevice+0x125/0x250 (16) [<c030e6b2>] down_write+0xa2/0x1e0 (12) [<c01cd87a>] __up_write+0x11a/0x200 (4) [<c02476cf>] unregister_netdev+0xf/0x20 (16) [<f8b0163d>] rtl8169_remove_one+0x1d/0x50 [r8169] (8) [<c01d6c08>] pci_device_remove+0x68/0x70 (16) [<c0235cb6>] device_release_driver+0x56/0x60 (20) [<c0235cd8>] driver_detach+0x18/0x30 (12) [<c02360d9>] bus_remove_driver+0x29/0x50 (12) [<c02364eb>] driver_unregister+0xb/0x20 (8) [<c01d6e3b>] pci_unregister_driver+0xb/0x20 (8) [<c0137795>] sys_delete_module+0x105/0x130 (8) [<c0106019>] sysenter_past_esp+0x52/0x71 (80)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0xd/0x40 [<00000000>] / (0x0 [<00000000>])
divert: freeing divert_blk for eth0ip_tables: (C) 2000-2002 Netfilter core teamip_conntrack version 2.1 (8192 buckets, 65536 max) - 300 bytes per conntrack
r8169 Gigabit Ethernet driver 1.6LK loaded
ACPI: PCI interrupt 0000:00:0b.0[A] -> GSI 16 (level, low) -> IRQ 16
divert: allocating divert_blk for eth0
eth0: Identified chip type is 'RTL8169s/8110s'.
eth0: RTL8169 at 0xf8af4f00, 00:0c:76:b3:c2:43, IRQ 16 IRQ#16 thread RT prio: 49.
r8169: eth0: link up
-- Fernando
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Rui Nuno CapelaQuoted 12 lines · Rui Nuno Capela
Regarding the jackd -R issue, I was trying to capture some debug data via netconsole on my laptop (P4/UP) running RT-U10.2, and when the system freezes as reported before, I was able to kick the SysRq+T. But, instead of a task trace list, I get the following:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at
kernel/mutex.c:37
in_atomic():1 [00000001], irqs_disabled():1[<c0104ee4>] dump_stack+0x1e/0x20 (20) [<c0114a23>] __might_sleep+0xb2/0xc7 (36) [<c012c0f2>] _mutex_lock+0x39/0x5e (28)
Quoted 5 lines
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1:__sysrq_lock_table+0x12/0x14[<c01f482b>] / (__handle_sysrq+0x1a/0xed[<c01f482b>])
.. entry 2:print_traces+0x16/0x48[<c0104ee4>] / (dump_stack+0x1e/0x20
does the patch below help?
Ingo
drivers/char/sysrq.c renamed from drivers/char/sysrq.c.orig +1 -1
@@ -252,7 +252,7 @@ static struct sysrq_key_op sysrq_kill_op/* Key Operations table and lock */ -static DECLARE_RAW_SPINLOCK (sysrq_key_table_lock); +static DECLARE_SPINLOCK (sysrq_key_table_lock);#define SYSRQ_KEY_TABLE_LENGTH 36static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH ] = {/* 0 */ &sysrq_loglevel_op,
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 29 lines · Ingo Molnar
Quoted 12 lines · Rui Nuno Capela
Regarding the jackd -R issue, I was trying to capture some debug data via netconsole on my laptop (P4/UP) running RT-U10.2, and when the system freezes as reported before, I was able to kick the SysRq+T. But, instead of a task trace list, I get the following:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at
kernel/mutex.c:37
in_atomic():1 [00000001], irqs_disabled():1[<c0104ee4>] dump_stack+0x1e/0x20 (20) [<c0114a23>] __might_sleep+0xb2/0xc7 (36) [<c012c0f2>] _mutex_lock+0x39/0x5e (28)Quoted 5 lines
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1:__sysrq_lock_table+0x12/0x14[<c01f482b>] / (__handle_sysrq+0x1a/0xed[<c01f482b>])
.. entry 2:print_traces+0x16/0x48[<c0104ee4>] / (dump_stack+0x1e/0x20does the patch below help?
Ingo
drivers/char/sysrq.c static struct sysrq_key_op sysrq_kill_op · line 258
Quoted 8 lines
drivers/char/sysrq.c renamed from drivers/char/sysrq.c.orig +1
-1@@ -252,7 +252,7 @@ static struct sysrq_key_op sysrq_kill_op/* Key Operations table and lock */ -static DECLARE_RAW_SPINLOCK (sysrq_key_table_lock); +static DECLARE_SPINLOCK (sysrq_key_table_lock);#define SYSRQ_KEY_TABLE_LENGTH 36static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH ] = {/* 0 */ &sysrq_loglevel_op,
Nope. Same result:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at kernel/mutex.c:37
in_atomic():0 [00000000], irqs_disabled():1
[<c0104ee4>] dump_stack+0x1e/0x20 (20) [<c0114a23>] __might_sleep+0xb2/0xc7 (36) [<c012c0f2>] _mutex_lock+0x39/0x5e (28) [<c012c13a>] _mutex_lock_irqsave+0x11/0x15 (12) [<c027f913>] refill_skbs+0x13/0x6d (20) [<c027fa38>] find_skb+0x5d/0x9d (24) [<c027fb60>] netpoll_send_udp+0x3b/0x298 (48) [<e0136047>] write_msg+0x47/0x5c [netconsole] (36) [<c0117804>] __call_console_drivers+0x51/0x60 (32) [<c0117910>] call_console_drivers+0x6d/0x147 (40) [<c0117caf>] release_console_sem+0x48/0x100 (36) [<c0117bd5>] vprintk+0x127/0x174 (36) [<c0117aac>] printk+0x18/0x1a (16) [<c01f4835>] __handle_sysrq+0x38/0xed (40) [<c01ee426>] kbd_event+0xeb/0xfa (40) [<c025f694>] input_event+0x160/0x3d4 (44) [<c02620a2>] atkbd_report_key+0x3b/0x95 (32) [<c0262358>] atkbd_interrupt+0x25c/0x590 (60) [<c01f6fbe>] serio_interrupt+0x4f/0xa5 (44) [<c01f78b7>] i8042_interrupt+0xb8/0x1b8 (40) [<c0131dbc>] handle_IRQ_event+0x48/0x79 (32) [<c01325dd>] do_hardirq+0x86/0x123 (40) [<c0132712>] do_irqd+0x98/0xc9 (36) [<c012b7d7>] kthread+0x9c/0xc9 (48) [<c0102305>] kernel_thread_helper+0x5/0xb (548454420)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x16/0x48 [<c0104ee4>] / (dump_stack+0x1e/0x20 [<c0104ee4>])
Bye.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 7 lines · Rui Nuno Capela
Quoted 1 line
does the patch below help?
Nope. Same result:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at
kernel/mutex.c:37
in_atomic():0 [00000000], irqs_disabled():1
interrupts are disabled. You used a -RT-U10.2/3 kernel, and have CONFIG_REALTIME enabled, right? Do you have this in drivers/net/netconsole.c, line 77:
#ifdef PREEMPT_REALTIME
/*
* A bit hairy. Netconsole uses mutexes (indirectly) and
* thus must have interrupts enabled:
*/
local_irq_enable();#endif
correct? Could you do this a few lines below:
WARN_ON_RT(irqs_disabled());
netpoll_send_udp(&np, msg, frag);
WARN_ON_RT(irqs_disabled());to figure out who disables interrupts. Also, could you add the same two lines to net/core/netpoll.c, line 83:
WARN_ON_RT(irqs_disabled());
np->dev->poll_controller(np->dev);
WARN_ON_RT(irqs_disabled());and send me either the full bootlog, or the _first_ such BUG message you'll be getting. Which network controller is this?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 32 lines · Ingo Molnar
Quoted 7 lines · Rui Nuno Capela
Quoted 1 line
does the patch below help?
Nope. Same result:
SysRq : <3>BUG: sleeping function called from invalid context IRQ 1(776) at
kernel/mutex.c:37
in_atomic():0 [00000000], irqs_disabled():1interrupts are disabled. You used a -RT-U10.2/3 kernel, and have
CONFIG_REALTIMEenabled, right? Do you have this indrivers/net/netconsole.c, line 77:#ifdef PREEMPT_REALTIME /* * A bit hairy. Netconsole uses mutexes (indirectly) and * thus must have interrupts enabled: */ local_irq_enable();#endif
correct? Could you do this a few lines below:
WARN_ON_RT(irqs_disabled()); netpoll_send_udp(&np, msg, frag); WARN_ON_RT(irqs_disabled());to figure out who disables interrupts. Also, could you add the same two lines to
net/core/netpoll.c, line 83:
Quoted 7 lines
WARN_ON_RT(irqs_disabled()); np->dev->poll_controller(np->dev); WARN_ON_RT(irqs_disabled());and send me either the full bootlog, or the _first_ such BUG message you'll be getting. Which network controller is this?
OK. All affirmative. NIC is natsemi.
Here it is:
SysRq : IRQ 1/776: BUG in write_msg at drivers/net/netconsole.c:87
[<c0104ee4>] dump_stack+0x1e/0x20 (20) [<e00ef0ab>] write_msg+0xab/0xf4 [netconsole] (52) [<c0117804>] __call_console_drivers+0x51/0x60 (32) [<c0117910>] call_console_drivers+0x6d/0x147 (40) [<c0117caf>] release_console_sem+0x48/0x100 (36) [<c0117bd5>] vprintk+0x127/0x174 (36) [<c0117aac>] printk+0x18/0x1a (16) [<c01f4835>] __handle_sysrq+0x38/0xed (40) [<c01ee426>] kbd_event+0xeb/0xfa (40) [<c025f694>] input_event+0x160/0x3d4 (44) [<c02620a2>] atkbd_report_key+0x3b/0x95 (32) [<c0262358>] atkbd_interrupt+0x25c/0x590 (60) [<c01f6fbe>] serio_interrupt+0x4f/0xa5 (44) [<c01f78b7>] i8042_interrupt+0xb8/0x1b8 (40) [<c0131dbc>] handle_IRQ_event+0x48/0x79 (32) [<c01325dd>] do_hardirq+0x86/0x123 (40) [<c0132712>] do_irqd+0x98/0xc9 (36) [<c012b7d7>] kthread+0x9c/0xc9 (48) [<c0102305>] kernel_thread_helper+0x5/0xb (548454420)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x16/0x48 [<c0104ee4>] / (dump_stack+0x1e/0x20 [<c0104ee4>])
BUG: sleeping function called from invalid context IRQ 1(776) at kernel/mutex.c:37 in_atomic():0 [00000000], irqs_disabled():1 [<c0104ee4>] dump_stack+0x1e/0x20 (20) [<c0114a23>] __might_sleep+0xb2/0xc7 (36) [<c012c0f2>] _mutex_lock+0x39/0x5e (28) [<c012c13a>] _mutex_lock_irqsave+0x11/0x15 (12) [<c027f9bc>] refill_skbs+0x13/0x6d (20) [<c027fae1>] find_skb+0x5d/0x9d (24) [<c027fc09>] netpoll_send_udp+0x3b/0x298 (48) [<e00ef050>] write_msg+0x50/0xf4 [netconsole] (52) [<c0117804>] __call_console_drivers+0x51/0x60 (32) [<c0117910>] call_console_drivers+0x6d/0x147 (40) [<c0117caf>] release_console_sem+0x48/0x100 (36) [<c0117bd5>] vprintk+0x127/0x174 (36) [<c0117aac>] printk+0x18/0x1a (16) [<c01f4835>] __handle_sysrq+0x38/0xed (40) [<c01ee426>] kbd_event+0xeb/0xfa (40) [<c025f694>] input_event+0x160/0x3d4 (44) [<c02620a2>] atkbd_report_key+0x3b/0x95 (32) [<c0262358>] atkbd_interrupt+0x25c/0x590 (60) [<c01f6fbe>] serio_interrupt+0x4f/0xa5 (44) [<c01f78b7>] i8042_interrupt+0xb8/0x1b8 (40) [<c0131dbc>] handle_IRQ_event+0x48/0x79 (32) [<c01325dd>] do_hardirq+0x86/0x123 (40) [<c0132712>] do_irqd+0x98/0xc9 (36) [<c012b7d7>] kthread+0x9c/0xc9 (48) [<c0102305>] kernel_thread_helper+0x5/0xb (548454420)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x16/0x48 [<c0104ee4>] / (dump_stack+0x1e/0x20 [<c0104ee4>])
Bye.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 5 lines · Rui Nuno Capela
OK. All affirmative. NIC is natsemi.
Here it is:
SysRq : IRQ 1/776: BUG in
write_msgatdrivers/net/netconsole.c:87
doh! Go to line 77 and spot the bug. (yes, the PREEMPT_REALTIME needs to become CONFIG_PREEMPT_REALTIME) With that fixed does it work for you?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 4 lines
Ingo Molnar
Rui Nuno Capela wrote:
Quoted 9 lines
Quoted 5 lines
OK. All affirmative. NIC is natsemi.
Here it is:
SysRq : IRQ 1/776: BUG in
write_msgatdrivers/net/netconsole.c:87doh! Go to line 77 and spot the bug. (yes, the
PREEMPT_REALTIMEneeds to becomeCONFIG_PREEMPT_REALTIME) With that fixed does it work for you?
OK again. And found another place where PREEMPT_REALTIME is in place of CONFIG_PREEMPT_REALTIME, on drivers/ide/ide-taskfile.c, lines 287 and 308 (see appended diffs).
Anyway, back to my jackd -R issue. I tell you that things are really different now: hitting SysRq+T, just about when it all gets frozen, I see nothing on netconsole capture end, only this single line:
SysRq : Show State
and nothing more.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
drivers/net/netconsole.c renamed from drivers/net/netconsole.c.orig +1 -1
@@ -74,7 +74,7 @@return ;local_irq_save (flags); -#ifdef PREEMPT_REALTIME +#ifdef CONFIG_PREEMPT_REALTIME /* * A bit hairy. Netconsole uses mutexes (indirectly) and * thus must have interrupts enabled:
drivers/ide/ide-taskfile.c renamed from drivers/ide/ide-taskfile.c.orig +2 -2
@@ -284,7 +284,7 @@u8 *buf; page = sg[hwif->cursg].page; -#if defined(CONFIG_HIGHMEM ) && !defined(PREEMPT_REALTIME ) +#if defined(CONFIG_HIGHMEM ) && !defined(CONFIG_PREEMPT_REALTIME )local_irq_save (flags);#endif buf = kmap_atomic(page, KM_BIO_SRC_IRQ) +
@@ -305,7 +305,7 @@taskfile_input_data (drive, buf,SECTOR_WORDS );kunmap_atomic (page,KM_BIO_SRC_IRQ ); -#if defined(CONFIG_HIGHMEM ) && !defined(PREEMPT_REALTIME ) +#if defined(CONFIG_HIGHMEM ) && !defined(CONFIG_PREEMPT_REALTIME )local_irq_restore (flags);#endif }
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.3
In reply to Ingo MolnarQuoted 4 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
The current version is -U10.3
Find below a patch against -U10.3. It contains a couple of smaller fixes including the network driver bootup BUG.
<Dislaimer>
I'm trying to start a serious discussion on that. It's not my intention to start a flamewar.
</Disclaimer>
The network driver load/unload problem, which was reported from a couple of testers, is related to Ingo's check inside of atomic_dec_and_test().
if (!atomic_read(v)) {
printk("BUG: atomic counter underflow at:\n");
dump_stack();
}The unmodified atomic_dec_and_test() returns 0 in all cases except for the case when the counter is 0 after the decrement. This implementation covers automatically the case, where atomic_dec_and_test() is called with counter == 0.
The network code uses atomic_dec_and_test() in qdisk_destroy to check, if the caller owns the last reference to the qdisc. This covers also the case when no reference is there when this is called. I fixed this for now with a check for 0 before calling qdisk_destroy().
Thats a fix, but not an answer to the following question.
The question is whether the atomic implementation is intended to allow counter values less than 0 or not. Reviewing the usage it seems not to be the case. The qdisc_destroy code is the only place I recognized so far, which makes use of that implementation detail.
Quoted 1 line
From my point of view is allowing such usage covering a hidden problem.
Assume count = 0, call atomic_dec_test() and you have count = -1. At a differemt places the check is if (!atomic_read(v)){...} If count = -1 it signals, that data or whatever is available.
I don't think there is code which is actually failing on that, but as a design rule it might turn out that Ingo's check and the implied rule "count must be >= 0" is appropriate.
tglx
---
diff --exclude='*~' -urN 2.6.9-mm1-U10.3/drivers/net/8139too.c 2.6.9-mm1-U10.work/drivers/net/8139too.c
--- 2.6.9-mm1-U10.3/drivers/net/8139too.c 2004-10-23 01:59:14.000000000
+0200
+++ 2.6.9-mm1-U10.work/drivers/net/8139too.c 2004-10-22
23:18:32.000000000 +0200
@@ -749,7 +749,7 @@
pci_release_regions (pdev);
free_netdev(dev);
-
+ pci_disable_device (pdev);
pci_set_drvdata (pdev, NULL);
}
diff --exclude='*~' -urN 2.6.9-mm1-U10.3/drivers/pci/hotplug/cpci_hotplug_core.c 2.6.9-mm1-U10.work/drivers/pci/hotplug/cpci_hotplug_core.c
--- 2.6.9-mm1-U10.3/drivers/pci/hotplug/cpci_hotplug_core.c 2004-10-23
01:59:15.000000000 +0200
+++ 2.6.9-mm1-U10.work/drivers/pci/hotplug/cpci_hotplug_core.c
2004-10-22 19:06:47.000000000 +0200
@@ -598,7 +598,7 @@
msleep(100);
}
dbg("poll thread signals exit");
- up(&thread_exit);
+ complete(&thread_exit);
return 0;
}
diff --exclude='*~' -urN 2.6.9-mm1-U10.3/net/sched/sch_generic.c 2.6.9-mm1-U10.work/net/sched/sch_generic.c
--- 2.6.9-mm1-U10.3/net/sched/sch_generic.c 2004-10-23
01:59:12.000000000 +0200
+++ 2.6.9-mm1-U10.work/net/sched/sch_generic.c 2004-10-23
02:45:58.000000000 +0200
@@ -584,7 +584,9 @@
qdisc = dev->qdisc_sleeping;
dev->qdisc = &noop_qdisc;
dev->qdisc_sleeping = &noop_qdisc;
- qdisc_destroy(qdisc);
+
+ if (atomic_read(&qdisc->refcnt))
+ qdisc_destroy(qdisc);
#if defined(CONFIG_NET_SCH_INGRESS) ||defined(CONFIG_NET_SCH_INGRESS_MODULE)
if ((qdisc = dev->qdisc_ingress) != NULL) { dev->qdisc_ingress = NULL;
diff --exclude='*~' -urN 2.6.9-mm1-U10.3/drivers/pcmcia/yenta_socket.c 2.6.9-mm1-U10.work/drivers/pcmcia/yenta_socket.c
--- 2.6.9-mm1-U10.3/drivers/pcmcia/yenta_socket.c 2004-10-22
16:52:26.000000000 +0200
+++ 2.6.9-mm1-U10.work/drivers/pcmcia/yenta_socket.c 2004-10-22
21:26:15.000000000 +0200
@@ -653,6 +653,7 @@
yenta_free_resources(sock);
pci_release_regions(dev);
+ pci_disable_device(dev);
pci_set_drvdata(dev, NULL);
}
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
On realtime-preempt-2.6.9-mm1-U10.3:
o In rcupdate.h, I believe that the:
+# define rcu_read_unlock_nort() rcu_read_lock_nort()
should instead be:
+# define rcu_read_unlock_nort() rcu_read_unlock()
It looks to me like the current definition would cause preemption to be permanently disabled in a kernel with CONFIG_PREEMPT but without CONFIG_PREEMPT_REALTIME, at least if one used SysV IPC.
o The rcu_read_lock_spin(), rcu_read_lock_read(),
rcu_read_lock_bh_read(), rcu_read_lock_sem(), and rcu_read_lock_bh_spin() APIs cannot be called recursively. But you probably already knew that. ;-)
I don't understand why the rcu_read_lock_sem() API gets its own #ifdef.
o Some recent RCU patches acquire the update-side lock
under rcu_read_lock(), which I believe will deadlock here. Since the same CPU/task is acquiring the same lock twice, I don't believe that the mutex mods help, but could easily be mistaken. Then again, this may well be why there are all the emails on this thread advising that SELinux be disabled.
Thanx, Paul
Quoted 36 lines
this is a fixes-only release.
Changes since -U10:
- fixed a big bug present ever since: the BKL got dropped when a spinlock-mutex was acquired and it scheduled away. This reduced the locking efficiency of the BKL. A number of outstanding problems could be affected, in particular this should fix the tty locking breakage reported by Alexander Batyrshin and Adam Heath. UP and SMP systems are affected too, with SMP systems having a higher chance to trigger this condition.
-
tulip.cbreakage fix from Thomas Gleixner- tg3 and 3c59x fixes.
- made the hardirq threads
SCHED_FIFOby default. They get priorities between 25 and 50, depending on the irq #. (this is pretty random but i found no better scheme.) Made the softirq threadSCHED_FIFOby default as well, albeit this probably will have to change. These changes should make it easier to debug a hung system.to create a -U10.2 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-U10.2Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 9 lines · Paul E. McKenney
Quoted 5 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
On realtime-preempt-2.6.9-mm1-U10.3:
Quoted 8 lines
o In
rcupdate.h, I believe that the:+# define
rcu_read_unlock_nort()rcu_read_lock_nort()should instead be:
+# define
rcu_read_unlock_nort()rcu_read_unlock()
Oh no! That would explain a lot... the typical report is it works fine until people go to use the network :-P
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 14 lines · Lee Revell
Quoted 13 lines · Paul E. McKenney
Quoted 5 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
On realtime-preempt-2.6.9-mm1-U10.3:
o In
rcupdate.h, I believe that the:+# define
rcu_read_unlock_nort()rcu_read_lock_nort()
Quoted 7 lines
Quoted 4 lines
should instead be:
+# define
rcu_read_unlock_nort()rcu_read_unlock()Oh no! That would explain a lot... the typical report is it works fine until people go to use the network :-P
Yes and No !
The wrong define is in the #else path of CONFIG_PREEMPT_REALTIME, so it affects the kernel only when it is built with PREEMPT_REALTIME disabled.
The network problem with PREEMPT_REALTIME enabled is a subtle race, which I have nearly tracked down. I know the scenario, but I have not yet identified the culprit. (:
tglx
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Paul E. McKenneyQuoted 7 lines · Paul E. McKenney
o In
rcupdate.h, I believe that the:+# define
rcu_read_unlock_nort()rcu_read_lock_nort()should instead be:
+# define
rcu_read_unlock_nort()rcu_read_unlock()
yeah, correct - fortunately this is a non-default path, but still a nice fix.
Quoted 7 lines
o The
rcu_read_lock_spin(),rcu_read_lock_read(),
rcu_read_lock_bh_read(),rcu_read_lock_sem(), andrcu_read_lock_bh_spin()APIs cannot be called recursively. But you probably already knew that. ;-)I don't understand why the
rcu_read_lock_sem()API gets its own #ifdef.
actually, rcu_read_lock_read() is the variant that _can_ be called recursively and which i used in the networking code quite extensively. The others are only useful if the locking is 'flat' in the original code, or if the locking is extensively rewritten. (I havent tried to convert the IPC code back from the 'flat' locking to the original 'nested' locking, but i've done it for the networking code.)
Quoted 2 lines
o Some recent RCU patches acquire the update-side lock
underrcu_read_lock(), which I believe will deadlock here.
which codepaths do you mean? Things are looking pretty good in -U10.3 so far.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
Quoted 9 lines · Ingo Molnar
Quoted 7 lines · Paul E. McKenney
o The
rcu_read_lock_spin(),rcu_read_lock_read(),
rcu_read_lock_bh_read(),rcu_read_lock_sem(), andrcu_read_lock_bh_spin()APIs cannot be called recursively. But you probably already knew that. ;-)I don't understand why the
rcu_read_lock_sem()API gets its own #ifdef.
Quoted 6 lines
actually,
rcu_read_lock_read()is the variant that _can_ be called recursively and which i used in the networking code quite extensively. The others are only useful if the locking is 'flat' in the original code, or if the locking is extensively rewritten. (I havent tried to convert the IPC code back from the 'flat' locking to the original 'nested' locking, but i've done it for the networking code.)
OK, sorry for my confusion. I still don't see why rcu_read_lock_sem() is segregated, but it will clearly work either way.
Quoted 5 lines
Quoted 2 lines
o Some recent RCU patches acquire the update-side lock
underrcu_read_lock(), which I believe will deadlock here.which codepaths do you mean? Things are looking pretty good in -U10.3 so far.
The one that I am aware of has not yet hit mainline -- Kaigai Kohei's scalability changes to Linux. See:
http://marc.theaimsgroup.com/?l=linux-kernel&m=109628285418353&w=2
The function avc_update_cache() does an rcu_read_lock(), then invokes avc_update_node(), which acquires the update-side lock. No problem under conventional RCU, in the case where one might realize that an update is needed during what is a read-only search in the common case, but would be problematic given real-time preemption.
Thanx, Paul
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-U10.2
In reply to Ingo MolnarQuoted 33 lines · Ingo Molnar
i have released the -U10.2 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release.
Changes since -U10:
- fixed a big bug present ever since: the BKL got dropped when a spinlock-mutex was acquired and it scheduled away. This reduced the locking efficiency of the BKL. A number of outstanding problems could be affected, in particular this should fix the tty locking breakage reported by Alexander Batyrshin and Adam Heath. UP and SMP systems are affected too, with SMP systems having a higher chance to trigger this condition.
-
tulip.cbreakage fix from Thomas Gleixner- tg3 and 3c59x fixes.
- made the hardirq threads
SCHED_FIFOby default. They get priorities between 25 and 50, depending on the irq #. (this is pretty random but i found no better scheme.) Made the softirq threadSCHED_FIFOby default as well, albeit this probably will have to change. These changes should make it easier to debug a hung system.to create a -U10.2 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-U10.2
Quoted 9 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
I get following error with 10.3 on kernel 2.6.9-mm1
Device 'i823650' does not have a release() function, it is broken and must be fixed. swapper/1: BUG in device_release at drivers/base/core.c:85
[<c0238aeb>] kobject_cleanup+0x9a/0x9c (8) [<c0238b15>] kobject_put+0x1e/0x22 (24) [<c0238aed>] kobject_release+0x0/0xa (8) [<c045cecf>] init_i82365+0x1f2/0x208 (4) [<c02487b6>] pci_register_driver+0x94/0xa6 (8) [<c044286c>] do_initcalls+0x54/0xb6 (32) [<c010040b>] init+0x0/0x10d (16) [<c010043f>] init+0x34/0x10d (12) [<c01042a8>] kernel_thread_helper+0x0/0xb (12) [<c01042ad>] kernel_thread_helper+0x5/0xb (4)
preempt count: 00000001
. 1-level deep critical section nesting:
.. entry 1: print_traces+0x14/0x45 [<00000000>] / (0x0 [<00000000>])
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo Molnari 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 5 lines · Ingo Molnar
[ NOTE: there's one known bug in this release: selinux on one of my testsystems broke, it hangs during bootup. With
CONFIG_SECURITYdisabled it works fine. I'm working on the fix. So please keepCONFIG_SECURITYdisabled for the time being. ]
Does this include all models of security or just the selinux stuff?
Quoted 31 lines
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
__scheduleclearingPREEMPT_ACTIVE. Theneed_reschedloop 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_FIFOpriority 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_DETECTIONis 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-V0Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 6 lines · K.R. Foley
Quoted 5 lines
[ NOTE: there's one known bug in this release: selinux on one of my testsystems broke, it hangs during bootup. With
CONFIG_SECURITYdisabled it works fine. I'm working on the fix. So please keepCONFIG_SECURITYdisabled 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 9 lines · Ingo Molnar
Quoted 6 lines · K.R. Foley
Quoted 5 lines
[ NOTE: there's one known bug in this release: selinux on one of my testsystems broke, it hangs during bootup. With
CONFIG_SECURITYdisabled it works fine. I'm working on the fix. So please keepCONFIG_SECURITYdisabled for the time being. ]
Quoted 8 lines
Quoted 1 line
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 9 lines · Ingo Molnar
Quoted 6 lines
Quoted 5 lines
[ NOTE: there's one known bug in this release: selinux on one of my testsystems broke, it hangs during bootup. With
CONFIG_SECURITYdisabled it works fine. I'm working on the fix. So please keepCONFIG_SECURITYdisabled 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 3 lines · On Mon, 25 Oct 2004 14:12:10 +0200 Ingo Molnar <[email protected]> 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.0sis900.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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 6 lines · Florian Schmidt
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.
Quoted 7 lines
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
kernel/module.c renamed from kernel/module.c.orig +1 -1
@@ -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);
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 1 line · On Mon, 25 Oct 2004 15:26:05 +0200 Ingo Molnar <[email protected]> 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])
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 4 lines · Florian Schmidt
Quoted 1 line
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.
Quoted 6 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 4 lines · Ingo Molnar
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · Ingo Molnar
Quoted 4 lines
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,
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 2 lines · Rui Nuno Capela
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · Lee Revell
Quoted 2 lines · Rui Nuno Capela
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 toSCHED_OTHER, this actually may have been the only one necessary.
Quoted 7 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 3 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 7 lines · Lee Revell
Quoted 3 lines · K.R. Foley
Not being familiar with jack, does it use rtc?
Quoted 7 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Lee RevellQuoted 4 lines · Lee Revell
Quoted 2 lines · Rui Nuno Capela
OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the relevant IRQ thread handlers to be always higher than jackd's.
Quoted 8 lines
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 toSCHED_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: 0I'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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 17 lines · Fernando Pablo Lopez-Lezcano
Quoted 4 lines · Lee Revell
Quoted 2 lines · Rui Nuno Capela
OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the relevant IRQ thread handlers to be always higher than jackd's.
Quoted 8 lines
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 toSCHED_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?
Quoted 12 lines
$ 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/472Ugh, 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 31 lines · Lee Revell
Quoted 17 lines · Fernando Pablo Lopez-Lezcano
Quoted 4 lines · Lee Revell
Quoted 2 lines · Rui Nuno Capela
OTOH, jackd -R xruns are awfully back, even thought I (re)prioritize the relevant IRQ thread handlers to be always higher than jackd's.
Quoted 8 lines
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 toSCHED_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?
Quoted 12 lines
$ 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
Quoted 7 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 7 lines · Fernando Pablo Lopez-Lezcano
Quoted 2 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Rui Nuno CapelaQuoted 19 lines · Rui Nuno Capela
Quoted 8 lines · Ingo Molnar
Quoted 4 lines
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.
Quoted 8 lines
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
// Based on nanotop.c from floppyfw project
// Released under GPL
// Contact me: [email protected]
//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;
}Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines · Denis Vlasenko
<shameless plug>
Maybe this program will be useful. It is designed to give you overall system statistics without the need to scan entire/proc/NNNforest. 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?
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
nmeter.c renamed from nmeter.c.orig +3 -3
@@ -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;
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 7 lines · Rui Nuno Capela
Quoted 6 lines · Denis Vlasenko
<shameless plug>
Maybe this program will be useful. It is designed to give you overall system statistics without the need to scan entire/proc/NNNforest. Together with nice -20, it will hopefully not stall.
Quoted 8 lines
Quoted 4 lines
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"?
Quoted 1 line
Indeed, it says 0.7 as its version string. What's up on 0.9?
Here it is.
--
vda
// Based on nanotop.c from floppyfw project
// Released under GPL
// Contact me: [email protected]
//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 7S_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;
}Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines
Quoted 10 lines
Quoted 9 lines · Denis Vlasenko
<shameless plug>
Maybe this program will be useful. It is designed to give you overall system statistics without the need to scan entire/proc/NNNforest. Together with nice -20, it will hopefully not stall.Compiled with dietlibc. If you will have trouble compiling it, binary is attached too.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
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.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 10 lines · On Mon, 25 Oct 2004 16:10:08 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 6 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · Florian Schmidt
Quoted 7 lines · On Mon, 25 Oct 2004 16:10:08 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 6 lines
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.
Quoted 9 lines
Quoted 3 lines
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:
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 21 lines · K.R. Foley
Quoted 4 lines · Florian Schmidt
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)
Quoted 8 lines
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).
Signature · 5 lines
Eran Mann MRV International Tel: 972-4-9936297 Fax: 972-4-9890430 www.mrv.com
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 3 lines · On Mon, 25 Oct 2004 14:12:10 +0200 Ingo Molnar <[email protected]> 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>])
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · On Mon, 25 Oct 2004 15:39:40 +0200 Florian Schmidt <[email protected]> wrote:
Quoted 3 lines · On Mon, 25 Oct 2004 14:12:10 +0200 Ingo Molnar <[email protected]> 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 5 lines · Florian Schmidt
[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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
i have released the -V0 Real-Time Preemption patch, which can be downloaded from:
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:
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · K.R. Foley
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.
Quoted 9 lines
Quoted 2 lines
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:112this 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 2 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to K.R. FoleyQuoted 15 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 20 lines · Ingo Molnar
Quoted 15 lines · K.R. Foley
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.
Quoted 5 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 20 lines · Ingo Molnar
Quoted 15 lines · K.R. Foley
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.
Quoted 5 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · K.R. Foley
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
drivers/char/rtc.c renamed from drivers/char/rtc.c.orig +6 -6
@@ -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 lonreturn ; } -/* 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 lonspin_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 */
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines · Ingo Molnar
Quoted 8 lines
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
drivers/char/rtc.c renamed from drivers/char/rtc.c.orig +18 -9
@@ -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 lonreturn ; } -/* 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);
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 3 lines · Ingo Molnar
Quoted 1 line
does the quick hack below help?
here's a more complete fix.
third time lucky?
Ingo
drivers/char/rtc.c renamed from drivers/char/rtc.c.orig +28 -14
@@ -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 cmdif (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 lonreturn ; } -/* 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);
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 1 line · Ingo Molnar
third time lucky?
there was one more piece missing...
i've also uploaded -RT-V0.3.2 with this fix included.
Ingo
drivers/char/rtc.c renamed from drivers/char/rtc.c.orig +34 -19
@@ -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_updatirqreturn_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 cmdif (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 cmdif (!(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 lonreturn ; } -/* 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);
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 2 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 8 lines · On Wed, 27 Oct 2004 11:06:20 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 1 line · Ingo Molnar
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: 0I 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · Florian Schmidt
jackd runs with a period size of 128 frames (48000hz samplerate) and with
SCHED_FIFOwith 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 -
Quoted 6 lines
~$ 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?
Quoted 11 lines
~$ 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: 60Anyways 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · On Wed, 27 Oct 2004 12:29:21 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 5 lines
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: 0just curious, are these two important to the latency path of jackd, or are they lowprio things and are thus at
SCHED_OTHERintentionally?
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.
Quoted 5 lines
Quoted 4 lines
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.
Quoted 7 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Florian SchmidtQuoted 7 lines · On Wed, 27 Oct 2004 12:33:29 +0200 Florian Schmidt <[email protected]> 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_threshis 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 2 lines · Florian Schmidt
ah, and btw: what does the
/proc/sys/kernel/kernel_preemptiontunable do withPREEMPT_REALTIMEenabled?
it's pretty pointless to offer this tunable, agreed. In theory one could try to turn off involuntary preemption but what's the point?
Quoted 11 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to K.R. FoleyQuoted 9 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines · Ingo Molnar
Quoted 7 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 7 lines
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.
Quoted 3 lines
Quoted 2 lines
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%).
Quoted 11 lines
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.
Quoted 3 lines
Ingo
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to K.R. FoleyQuoted 1 line · K.R. Foley
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
realfeel.c renamed from realfeel.c.orig +12 -1
@@ -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 )
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 18 lines · Ingo Molnar
Quoted 1 line · K.R. Foley
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:
Quoted 9 lines
latency = 2967939 milliseconds
latency = 2967950 milliseconds
sigint
max jitter = 0 microsecondsmaybe some
/dev/rtcAPI 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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 5 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines · Ingo Molnar
Quoted 5 lines · K.R. Foley
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.
Quoted 2 lines
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.
Quoted 4 lines
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. :)
Quoted 3 lines
Ingo
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 11 lines · Ingo Molnar
Quoted 5 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 9 lines · Lee Revell
Quoted 3 lines
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).
Quoted 6 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 10 lines · Ingo Molnar
Quoted 6 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 20 lines · Lee Revell
Quoted 10 lines · Ingo Molnar
Quoted 6 lines
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()?
Quoted 5 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 11 lines · K.R. Foley
Quoted 6 lines
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.
drivers/char/rtc.c +157 -4
@@ -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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 8 lines · Lee Revell
Quoted 6 lines · K.R. Foley
Quoted 5 lines
Anyway I am generating a cleaned up version of the patch agaqinst 2.6.9-mm1.
Lee
Quoted 8 lines
Quoted 1 line
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_smppart because that never worked, I always get "Stack pointer is garbage". So now the patch is smaller and only touchesrtc.c.
OH! And thanks. :)
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 2 lines · K.R. Foley
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 6 lines · Lee Revell
Quoted 2 lines · K.R. Foley
OH! And thanks. :)
Quoted 8 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Lee RevellQuoted 8 lines · Lee Revell
Quoted 6 lines · K.R. Foley
Quoted 5 lines
Anyway I am generating a cleaned up version of the patch agaqinst 2.6.9-mm1.
Lee
Quoted 8 lines
Quoted 1 line
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_smppart because that never worked, I always get "Stack pointer is garbage". So now the patch is smaller and only touchesrtc.c.
You've also eliminated the stack trace altogether then, right? Not that I really need it. :-)
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 15 lines · K.R. Foley
Quoted 14 lines · Lee Revell
Quoted 10 lines · K.R. Foley
Quoted 5 lines
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.
Quoted 8 lines
Quoted 5 lines
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_smppart because that never worked, I always get "Stack pointer is garbage". So now the patch is smaller and only touchesrtc.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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 10 lines · Ingo Molnar
Quoted 7 lines
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.
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 7 lines · Andrew Morton
Quoted 5 lines · Ingo Molnar
Quoted 5 lines
Here is a more up to date version of the rtc-debug patch:
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 9 lines · Ingo Molnar
Quoted 5 lines · K.R. Foley
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.
Quoted 6 lines
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
arch/i386/Kconfig +11 -0
@@ -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)
arch/i386/kernel/irq.c +7 -0
@@ -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, ®s);irq_exit ();
arch/i386/kernel/kgdb_stub.c +5 -5
@@ -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);
arch/i386/kernel/timers/timer_hpet.c +2 -1
@@ -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 ; }
arch/i386/kernel/traps.c +3 -1
@@ -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;
arch/i386/lib/kgdb_serial.c +4 -4
@@ -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 )
include/asm-i386/timex.h +17 -1
@@ -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
include/linux/irq.h +3 -0
@@ -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;
kernel/irq/handle.c +4 -0
@@ -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;
kernel/irq/manage.c +9 -0
@@ -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 ();
kernel/irq/proc.c +197 -0
208 lines not on this page · raw message
kernel/latency.c +2 -1
@@ -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 );
lib/rwsem-generic.c +1 -1
@@ -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",
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 6 lines · Bill Huey
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 4 lines · Bill Huey
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
Quoted 6 lines · Bill Huey
Quoted 4 lines · Bill Huey
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.
Quoted 6 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 20 lines · Ingo Molnar
Quoted 15 lines · K.R. Foley
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.
Quoted 5 lines
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to K.R. FoleyI 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
Quoted 40 lines · K.R. Foley
Quoted 5 lines · Ingo Molnar
i have released the -V0 Real-Time Preemption patch, which can be downloaded from:
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 4 lines · Ingo Molnar
i have released the -V0 Real-Time Preemption patch, which can be downloaded from:
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
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0
In reply to Ingo MolnarQuoted 6 lines · Ingo Molnar
i have released the -V0 Real-Time Preemption patch, which can be downloaded from:
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
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-V0.3
In reply to Ingo Molnari have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release, but still experimental.
this release should fix a number of bugs that were reported for the V0
series: the futex.c assert, the lockups and the 'slowdown problem'.
The slowdown problem was an architectural issue that surfaced sometime around U10 and increased in prominence as the the number of mutexes increased and the number of spinlocks decreased. The futex.c assert was related to this architectural issue as well, and most of the lockups reported were i believe livelocks caused by the same issue. Also, the scheduler path had an easy-to-trigger deadlock that often just silently locked up.
some of the networking lockups might be related to this issue too, but i think PREEMPT_REALTIME still has separate lock odering issues within the networking code. Please re-report any deadlock-tracer asserts that you might encounter.
Changes since -V0.2:
- HEAP_SIZE fix from Karsten Wiese
- fix hdparm-triggered debugging message reported by Mark H Johnson
- fixed mutex related preemption to not impact the task state, just like a normal spinlock does. This necessiated the introduction of TASK_RUNNING_MUTEX handling and related kernel infrastructure. This framework avoids spurious wakeups done by mutex handling by isolating the state changes done by normal wakeups vs. the state changes caused by the mutex code.
- added per-CPU deschedule threads. This fixes a deadlock scenario and it is also much faster than keventd.
- fix debugging message upon console unblanking
to create a -V0.3 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.3
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 7 lines
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release, but still experimental.
i've uploaded -V0.3.1, it fixes a trivial procfs oversight (related to the new TASK_RUNNING_MUTEX state) that just triggered a crash in one of my stresstests.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
+ http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.9-mm1-V0.3
Bad link.
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 8 lines · Bill Huey (hui)
Quoted 4 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
Quoted 8 lines
Bad link.
bill
That's because he uploaded V0.3.1.
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 8 lines · K.R. Foley
Quoted 5 lines · Bill Huey (hui)
Quoted 4 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
That's because he uploaded V0.3.1.
Even that top level link/directory doesn't work.
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 12 lines · Bill Huey (hui)
Quoted 8 lines · K.R. Foley
Quoted 6 lines · Bill Huey (hui)
Quoted 4 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
Quoted 8 lines
Quoted 1 line
That's because he uploaded V0.3.1.
Even that top level link/directory doesn't work.
bill
For me it redirects to http://people.redhat.com/mingo/realtime-preempt/ Try that directly.
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 3 lines · K.R. Foley
Bill Huey (hui) wrote:
For me it redirects to http://people.redhat.com/mingo/realtime-preempt/
Try that directly.
They both work now, same for redirection.
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
In reply to Ingo MolnarQuoted 11 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
[...]
some of the networking lockups might be related to this issue too, but i thinkPREEMPT_REALTIMEstill has separate lock odering issues within the networking code. Please re-report any deadlock-tracer asserts that you might encounter.
OK, re-reporting a network deadlock. It happens a few seconds after starting Firefox. This is with -V0.3.2:
Linux version 2.6.9-mm1-RT-V0.3.2 (michich@k4-912b) (gcc version 3.3.4 (Debian 1:3.3.4-6sarge1)) #5 Wed Oct 27 12:26:13 CEST 2004 BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ffb0000 (usable)
BIOS-e820: 000000003ffb0000 - 000000003ffc0000 (ACPI data)
BIOS-e820: 000000003ffc0000 - 000000003fff0000 (ACPI NVS)
BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
BIOS-e820: 00000000ff780000 - 0000000100000000 (reserved)
Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.
896MB LOWMEM available.
found SMP MP-table at 000ff780
On node 0 totalpages: 229376
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 0 pages, LIFO batch:1
DMI 2.3 present.
ACPI: RSDP (v002 ACPIAM ) @ 0x000fa840
ACPI: XSDT (v001 A M I OEMXSDT 0x06000417 MSFT 0x00000097) @ 0x3ffb0100
ACPI: FADT (v003 A M I OEMFACP 0x06000417 MSFT 0x00000097) @ 0x3ffb0290
ACPI: MADT (v001 A M I OEMAPIC 0x06000417 MSFT 0x00000097) @ 0x3ffb0390
ACPI: OEMB (v001 A M I OEMBIOS 0x06000417 MSFT 0x00000097) @ 0x3ffc0040
ACPI: DSDT (v001 A0036 A0036001 0x00000001 MSFT 0x0100000d) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:7 APIC version 16
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode: Flat. Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Built 1 zonelists
Initializing CPU#0
Kernel command line: BOOT_IMAGE=Deb-32-RT ro root=308 [email protected]/eth0,[email protected]/00:0C:6E:2F:30:75
netconsole: local port 4444
netconsole: local IP 147.229.222.29
netconsole: interface eth0
netconsole: remote port 4444
netconsole: remote IP 147.229.222.28
netconsole: remote ethernet address 00:0c:6e:2f:30:75
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 2403.782 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x30
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 905628k/917504k available (1843k kernel code, 11488k reserved, 786k data, 148k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 4702.20 BogoMIPS (lpj=2351104)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 078bfbff e1d3fbff 00000000 00000000
CPU: After vendor identify, caps: 078bfbff e1d3fbff 00000000 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: After all inits, caps: 078bfbff e1d3fbff 00000000 00000010
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: AMD Athlon(tm) 64 FX-53 Processor stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
softirq RT prio: 24.
desched cpu_callback 2/00000000
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 pin1=2 pin2=-1
desched thread 0 started up.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 *11 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 *10 11 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 7 10 11 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
PCI: Using ACPI for IRQ routing
** PCI interrupts are no longer routed automatically. If this
** causes a device to stop working, it is probably because the
** driver failed to call pci_enable_device(). As a temporary
** workaround, the "pci=routeirq" argument restores the old
** behavior. If this argument makes the device work again,
** please email the output of "lspci" to [email protected]
** so I can fix the driver.
Initializing Cryptographic API
Real Time Clock Driver v1.12
ACPI: PS/2 Keyboard Controller [PS2K] at I/O 0x60, 0x64, irq 1
ACPI: PS/2 Mouse Controller [PS2M] at irq 12
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
ACPI: PCI interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
ACPI: PCI interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
eth0: Yukon Gigabit Ethernet 10/100/1000Base-T Adapter
PrefPort:A RlmtMode:Check Link State
netconsole: device eth0 not up yet, forcing it
netconsole: carrier detect appears flaky, waiting 10 seconds
IRQ#17 thread RT prio: 49.
eth0: network connection up using port A
speed: 100
autonegotiation: yes
duplex mode: full
flowctrl: none
irq moderation: disabled
scatter-gather: enabled
netconsole: network logging started
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xxVP_IDE: IDE controller at PCI slot 0000:00:0f.1
ACPI: PCI interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20VP_IDE: chipset revision 6VP_IDE: not 100% native mode: will probe irqs laterVP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:pio, hdd:DMAProbing IDE interface ide0...
hda: ST3120026A, ATA DISK drive
hdb: ST320011A, ATA DISK drive
elevator: using anticipatory as default io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdd: TEAC CD-W552E, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 1024KiB
IRQ#14 thread RT prio: 48.
hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 < hda5 hda6 hda7 hda8 > hda3
hdb: max request size: 128KiB
hdb: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
hdb: cache flushes not supported
hdb: hdb1
mice: PS/2 mouse device common for all mice
IRQ#12 thread RT prio: 47.
IRQ#1 thread RT prio: 46.
input: AT Translated Set 2 keyboard on isa0060/serio0
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1
input: PC Speaker
NET: Registered protocol family 2
IP: routing cache hash table of 256 buckets, 40Kbytes
TCP: Hash tables configured (established 8192 bind 13107)arp_tables: (C) 2002 David S. Miller
NET: Registered protocol family 1
ACPI: (supports S0 S1 S3 S4 S5)
ACPI wakeup devices:
PCI0 PS2K PS2M UAR2 UAR1 AC97 USB1 USB2 USB3 USB4 EHCI PWRB SLPB
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 148k freed
Adding 995988k swap on /dev/hda6. Priority:2 extents:1
EXT3 FS on hda8, internal journal
IRQ#8 thread RT prio: 45.ip_tables: (C) 2000-2002 Netfilter core teamip_conntrack version 2.1 (7168 buckets, 57344 max) - 456 bytes per conntrack Capability LSM initialized
kjournald starting. Commit interval 5 seconds
EXT3 FS on hda5, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected AGP bridge 0
agpgart: Maximum main memory to use for agp memory: 816M
agpgart: AGP aperture is 64M @ 0xe4000000
ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 16 (level, low) -> IRQ 16 SCSI subsystem initialized
libata version 1.02 loaded.sata_via version 0.20
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 20 sata_via(0000:00:0f.0): routed to hard irq line 10
ata1: SATA max UDMA/133 cmd 0xC400 ctl 0xC002 bmdma 0xB000 irq 20
ata2: SATA max UDMA/133 cmd 0xB800 ctl 0xB402 bmdma 0xB008 irq 20
ata1: no device found (phy stat 00000000)
scsi0 : sata_via
ata2: no device found (phy stat 00000000)
scsi1 : sata_via
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.0, from 11 to 5uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller uhci_hcd 0000:00:10.0: irq 21, io base 0xc800uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1 hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.1[A] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.1, from 11 to 5uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2) uhci_hcd 0000:00:10.1: irq 21, io base 0xd000uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 2 hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.2[B] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.2, from 10 to 5uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3) uhci_hcd 0000:00:10.2: irq 21, io base 0xd400uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 3 hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.3[B] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.3, from 10 to 5uhci_hcd 0000:00:10.3: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#4) uhci_hcd 0000:00:10.3: irq 21, io base 0xd800uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4 hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.4[C] -> GSI 21 (level, low) -> IRQ 21 ehci_hcd 0000:00:10.4: VIA Technologies, Inc. USB 2.0ehci_hcd 0000:00:10.4: irq 21, pci mem 0xfbc00000ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 5 ehci_hcd 0000:00:10.4: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10 hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
NET: Registered protocol family 17
IRQ#4 thread RT prio: 44.
IRQ#3 thread RT prio: 43.
ACPI: Processor [CPU1] (supports C1)
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
BUG: semaphore recursion deadlock detected! .. current task firefox-bin/4761 [f21a3020] is already holding c04306c0 [w:f21a3020, d:1]. [<c01c7408>] __rwsem_deadlock+0x188/0x1a0 (12) [<c01c72ec>] __rwsem_deadlock+0x6c/0x1a0 (52) [<c0271c51>] dev_queue_xmit_nit+0x41/0x130 (24) [<c02cb9ee>] down_write_mutex+0x5e/0x210 (4) [<c02cba8e>] down_write_mutex+0xfe/0x210 (24) [<c02cbba8>] down_read_mutex+0x8/0x30 (12) [<c0271c51>] dev_queue_xmit_nit+0x41/0x130 (40) [<c01c7abe>] up_write_mutex+0x2e/0x60 (12) [<c0281403>] qdisc_restart+0x223/0x250 (24) [<c02721dd>] dev_queue_xmit+0x1ad/0x260 (12) [<c0114310>] mcount+0x14/0x18 (8) [<c02721ef>] dev_queue_xmit+0x1bf/0x260 (36) [<c027852e>] neigh_resolve_output+0xfe/0x240 (32) [<c029323e>] ip_finish_output2+0xbe/0x240 (56) [<c027dc05>] nf_hook_slow+0xd5/0x130 (36) [<c0293180>] ip_finish_output2+0x0/0x240 (28) [<c0290a4b>] ip_finish_output+0x26b/0x270 (32) [<c0293180>] ip_finish_output2+0x0/0x240 (24) [<c029316a>] dst_output+0x1a/0x30 (32) [<c027dc05>] nf_hook_slow+0xd5/0x130 (12) [<c0293150>] dst_output+0x0/0x30 (28) [<c029110a>] ip_queue_xmit+0x45a/0x570 (32) [<c0293150>] dst_output+0x0/0x30 (24) [<c0135cb5>] sub_preempt_count+0x65/0xd0 (36) [<c01c791e>] __up_write+0x10e/0x220 (8) [<c0135748>] check_preempt_timing+0x58/0x2e0 (8) [<c0135cb5>] sub_preempt_count+0x65/0xd0 (4) [<c01c791e>] __up_write+0x10e/0x220 (4) [<c0134fdd>] __mcount+0x1d/0x20 (28) [<c01c715e>] rwsem_owner_del+0xe/0xf0 (4) [<c0134fdd>] __mcount+0x1d/0x20 (40) [<c02a871e>] tcp_v4_send_check+0xe/0xf0 (4) [<c02a2219>] tcp_transmit_skb+0x439/0x880 (4) [<c0114310>] mcount+0x14/0x18 (8) [<c02a875f>] tcp_v4_send_check+0x4f/0xf0 (20) [<c02a22c2>] tcp_transmit_skb+0x4e2/0x880 (32) [<c0114310>] mcount+0x14/0x18 (28) [<c02a4f56>] tcp_send_ack+0xa6/0xf0 (52) [<c029feb4>] __tcp_ack_snd_check+0x14/0xa0 (12) [<c02a0965>] tcp_rcv_established+0x6e5/0x920 (24) [<c02a9c0e>] tcp_v4_do_rcv+0x13e/0x150 (56) [<c026b065>] __release_sock+0x55/0x80 (32) [<c026b98e>] release_sock+0x7e/0x80 (32) [<c0297c94>] tcp_recvmsg+0x2f4/0x750 (24) [<c0114310>] mcount+0x14/0x18 (64) [<c026bb19>] sock_common_recvmsg+0x59/0x70 (20) [<c0267da1>] sock_recvmsg+0xd1/0xf0 (48) [<c01c791e>] __up_write+0x10e/0x220 (24) [<c0134fdd>] __mcount+0x1d/0x20 (44) [<c01c715e>] rwsem_owner_del+0xe/0xf0 (4) [<c015f959>] fget+0x59/0x70 (72) [<c01c7abe>] up_write_mutex+0x2e/0x60 (28) [<c01344e0>] autoremove_wake_function+0x0/0x60 (24) [<c026798f>] sockfd_lookup+0x1f/0x80 (28) [<c0114310>] mcount+0x14/0x18 (4) [<c0269409>] sys_recvfrom+0x99/0x100 (20) [<c01426f2>] free_pages_bulk+0x1d2/0x2e0 (48) [<c01c7abe>] up_write_mutex+0x2e/0x60 (28) [<c0114310>] mcount+0x14/0x18 (112) [<c02694ab>] sys_recv+0x3b/0x40 (20) [<c0269be2>] sys_socketcall+0x152/0x240 (32) [<c010527b>] syscall_call+0x7/0xb (68)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: down_write_mutex+0x201/0x210 [<c02cbb91>] / (dev_queue_xmit_nit+0x41/0x130 [<c0271c51>]) .. entry 2: print_traces+0x1d/0x90 [<c013600d>] / (dump_stack+0x23/0x30 [<c01060b3>])
BUG: circular semaphore deadlock: ksoftirqd/0/2 is blocked on c04306c0, deadlocking firefox-bin/4761
f7c2be24 00000046 f7c24020 c03bfca0 00000202 00001dd8 f7c2a000 f7c24020
00000000 f7c2be10 000002c5 03c4f81b 00000029 f7c24020 f7c242b4
f7c2a000
f7c24020 00000000 f7c2be48 c02ca7af f7c2be48 00000082 c03e3a40
c02cbb1e
Call Trace:
[<c02ca7af>] schedule+0x2f/0xe0 (80)
[<c02cbb1e>] down_write_mutex+0x18e/0x210 (16)
[<c02cbadd>] down_write_mutex+0x14d/0x210 (20)
[<c02cbba8>] down_read_mutex+0x8/0x30 (12)
[<c027db57>] nf_hook_slow+0x27/0x130 (40)
[<c0134fdd>] __mcount+0x1d/0x20 (24)
[<c028d4ae>] ip_rcv+0xe/0x540 (4)
[<c027270d>] netif_receive_skb+0x12d/0x240 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c028d900>] ip_rcv+0x460/0x540 (20)
[<c028db80>] ip_rcv_finish+0x0/0x300 (24)
[<c0114310>] mcount+0x14/0x18 (8)
[<c027270d>] netif_receive_skb+0x12d/0x240 (28)
[<c0270008>] gnet_stats_copy_basic+0x18/0x80 (20)
[<c0272a3f>] net_rx_action+0x7f/0x1a0 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c02728a8>] process_backlog+0x88/0x1a0 (20)
[<c0272a3f>] net_rx_action+0x7f/0x1a0 (40)
[<c0123807>] ___do_softirq+0x87/0xd0 (36)
[<c01238d8>] _do_softirq+0x8/0x30 (8)
[<c0123cc4>] ksoftirqd+0xb4/0x100 (4)
[<c01238f0>] _do_softirq+0x20/0x30 (28)
[<c0123cc4>] ksoftirqd+0xb4/0x100 (8)
[<c0133f2a>] kthread+0xaa/0xb0 (24)
[<c0123c10>] ksoftirqd+0x0/0x100 (20)
[<c0133e80>] kthread+0x0/0xb0 (12)
[<c0103319>] kernel_thread_helper+0x5/0xc (16)preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __schedule+0x4e/0x640 [<c02ca18e>] / (schedule+0x2f/0xe0 [<c02ca7af>]) .. entry 2: __schedule+0xdd/0x640 [<c02ca21d>] / (schedule+0x2f/0xe0 [<c02ca7af>])
Michal
Linux version 2.6.9-mm1-RT-V0.3.2 (michich@k4-912b) (gcc version 3.3.4 (Debian 1:3.3.4-6sarge1)) #5 Wed Oct 27 12:26:13 CEST 2004 BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000003ffb0000 (usable)
BIOS-e820: 000000003ffb0000 - 000000003ffc0000 (ACPI data)
BIOS-e820: 000000003ffc0000 - 000000003fff0000 (ACPI NVS)
BIOS-e820: 000000003fff0000 - 0000000040000000 (reserved)
BIOS-e820: 00000000ff780000 - 0000000100000000 (reserved)
Warning only 896MB will be used.
Use a HIGHMEM enabled kernel.
896MB LOWMEM available.
found SMP MP-table at 000ff780
On node 0 totalpages: 229376
DMA zone: 4096 pages, LIFO batch:1
Normal zone: 225280 pages, LIFO batch:16
HighMem zone: 0 pages, LIFO batch:1
DMI 2.3 present.
ACPI: RSDP (v002 ACPIAM ) @ 0x000fa840
ACPI: XSDT (v001 A M I OEMXSDT 0x06000417 MSFT 0x00000097) @ 0x3ffb0100
ACPI: FADT (v003 A M I OEMFACP 0x06000417 MSFT 0x00000097) @ 0x3ffb0290
ACPI: MADT (v001 A M I OEMAPIC 0x06000417 MSFT 0x00000097) @ 0x3ffb0390
ACPI: OEMB (v001 A M I OEMBIOS 0x06000417 MSFT 0x00000097) @ 0x3ffc0040
ACPI: DSDT (v001 A0036 A0036001 0x00000001 MSFT 0x0100000d) @ 0x00000000
ACPI: Local APIC address 0xfee00000
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 15:7 APIC version 16
ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 1, version 3, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode: Flat. Using 1 I/O APICs
Using ACPI (MADT) for SMP configuration information
Built 1 zonelists
Initializing CPU#0
Kernel command line: BOOT_IMAGE=Deb-32-RT ro root=308 [email protected]/eth0,[email protected]/00:0C:6E:2F:30:75
netconsole: local port 4444
netconsole: local IP 147.229.222.29
netconsole: interface eth0
netconsole: remote port 4444
netconsole: remote IP 147.229.222.28
netconsole: remote ethernet address 00:0c:6e:2f:30:75
PID hash table entries: 4096 (order: 12, 65536 bytes)
Detected 2403.782 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x30
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 905628k/917504k available (1843k kernel code, 11488k reserved, 786k data, 148k init, 0k highmem) Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay loop... 4702.20 BogoMIPS (lpj=2351104)
Security Framework v1.0.0 initialized
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: After generic identify, caps: 078bfbff e1d3fbff 00000000 00000000
CPU: After vendor identify, caps: 078bfbff e1d3fbff 00000000 00000000
CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
CPU: L2 Cache: 1024K (64 bytes/line)
CPU: After all inits, caps: 078bfbff e1d3fbff 00000000 00000010
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU: AMD Athlon(tm) 64 FX-53 Processor stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.spawn_desched_task(00000000)
desched cpu_callback 3/00000000
ksoftirqd started up.
softirq RT prio: 24.
desched cpu_callback 2/00000000
ENABLING IO-APIC IRQs
..TIMER: vector=0x31 pin1=2 pin2=-1
desched thread 0 started up.
NET: Registered protocol family 16
PCI: PCI BIOS revision 2.10 entry at 0xf0031, last bus=1
PCI: Using configuration type 1
mtrr: v2.0 (20020519)
ACPI: Subsystem revision 20040816
ACPI: Interpreter enabled
ACPI: Using IOAPIC for interrupt routing
ACPI: PCI Root Bridge [PCI0] (00:00)
PCI: Probing PCI hardware (bus 00)
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 7 10 *11 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 7 *10 11 14 15)
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 *5 7 10 11 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKF] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKH] (IRQs 3 4 5 7 10 11 14 15) *0, disabled.
PCI: Using ACPI for IRQ routing
** PCI interrupts are no longer routed automatically. If this
** causes a device to stop working, it is probably because the
** driver failed to call pci_enable_device(). As a temporary
** workaround, the "pci=routeirq" argument restores the old
** behavior. If this argument makes the device work again,
** please email the output of "lspci" to [email protected]
** so I can fix the driver.
Initializing Cryptographic API
Real Time Clock Driver v1.12
ACPI: PS/2 Keyboard Controller [PS2K] at I/O 0x60, 0x64, irq 1
ACPI: PS/2 Mouse Controller [PS2M] at irq 12
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing disabled
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
ACPI: PCI interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
ACPI: PCI interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 17
eth0: Yukon Gigabit Ethernet 10/100/1000Base-T Adapter
PrefPort:A RlmtMode:Check Link State
netconsole: device eth0 not up yet, forcing it
netconsole: carrier detect appears flaky, waiting 10 seconds
IRQ#17 thread RT prio: 49.
eth0: network connection up using port A
speed: 100
autonegotiation: yes
duplex mode: full
flowctrl: none
irq moderation: disabled
scatter-gather: enabled
netconsole: network logging started
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xxVP_IDE: IDE controller at PCI slot 0000:00:0f.1
ACPI: PCI interrupt 0000:00:0f.1[A] -> GSI 20 (level, low) -> IRQ 20VP_IDE: chipset revision 6VP_IDE: not 100% native mode: will probe irqs laterVP_IDE: VIA vt8237 (rev 00) IDE UDMA133 controller on pci0000:00:0f.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA, hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:pio, hdd:DMAProbing IDE interface ide0...
hda: ST3120026A, ATA DISK drive
hdb: ST320011A, ATA DISK drive
elevator: using anticipatory as default io scheduler
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdd: TEAC CD-W552E, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
Probing IDE interface ide2...
ide2: Wait for ready failed before probe !
Probing IDE interface ide3...
ide3: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hda: max request size: 1024KiB
IRQ#14 thread RT prio: 48.
hda: 234441648 sectors (120034 MB) w/8192KiB Cache, CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
hda: hda1 hda2 < hda5 hda6 hda7 hda8 > hda3
hdb: max request size: 128KiB
hdb: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=38792/16/63, UDMA(100)
hdb: cache flushes not supported
hdb: hdb1
mice: PS/2 mouse device common for all mice
IRQ#12 thread RT prio: 47.
IRQ#1 thread RT prio: 46.
input: AT Translated Set 2 keyboard on isa0060/serio0
input: ImExPS/2 Generic Explorer Mouse on isa0060/serio1
input: PC Speaker
NET: Registered protocol family 2
IP: routing cache hash table of 256 buckets, 40Kbytes
TCP: Hash tables configured (established 8192 bind 13107)arp_tables: (C) 2002 David S. Miller
NET: Registered protocol family 1
ACPI: (supports S0 S1 S3 S4 S5)
ACPI wakeup devices:
PCI0 PS2K PS2M UAR2 UAR1 AC97 USB1 USB2 USB3 USB4 EHCI PWRB SLPB
EXT3-fs: INFO: recovery required on readonly filesystem.
EXT3-fs: write access will be enabled during recovery.
kjournald starting. Commit interval 5 seconds
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 148k freed
Adding 995988k swap on /dev/hda6. Priority:2 extents:1
EXT3 FS on hda8, internal journal
IRQ#8 thread RT prio: 45.ip_tables: (C) 2000-2002 Netfilter core teamip_conntrack version 2.1 (7168 buckets, 57344 max) - 456 bytes per conntrack Capability LSM initialized
kjournald starting. Commit interval 5 seconds
EXT3 FS on hda5, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Linux agpgart interface v0.100 (c) Dave Jones
agpgart: Detected AGP bridge 0
agpgart: Maximum main memory to use for agp memory: 816M
agpgart: AGP aperture is 64M @ 0xe4000000
ACPI: PCI interrupt 0000:00:09.0[A] -> GSI 16 (level, low) -> IRQ 16 SCSI subsystem initialized
libata version 1.02 loaded.sata_via version 0.20
ACPI: PCI interrupt 0000:00:0f.0[B] -> GSI 20 (level, low) -> IRQ 20 sata_via(0000:00:0f.0): routed to hard irq line 10
ata1: SATA max UDMA/133 cmd 0xC400 ctl 0xC002 bmdma 0xB000 irq 20
ata2: SATA max UDMA/133 cmd 0xB800 ctl 0xB402 bmdma 0xB008 irq 20
ata1: no device found (phy stat 00000000)
scsi0 : sata_via
ata2: no device found (phy stat 00000000)
scsi1 : sata_via
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
ACPI: PCI interrupt 0000:00:10.0[A] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.0, from 11 to 5uhci_hcd 0000:00:10.0: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller uhci_hcd 0000:00:10.0: irq 21, io base 0xc800uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 1 hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.1[A] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.1, from 11 to 5uhci_hcd 0000:00:10.1: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#2) uhci_hcd 0000:00:10.1: irq 21, io base 0xd000uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 2 hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.2[B] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.2, from 10 to 5uhci_hcd 0000:00:10.2: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#3) uhci_hcd 0000:00:10.2: irq 21, io base 0xd400uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 3 hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.3[B] -> GSI 21 (level, low) -> IRQ 21
PCI: Via IRQ fixup for 0000:00:10.3, from 10 to 5uhci_hcd 0000:00:10.3: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (#4) uhci_hcd 0000:00:10.3: irq 21, io base 0xd800uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 4 hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
ACPI: PCI interrupt 0000:00:10.4[C] -> GSI 21 (level, low) -> IRQ 21 ehci_hcd 0000:00:10.4: VIA Technologies, Inc. USB 2.0ehci_hcd 0000:00:10.4: irq 21, pci mem 0xfbc00000ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 5 ehci_hcd 0000:00:10.4: USB 2.0 enabled, EHCI 1.00, driver 2004-May-10 hub 5-0:1.0: USB hub found
hub 5-0:1.0: 8 ports detected
NET: Registered protocol family 17
IRQ#4 thread RT prio: 44.
IRQ#3 thread RT prio: 43.
ACPI: Processor [CPU1] (supports C1)
ACPI: Power Button (FF) [PWRF]
ACPI: Sleep Button (CM) [SLPB]
BUG: semaphore recursion deadlock detected! .. current task firefox-bin/4761 [f21a3020] is already holding c04306c0 [w:f21a3020, d:1]. [<c01c7408>] __rwsem_deadlock+0x188/0x1a0 (12) [<c01c72ec>] __rwsem_deadlock+0x6c/0x1a0 (52) [<c0271c51>] dev_queue_xmit_nit+0x41/0x130 (24) [<c02cb9ee>] down_write_mutex+0x5e/0x210 (4) [<c02cba8e>] down_write_mutex+0xfe/0x210 (24) [<c02cbba8>] down_read_mutex+0x8/0x30 (12) [<c0271c51>] dev_queue_xmit_nit+0x41/0x130 (40) [<c01c7abe>] up_write_mutex+0x2e/0x60 (12) [<c0281403>] qdisc_restart+0x223/0x250 (24) [<c02721dd>] dev_queue_xmit+0x1ad/0x260 (12) [<c0114310>] mcount+0x14/0x18 (8) [<c02721ef>] dev_queue_xmit+0x1bf/0x260 (36) [<c027852e>] neigh_resolve_output+0xfe/0x240 (32) [<c029323e>] ip_finish_output2+0xbe/0x240 (56) [<c027dc05>] nf_hook_slow+0xd5/0x130 (36) [<c0293180>] ip_finish_output2+0x0/0x240 (28) [<c0290a4b>] ip_finish_output+0x26b/0x270 (32) [<c0293180>] ip_finish_output2+0x0/0x240 (24) [<c029316a>] dst_output+0x1a/0x30 (32) [<c027dc05>] nf_hook_slow+0xd5/0x130 (12) [<c0293150>] dst_output+0x0/0x30 (28) [<c029110a>] ip_queue_xmit+0x45a/0x570 (32) [<c0293150>] dst_output+0x0/0x30 (24) [<c0135cb5>] sub_preempt_count+0x65/0xd0 (36) [<c01c791e>] __up_write+0x10e/0x220 (8) [<c0135748>] check_preempt_timing+0x58/0x2e0 (8) [<c0135cb5>] sub_preempt_count+0x65/0xd0 (4) [<c01c791e>] __up_write+0x10e/0x220 (4) [<c0134fdd>] __mcount+0x1d/0x20 (28) [<c01c715e>] rwsem_owner_del+0xe/0xf0 (4) [<c0134fdd>] __mcount+0x1d/0x20 (40) [<c02a871e>] tcp_v4_send_check+0xe/0xf0 (4) [<c02a2219>] tcp_transmit_skb+0x439/0x880 (4) [<c0114310>] mcount+0x14/0x18 (8) [<c02a875f>] tcp_v4_send_check+0x4f/0xf0 (20) [<c02a22c2>] tcp_transmit_skb+0x4e2/0x880 (32) [<c0114310>] mcount+0x14/0x18 (28) [<c02a4f56>] tcp_send_ack+0xa6/0xf0 (52) [<c029feb4>] __tcp_ack_snd_check+0x14/0xa0 (12) [<c02a0965>] tcp_rcv_established+0x6e5/0x920 (24) [<c02a9c0e>] tcp_v4_do_rcv+0x13e/0x150 (56) [<c026b065>] __release_sock+0x55/0x80 (32) [<c026b98e>] release_sock+0x7e/0x80 (32) [<c0297c94>] tcp_recvmsg+0x2f4/0x750 (24) [<c0114310>] mcount+0x14/0x18 (64) [<c026bb19>] sock_common_recvmsg+0x59/0x70 (20) [<c0267da1>] sock_recvmsg+0xd1/0xf0 (48) [<c01c791e>] __up_write+0x10e/0x220 (24) [<c0134fdd>] __mcount+0x1d/0x20 (44) [<c01c715e>] rwsem_owner_del+0xe/0xf0 (4) [<c015f959>] fget+0x59/0x70 (72) [<c01c7abe>] up_write_mutex+0x2e/0x60 (28) [<c01344e0>] autoremove_wake_function+0x0/0x60 (24) [<c026798f>] sockfd_lookup+0x1f/0x80 (28) [<c0114310>] mcount+0x14/0x18 (4) [<c0269409>] sys_recvfrom+0x99/0x100 (20) [<c01426f2>] free_pages_bulk+0x1d2/0x2e0 (48) [<c01c7abe>] up_write_mutex+0x2e/0x60 (28) [<c0114310>] mcount+0x14/0x18 (112) [<c02694ab>] sys_recv+0x3b/0x40 (20) [<c0269be2>] sys_socketcall+0x152/0x240 (32) [<c010527b>] syscall_call+0x7/0xb (68)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: down_write_mutex+0x201/0x210 [<c02cbb91>] / (dev_queue_xmit_nit+0x41/0x130 [<c0271c51>]) .. entry 2: print_traces+0x1d/0x90 [<c013600d>] / (dump_stack+0x23/0x30 [<c01060b3>])
BUG: circular semaphore deadlock: ksoftirqd/0/2 is blocked on c04306c0, deadlocking firefox-bin/4761
f7c2be24 00000046 f7c24020 c03bfca0 00000202 00001dd8 f7c2a000 f7c24020
00000000 f7c2be10 000002c5 03c4f81b 00000029 f7c24020 f7c242b4 f7c2a000
f7c24020 00000000 f7c2be48 c02ca7af f7c2be48 00000082 c03e3a40 c02cbb1e
Call Trace:
[<c02ca7af>] schedule+0x2f/0xe0 (80)
[<c02cbb1e>] down_write_mutex+0x18e/0x210 (16)
[<c02cbadd>] down_write_mutex+0x14d/0x210 (20)
[<c02cbba8>] down_read_mutex+0x8/0x30 (12)
[<c027db57>] nf_hook_slow+0x27/0x130 (40)
[<c0134fdd>] __mcount+0x1d/0x20 (24)
[<c028d4ae>] ip_rcv+0xe/0x540 (4)
[<c027270d>] netif_receive_skb+0x12d/0x240 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c028d900>] ip_rcv+0x460/0x540 (20)
[<c028db80>] ip_rcv_finish+0x0/0x300 (24)
[<c0114310>] mcount+0x14/0x18 (8)
[<c027270d>] netif_receive_skb+0x12d/0x240 (28)
[<c0270008>] gnet_stats_copy_basic+0x18/0x80 (20)
[<c0272a3f>] net_rx_action+0x7f/0x1a0 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c02728a8>] process_backlog+0x88/0x1a0 (20)
[<c0272a3f>] net_rx_action+0x7f/0x1a0 (40)
[<c0123807>] ___do_softirq+0x87/0xd0 (36)
[<c01238d8>] _do_softirq+0x8/0x30 (8)
[<c0123cc4>] ksoftirqd+0xb4/0x100 (4)
[<c01238f0>] _do_softirq+0x20/0x30 (28)
[<c0123cc4>] ksoftirqd+0xb4/0x100 (8)
[<c0133f2a>] kthread+0xaa/0xb0 (24)
[<c0123c10>] ksoftirqd+0x0/0x100 (20)
[<c0133e80>] kthread+0x0/0xb0 (12)
[<c0103319>] kernel_thread_helper+0x5/0xc (16)preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __schedule+0x4e/0x640 [<c02ca18e>] / (schedule+0x2f/0xe0 [<c02ca7af>]) .. entry 2: __schedule+0xdd/0x640 [<c02ca21d>] / (schedule+0x2f/0xe0 [<c02ca7af>])
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 2 lines · Michal Schmidt
OK, re-reporting a network deadlock. It happens a few seconds after starting Firefox. This is with -V0.3.2:
i've uploaded -V0.4.1 with a fix that could fix this networking deadlock. Does it work any better?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 8 lines · Ingo Molnar
Quoted 1 line · Michal Schmidt
OK, re-reporting a network deadlock. It happens a few seconds after starting Firefox. This is with -V0.3.2:
i've uploaded -V0.4.1 with a fix that could fix this networking deadlock. Does it work any better?
Ingo
Unfortunately, no. It's only slightly different:
BUG: semaphore recursion deadlock detected! .. current task ksoftirqd/0/2 [f7c24020] is already holding c0438ec0 [w:f7c24020, d:0]. [<c01c7a08>] __rwsem_deadlock+0x188/0x1a0 (12) [<c01c78ec>] __rwsem_deadlock+0x6c/0x1a0 (52) [<c0134ac0>] _mutex_lock+0x40/0x50 (28) [<c02cc153>] down_write_mutex+0x113/0x220 (24) [<c01c8228>] down_mutex+0x8/0x10 (12) [<c0134ac0>] _mutex_lock+0x40/0x50 (40) [<c0281a16>] qdisc_restart+0x236/0x250 (24) [<c0281d2e>] pfifo_fast_enqueue+0xe/0xc0 (8) [<c02727dd>] dev_queue_xmit+0x1ad/0x260 (4) [<c0114310>] mcount+0x14/0x18 (8) [<c02727ef>] dev_queue_xmit+0x1bf/0x260 (36) [<c0278b2e>] neigh_resolve_output+0xfe/0x240 (32) [<c029383e>] ip_finish_output2+0xbe/0x240 (56) [<c01c80be>] up_write_mutex+0x2e/0x60 (12) [<c027e211>] nf_hook_slow+0xe1/0x130 (24) [<c0293780>] ip_finish_output2+0x0/0x240 (28) [<c029104b>] ip_finish_output+0x26b/0x270 (32) [<c0293780>] ip_finish_output2+0x0/0x240 (24) [<c029376a>] dst_output+0x1a/0x30 (32) [<c027e211>] nf_hook_slow+0xe1/0x130 (12) [<c0293750>] dst_output+0x0/0x30 (28) [<c029170a>] ip_queue_xmit+0x45a/0x570 (32) [<c0293750>] dst_output+0x0/0x30 (24) [<c0135ef0>] sub_preempt_count+0x60/0xd0 (24) [<c01c7f1e>] __up_write+0x10e/0x220 (12) [<c0135ef0>] sub_preempt_count+0x60/0xd0 (4) [<c0135958>] check_preempt_timing+0x58/0x2f0 (8) [<c0135ef0>] sub_preempt_count+0x60/0xd0 (4) [<c01c7f1e>] __up_write+0x10e/0x220 (4) [<c013514d>] __mcount+0x1d/0x20 (32) [<c01c775e>] rwsem_owner_del+0xe/0xf0 (4) [<c013514d>] __mcount+0x1d/0x20 (40) [<c02a8d1e>] tcp_v4_send_check+0xe/0xf0 (4) [<c02a2819>] tcp_transmit_skb+0x439/0x880 (4) [<c0114310>] mcount+0x14/0x18 (8) [<c02a8d5f>] tcp_v4_send_check+0x4f/0xf0 (20) [<c02a28c2>] tcp_transmit_skb+0x4e2/0x880 (32) [<c0114310>] mcount+0x14/0x18 (28) [<c02a5556>] tcp_send_ack+0xa6/0xf0 (52) [<c02a0527>] __tcp_ack_snd_check+0x87/0xa0 (12) [<c02a0f65>] tcp_rcv_established+0x6e5/0x920 (24) [<c02aa20e>] tcp_v4_do_rcv+0x13e/0x150 (56) [<c02aa8e0>] tcp_v4_rcv+0x6c0/0x8d0 (32) [<c02cc11f>] down_write_mutex+0xdf/0x220 (28) [<c028e09d>] ip_local_deliver_finish+0xbd/0x1a0 (52) [<c01c80be>] up_write_mutex+0x2e/0x60 (12) [<c027e211>] nf_hook_slow+0xe1/0x130 (24) [<c028dfe0>] ip_local_deliver_finish+0x0/0x1a0 (28) [<c028da76>] ip_local_deliver+0x1f6/0x220 (32) [<c028dfe0>] ip_local_deliver_finish+0x0/0x1a0 (24) [<c028e2c9>] ip_rcv_finish+0x149/0x300 (24) [<c01c80be>] up_write_mutex+0x2e/0x60 (36) [<c027e211>] nf_hook_slow+0xe1/0x130 (24) [<c028e180>] ip_rcv_finish+0x0/0x300 (28) [<c028df00>] ip_rcv+0x460/0x540 (32) [<c028e180>] ip_rcv_finish+0x0/0x300 (24) [<c0114310>] mcount+0x14/0x18 (8) [<c0272d0d>] netif_receive_skb+0x12d/0x240 (28) [<c0270008>] __scm_send+0x78/0x1e0 (20) [<c027303f>] net_rx_action+0x7f/0x1a0 (4) [<c0114310>] mcount+0x14/0x18 (8) [<c0272ea8>] process_backlog+0x88/0x1a0 (20) [<c027303f>] net_rx_action+0x7f/0x1a0 (40) [<c0123887>] ___do_softirq+0x87/0xd0 (36) [<c0123958>] _do_softirq+0x8/0x30 (8) [<c0123d44>] ksoftirqd+0xb4/0x100 (4) [<c0123970>] _do_softirq+0x20/0x30 (28) [<c0123d44>] ksoftirqd+0xb4/0x100 (8) [<c013406a>] kthread+0xaa/0xb0 (24) [<c0123c90>] ksoftirqd+0x0/0x100 (20) [<c0133fc0>] kthread+0x0/0xb0 (12) [<c0103319>] kernel_thread_helper+0x5/0xc (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: down_write_mutex+0x214/0x220 [<c02cc254>] / (_mutex_lock+0x40/0x50 [<c0134ac0>]) .. entry 2: print_traces+0x1d/0x60 [<c013663d>] / (dump_stack+0x23/0x30 [<c01060b3>])
BUG: circular semaphore deadlock: firefox-bin/4792 is blocked on c0438ec0, deadlocking ksoftirqd/0/2
f18119bc 00200086 f1fbe810 c03c1ca0 f1810000 0000196c f1810000 f1fbe810
00000000 f18119a8 00000167 4344b736 00000023 f1fbe810 f1fbeaa4
f1810000
f1fbe810 00000000 f18119e0 c02cae1f 00000054 00000008 f18119e0
00200046
Call Trace:
[<c02cae1f>] schedule+0x2f/0xe0 (80)
[<c02cc1a0>] down_write_mutex+0x160/0x220 (36)
[<c02cc268>] down_read_mutex+0x8/0x30 (12)
[<c0272251>] dev_queue_xmit_nit+0x41/0x130 (40)
[<c01c80be>] up_write_mutex+0x2e/0x60 (12)
[<c0281a03>] qdisc_restart+0x223/0x250 (24)
[<c02727dd>] dev_queue_xmit+0x1ad/0x260 (12)
[<c0114310>] mcount+0x14/0x18 (8)
[<c02727ef>] dev_queue_xmit+0x1bf/0x260 (36)
[<c0278b2e>] neigh_resolve_output+0xfe/0x240 (32)
[<c029383e>] ip_finish_output2+0xbe/0x240 (56)
[<c01c80be>] up_write_mutex+0x2e/0x60 (12)
[<c027e211>] nf_hook_slow+0xe1/0x130 (24)
[<c0293780>] ip_finish_output2+0x0/0x240 (28)
[<c029104b>] ip_finish_output+0x26b/0x270 (32)
[<c0293780>] ip_finish_output2+0x0/0x240 (24)
[<c029376a>] dst_output+0x1a/0x30 (32)
[<c027e211>] nf_hook_slow+0xe1/0x130 (12)
[<c0293750>] dst_output+0x0/0x30 (28)
[<c029170a>] ip_queue_xmit+0x45a/0x570 (32)
[<c0293750>] dst_output+0x0/0x30 (24)
[<c02cc11f>] down_write_mutex+0xdf/0x220 (24)
[<c0135ef0>] sub_preempt_count+0x60/0xd0 (4)
[<c01c7f1e>] __up_write+0x10e/0x220 (12)
[<c0135ef0>] sub_preempt_count+0x60/0xd0 (4)
[<c0135958>] check_preempt_timing+0x58/0x2f0 (8)
[<c0135ef0>] sub_preempt_count+0x60/0xd0 (4)
[<c01c7f1e>] __up_write+0x10e/0x220 (4)
[<c013514d>] __mcount+0x1d/0x20 (32)
[<c01c775e>] rwsem_owner_del+0xe/0xf0 (4)
[<c013514d>] __mcount+0x1d/0x20 (36)
[<c02a8d1e>] tcp_v4_send_check+0xe/0xf0 (4)
[<c02a2819>] tcp_transmit_skb+0x439/0x880 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c02a8d5f>] tcp_v4_send_check+0x4f/0xf0 (20)
[<c02a28c2>] tcp_transmit_skb+0x4e2/0x880 (32)
[<c01c9f52>] memcpy+0x12/0x40 (36)
[<c02a37f4>] tcp_write_xmit+0x154/0x2d0 (44)
[<c0296eea>] tcp_sendmsg+0x50a/0x1130 (12)
[<c0114310>] mcount+0x14/0x18 (8)
[<c0296ebe>] tcp_sendmsg+0x4de/0x1130 (32)
[<c0268254>] sock_sendmsg+0xc4/0xe0 (84)
[<c02b9af0>] inet_sendmsg+0x50/0x60 (28)
[<c0268254>] sock_sendmsg+0xc4/0xe0 (28)
[<c0135958>] check_preempt_timing+0x58/0x2f0 (24)
[<c0135ef0>] sub_preempt_count+0x60/0xd0 (4)
[<c013514d>] __mcount+0x1d/0x20 (36)
[<c01c775e>] rwsem_owner_del+0xe/0xf0 (4)
[<c015ff59>] fget+0x59/0x70 (72)
[<c01c80be>] up_write_mutex+0x2e/0x60 (28)
[<c0134620>] autoremove_wake_function+0x0/0x60 (24)
[<c0267f8f>] sockfd_lookup+0x1f/0x80 (28)
[<c0114310>] mcount+0x14/0x18 (4)
[<c026990d>] sys_sendto+0xed/0x110 (20)
[<c01c80be>] up_write_mutex+0x2e/0x60 (72)
[<c0142cf2>] free_pages_bulk+0x1d2/0x2e0 (24)
[<c013514d>] __mcount+0x1d/0x20 (72)
[<c026993b>] sys_send+0xb/0x40 (4)
[<c026a1c3>] sys_socketcall+0x133/0x240 (4)
[<c0114310>] mcount+0x14/0x18 (8)
[<c026996b>] sys_send+0x3b/0x40 (20)
[<c026a1c3>] sys_socketcall+0x133/0x240 (32)
[<c010527b>] syscall_call+0x7/0xb (68)preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __schedule+0x4e/0x6b0 [<c02ca78e>] / (schedule+0x2f/0xe0 [<c02cae1f>]) .. entry 2: __schedule+0xdd/0x6b0 [<c02ca81d>] / (schedule+0x2f/0xe0 [<c02cae1f>])
Michal
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-V0.5
Quoted 4 lines · Michal Schmidt
Quoted 2 lines
i've uploaded -V0.4.1 with a fix that could fix this networking deadlock. Does it work any better?
Unfortunately, no. It's only slightly different:
ok. I've uploaded -RT-V0.5 which includes a different approach to solving these netfilter related deadlocks. It can be downloaded from the usual place:
http://redhat.com/~mingo/realtime-preempt/
there's a fair chance that you will still see a deadlock, so in -V0.5 i've improved the deadlock-detection infrastructure with a number of new debugging features:
- track the code (by EIP) that acquired the semaphore
- track the place (by file:line) where the locking object got defined or initialized. Print this symbolic info out when printing locking objects - this is easier to read than the hexa address alone.
- added a global registry for all mutexes, rwsems, spinlocks and rwlocks, which registry is printed during the deadlock-printout. (including the current holder of the lock and the place where the lock was acquired.)
- print out all the locks held by the task(s) involved in any deadlock scenario.
- print out a summary of all tasks in the system, whether they are blocked on a locking object, and if they are, on which lock.
- the 'all locks' and 'all tasks' printout can also be triggered via sysrq-d or 'echo d > /proc/sysrq-trigger'.
- turn off deadlock tracing when the first deadlock has been detected. This is to get a more robust printout of a stable locking state and usually it's the first deadlock that matters so there's no point in printing out more.
- cleaned up formatting of various existing printouts like the preemption backtrace and messages from the deadlock detector.
all this info will greatly simplify the tracking down of deadlocks. There is no additional configuration needed to active the above features, other than to enable CONFIG_RWSEM_DEADLOCK_DETECT. Below i've attached a sample printout.
Ingo
down()-ing unlocked semaphore. should succeed. good. now down()ing locked semaphore. should deadlock.
===============================================
[ BUG: semaphore recursion deadlock detected! ]
-----------------------------------------------
already locked: [c065eee0] {r:0,a:-1,kernel/time.c:100}
.. held by: gettimeofday/ 3008 [f1b374c0]
... acquired at: sys_gettimeofday+0xfa/0x3f8
-{backtrace}--------------------------------->
[<c0241d47>] __rwsem_deadlock+0xf9/0x188 (12) [<c011f1eb>] sys_gettimeofday+0xfa/0x3f8 (8) [<c058f68e>] _down_write+0xe/0x325 (16) [<c011f201>] sys_gettimeofday+0x110/0x3f8 (4) [<c011f201>] sys_gettimeofday+0x110/0x3f8 (20) [<c058f7e0>] _down_write+0x160/0x325 (8) [<c0130903>] __mcount+0x1d/0x1f (16) [<c0242561>] down+0x8/0x11 (4) [<c011f201>] sys_gettimeofday+0x110/0x3f8 (4) [<c011f201>] sys_gettimeofday+0x110/0x3f8 (36) [<c014d641>] sys_munmap+0x42/0x4b (12) [<c010601d>] sysenter_past_esp+0x52/0x71 (28) ---------------------------
| preempt count: 00000002 ]
| 2-level deep critical section nesting:
----------------------------------------
.. [<c058f8bd>] .... _down_write+0x23d/0x325
.....[<c011f201>] .. ( <= sys_gettimeofday+0x110/0x3f8)
.. [<c0131be1>] .... print_traces+0x1b/0x5a
.....[<c0106608>] .. ( <= dump_stack+0x23/0x25)
------------------------------
| showing all locks held by: | (gettimeofday/3008 [f1b374c0]):
------------------------------
#001: [c065eee0] {r:0,a:-1,kernel/time.c:100}
... acquired at: sys_gettimeofday+0xfa/0x3f8
showing all tasks:
s init/ 1 [c2a77080] (not blocked) s ksoftirqd/0/ 2 [c2a76850] (not blocked) s desched/0/ 3 [c2a76020] (not blocked) s events/0/ 4 [c2a950c0] (not blocked) s khelper/ 5 [c2a94890] (not blocked) s kthread/ 10 [c2a94060] (not blocked) s kacpid/ 18 [c2ab1100] (not blocked) s IRQ 9/ 19 [c2ab08d0] (not blocked) s kblockd/0/ 94 [c2ab00a0] (not blocked) s khubd/ 107 [f7cf1140] (not blocked) s pdflush/ 330 [f7cf0910] (not blocked) s pdflush/ 331 [f7cf00e0] (not blocked) s aio/0/ 333 [f7d56950] (not blocked) s kswapd0/ 332 [f7d57180] (not blocked) s IRQ 8/ 918 [f7d56120] (not blocked) s IRQ 12/ 931 [f7eca990] (not blocked) s kseriod/ 925 [f7ecb1c0] (not blocked) s IRQ 6/ 946 [f7eca160] (not blocked) s IRQ 5/ 978 [f7f01200] (not blocked) s IRQ 14/ 997 [f7f009d0] (not blocked) s IRQ 15/ 999 [f7f001a0] (not blocked)
s khpsbpkt/ 1013 [f7f51240] (not blocked)
s IRQ 11/ 1024 [f7f50a10] (not blocked)
s knodemgrd_0/ 1025 [f7f501e0] (not blocked)
s IRQ 1/ 1131 [f7f91280] (not blocked)
s IRQ 10/ 1169 [f7f90a50] (not blocked)
D kjournald/ 1180 [f7f90220] (not blocked)
s udevd/ 1242 [f5ec76c0] (not blocked) s IRQ 4/ 1615 [f610c2e0] (not blocked) s IRQ 3/ 1616 [f59f0a50] (not blocked)
D syslogd/ 2503 [f5d6ad90] (not blocked)
s klogd/ 2507 [f610d340] (not blocked)
s portmap/ 2526 [f5ae0120] (not blocked)
s mDNSResponder/ 2559 [f63aa420] (not blocked)
s mDNSResponder/ 2560 [f2bc6b90] (not blocked)
s acpid/ 2580 [f2af9340] (not blocked)
s sshd/ 2590 [f2af82e0] (not blocked)
s distccd/ 2619 [f610cb10] (not blocked)
s distccd/ 2620 [f59f0220] (not blocked)
s gpm/ 2630 [f2b6cb50] (not blocked)
s crond/ 2640 [f2af8b10] (not blocked)
s sshd/ 2653 [f5a59100] (not blocked)
s distccd/ 2656 [f5ae0950] (not blocked)
s sshd/ 2667 [f5a580a0] (not blocked)
s xfs/ 2670 [f5ec6660] (not blocked)
s bash/ 2672 [f2bc73c0] (not blocked)
s anacron/ 2704 [f5ec6e90] (not blocked)
s distccd/ 2706 [f2b6c320] (not blocked)
s atd/ 2714 [f59f1280] (not blocked)
s dbus-daemon-1/ 2724 [f2bc6360] (not blocked)
s cups-config-dae/ 2734 [f63aac50] (not blocked)
s agetty/ 2748 [f5a588d0] (not blocked)
s mingetty/ 2749 [f5d6b5c0] (not blocked) s mingetty/ 2750 [f63ab480] (not blocked) s mingetty/ 2751 [f1a73400] (not blocked) s mingetty/ 2752 [f1a72bd0] (not blocked) s mingetty/ 2753 [f2b6d380] (not blocked) s mingetty/ 2754 [f1a723a0] (not blocked) s hotplug/ 2839 [f1b36460] (not blocked) s hotplug/ 2856 [f14e6d90] (not blocked) s hotplug/ 2857 [f155d600] (not blocked) s 10-udev.hotplug/ 2916 [f1b36c90] (not blocked) s 10-udev.hotplug/ 2917 [f14e75c0] (not blocked) s 10-udev.hotplug/ 2918 [f14e6560] (not blocked) s udev/ 2959 [f1629680] (not blocked) s udev/ 2965 [f1702ed0] (not blocked) s udev/ 2981 [f17d5780] (not blocked) s udev/ 2987 [f11240a0] (not blocked)
D gettimeofday/ 3008 [f1b374c0] (not blocked)
---------------------------
| showing all locks held: |
---------------------------
#001: [c07f809c] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#002: [c07f7bb4] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#003: [c07f7e0c] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#004: [c07f8890] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#005: [c07f83a8] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#006: [c07f8600] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#007: [c07f9084] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#008: [c07f8b9c] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#009: [c07f8df4] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#010: [c07f9878] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#011: [c07f9390] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#012: [c07f95e8] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#013: [c07fa06c] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#014: [c07f9b84] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#015: [c07f9ddc] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#016: [c07fa860] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#017: [c07fa378] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#018: [c07fa5d0] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#019: [c07fb054] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#020: [c07fab6c] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#021: [c07fadc4] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#022: [c07fb848] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#023: [c07fb360] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#024: [c07fb5b8] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#025: [c07fc03c] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#026: [c07fbb54] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#027: [c07fbdac] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#028: [c07fc830] {r:0,a:-1,drivers/ide/ide.c:228}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x8b/0x15c
#029: [c07fc348] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#030: [c07fc5a0] {r:0,a:-1,drivers/ide/ide.c:252}
.. held by: init/ 1 [c2a77080]
... acquired at: init_hwif_data+0x14b/0x15c
#031: [c06a8f40] {r:0,a:-1,drivers/ieee1394/nodemgr.c:111}
.. held by: knodemgrd_0/ 1025 [f7f501e0]
... acquired at: nodemgr_host_thread+0x89/0x186#032: [f2b7cfcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2749 [f5d6b5c0]
... acquired at: read_chan+0x471/0x7a2
#033: [f1ba4fcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2751 [f1a73400]
... acquired at: read_chan+0x471/0x7a2
#034: [f157efcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2754 [f1a723a0]
... acquired at: read_chan+0x471/0x7a2
#035: [f1722fcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2752 [f1a72bd0]
... acquired at: read_chan+0x471/0x7a2
#036: [f10dafcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2753 [f2b6d380]
... acquired at: read_chan+0x471/0x7a2
#037: [f150efcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: mingetty/ 2750 [f63ab480]
... acquired at: read_chan+0x471/0x7a2
#038: [f1a92fcc] {r:0,a:-1,drivers/char/tty_io.c:2641}
.. held by: agetty/ 2748 [f5a588d0]
... acquired at: read_chan+0x471/0x7a2
#039: [f2a11ba4] {r:0,a:-1,fs/inode.c:198}
.. held by: syslogd/ 2503 [f5d6ad90]
... acquired at: sys_fsync+0x56/0xb7
#040: [c065eee0] {r:0,a:-1,kernel/time.c:100}
.. held by: gettimeofday/ 3008 [f1b374c0]
... acquired at: sys_gettimeofday+0xfa/0x3f8
#041: [c0748a00] {r:0,a:-1,kernel/fork.c:64}
.. held by: gettimeofday/ 3008 [f1b374c0]
... acquired at: show_all_locks+0x30/0x148
=============================================
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5
On Thu, Oct 28, 2004 at 01:57:19PM +0200, Ingo Molnar wrote: >
Quoted 10 lines · Michal Schmidt
Quoted 5 lines
Quoted 3 lines
i've uploaded -V0.4.1 with a fix that could fix this networking deadlock. Does it work any better?
Unfortunately, no. It's only slightly different:
ok. I've uploaded -RT-V0.5 which includes a different approach to solving these netfilter related deadlocks. It can be downloaded from the usual place:
This is in -V5.14
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5
Quoted 6 lines · Bill Huey
On Thu, Oct 28, 2004 at 01:57:19PM +0200, Ingo Molnar wrote: >
Quoted 5 lines · Michal Schmidt
Quoted 4 lines
Quoted 3 lines
i've uploaded -V0.4.1 with a fix that could fix this networking deadlock. Does it work any better?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Unfortunately, no. It's only slightly different:
ok. I've uploaded -RT-V0.5 which includes a different approach to solving these netfilter related deadlocks. It can be downloaded from the usual place:
This is in -V5.14
thanks - excellent trace - i hopefully fixed this in -V0.5.16, freshly uploaded. This also made me notice an upstream buglet.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
In reply to Bill Huey (hui)Quoted 1 line · Bill Huey
This is in -V5.14
[nasty networking crash trace]
Didn't fix it all...
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
Quoted 6 lines · Bill Huey
Quoted 1 line · Bill Huey
This is in -V5.14
[nasty networking crash trace]
Didn't fix it all...
thanks for the trace - i've uploaded -V0.6.6 to the usual place:
http://redhat.com/~mingo/realtime-preempt/
which attempts to fix this particular deadlock.
other changes in -V0.6.6:
- increased debuggability by turning deadlock detection on for ordinary Linux semaphores and rwsems. I suspect that some of the recently reported hangs were semaphore related deadlocks. Those who see hangs please re-try with -V0.6.6 and deadlock detection turned on, does it produce a usable deadlock printout?
- show_all_locks() build bug fix from Daniel Walker.
- another debuggability feature: deadlock tracing stops after the first dump and the kernel tries to continue (we tried to do this before but it wasnt complete). Sometimes the deadlock is in fact some 'interesting' use of Linux semaphores and the system will not really deadlock. The dump we can use to fix up that interesting use of semaphores, and the system wont crash.
- crash fix: the dump_own_stack() code was buggered - removed it. The stock kernel does pretty good stackdumping by itself, all that was needed to activate it was to set CONFIG_FRAME_POINTERS.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
Quoted 2 lines · Ingo Molnar
Quoted 1 line · Bill Huey
[nasty networking crash trace]
...
Quoted 1 line
which attempts to fix this particular deadlock.
getting closer...
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at: __schedule+0x3ac/0x850
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
Quoted 4 lines · Bill Huey
Quoted 2 lines · Ingo Molnar
Quoted 1 line · Bill Huey
[nasty networking crash trace]
...
Quoted 8 lines
Quoted 1 line
which attempts to fix this particular deadlock.
getting closer...
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at:__schedule+0x3ac/0x850
hm. Something called do_exit() with the BKL held which is a no-no. Do you have a stacktrace, is this sys_exit() or some other code calling do_exit()?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
Quoted 8 lines · Ingo Molnar
Quoted 4 lines
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at:__schedule+0x3ac/0x850hm. Something called
do_exit()with the BKL held which is a no-no. Do you have a stacktrace, is thissys_exit()or some other code callingdo_exit()?
i've uploaded -V0.6.7 with a bug fixed in the new priority code (affecting RT tasks and probably causing some of the deadlocks reported while running Jackd or other RT apps). I also fixed another networking deadlock.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
Am Dienstag 02 November 2004 13:02 schrieb Ingo Molnar:
Quoted 6 lines · Ingo Molnar
Quoted 5 lines
Quoted 4 lines
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at:__schedule+0x3ac/0x850
Quoted 9 lines
Quoted 3 lines
hm. Something called
do_exit()with the BKL held which is a no-no. Do you have a stacktrace, is thissys_exit()or some other code callingdo_exit()?i've uploaded -V0.6.7 with a bug fixed in the new priority code (affecting RT tasks and probably causing some of the deadlocks reported while running Jackd or other RT apps). I also fixed another networking deadlock.
Hi
This showed via netconsole when shutting down V0.6.7 (maybe already fixed in V0.6.8?):
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
some noise while in runlevel 5, just for context:
EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended
loop: loaded (max 8 devices)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Here or...
atkbd.c: Spurious ACK on isa0060/serio0. Some program, like XFree86, might be trying access hardware directly.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
...here the shutdown takes over
usbcore: deregistering driver snd-usb-usx2y
ALSA /home/ka/kernel/2.6/linux-2.6.9-mm1-RT-V0.6.7/sound/usb/usbmidi.c:154:
urb status -108
ALSA /home/ka/kernel/2.6/linux-2.6.9-mm1-RT-V0.6.7/sound/usb/usbmidi.c:139:usb_submit_urb: -90
VIA 82xx Audio 0000:00:07.5: Device was removed without properly calling pci_disable_device(). This may need fixing.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
(I think there was nothing mounted via nfs, so) this looks odd to me:
nfsd:2468 BUG: lock held at task exit time!
[c032d2e4] {r:0,a:-1,kernel_sem.lock}
.. held by: nfsd/ 2468 [ce1a3750, 116]
... acquired at: __sched_text_start+0x36b/0x6d0
nfsd/2468: BUG in __up_write
at /home/ka/kernel/2.6/linux-2.6.9-mm1-RT-V0.6.7/lib/rwsem-generic.c:1058 BUG: sleeping function called from invalid context nfsd(2468) at /home/ka/kernel/2.6/linux-2.6.9-mm1-RT-V0.6.7/kernel/mutex.c:30 in_atomic():1 [00000003], irqs_disabled():0 [<c0107923>] dump_stack+0x23/0x30 (20) [<c011a5aa>] __might_sleep+0xca/0xe0 (36) [<c0134b89>] __mutex_lock+0x39/0x60 (24) [<c0134bcd>] _mutex_lock+0x1d/0x30 (16) [<c01494d5>] kmem_cache_alloc+0x45/0x110 (32) [<c0277388>] alloc_skb+0x28/0xf0 (32) [<c02894e6>] find_skb+0x36/0xb0 (24) [<c0289671>] netpoll_send_udp+0x41/0x2b0 (48) [<d08d106a>] write_msg+0x6a/0x120 [netconsole] (52) [<c011de6e>] __call_console_drivers+0x6e/0x70 (32) [<c011dfa6>] call_console_drivers+0xb6/0x160 (40) [<c011e3c1>] release_console_sem+0x71/0x110 (36) [<c011e260>] vprintk+0x110/0x180 (36) [<c011e13d>] printk+0x1d/0x30 (16) [<c01bb9d6>] __up_write+0x186/0x540 (68) [<c01bc798>] up+0x78/0xd0 (36) [<c02dcc46>] __sched_text_start+0x606/0x6d0 (84) [<c0120852>] do_exit+0x2d2/0x560 (40) [<c01381a1>] __module_put_and_exit+0x51/0x70 (16) [<d0929574>] nfsd+0x2d4/0x3b0 [nfsd] (72) [<c0105325>] kernel_thread_helper+0x5/0x10 (836747284) ---------------------------
| preempt count: 00000004 ]
| 4-level deep critical section nesting:
----------------------------------------
.. [<c02dc68e>] .... __sched_text_start+0x4e/0x6d0
.....[<c0120852>] .. ( <= do_exit+0x2d2/0x560)
.. [<c01bc743>] .... up+0x23/0xd0
.....[<c02dcc46>] .. ( <= __sched_text_start+0x606/0x6d0)
.. [<c01bbd04>] .... __up_write+0x4b4/0x540
.....[<c01bc798>] .. ( <= up+0x78/0xd0)
.. [<c01368ad>] .... print_traces+0x1d/0x60
.....[<c0107923>] .. ( <= dump_stack+0x23/0x30)
[<c0107923>] dump_stack+0x23/0x30 (20) [<c01bb9db>] __up_write+0x18b/0x540 (68) [<c01bc798>] up+0x78/0xd0 (36) [<c02dcc46>] __sched_text_start+0x606/0x6d0 (84) [<c0120852>] do_exit+0x2d2/0x560 (40) [<c01381a1>] __module_put_and_exit+0x51/0x70 (16) [<d0929574>] nfsd+0x2d4/0x3b0 [nfsd] (72) [<c0105325>] kernel_thread_helper+0x5/0x10 (836747284) ---------------------------
| preempt count: 00000004 ]
| 4-level deep critical section nesting:
----------------------------------------
.. [<c02dc68e>] .... __sched_text_start+0x4e/0x6d0
.....[<c0120852>] .. ( <= do_exit+0x2d2/0x560)
.. [<c01bc743>] .... up+0x23/0xd0
.....[<c02dcc46>] .. ( <= __sched_text_start+0x606/0x6d0)
.. [<c01bbd04>] .... __up_write+0x4b4/0x540
.....[<c01bc798>] .. ( <= up+0x78/0xd0)
.. [<c01368ad>] .... print_traces+0x1d/0x60
.....[<c0107923>] .. ( <= dump_stack+0x23/0x30)
nfsd: last server has exited
nfsd: unexporting all filesystems
<<<<<<
Best,
Karsten
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
In reply to Ingo MolnarQuoted 10 lines · Ingo Molnar
Quoted 6 lines
getting closer...
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at:__schedule+0x3ac/0x850hm. Something called
do_exit()with the BKL held which is a no-no. Do you have a stacktrace, is thissys_exit()or some other code callingdo_exit()?
ok, Thomas reported a similar one too, which comes from the NFS code. Does the patch below fix the warning?
Ingo
kernel/module.c renamed from kernel/module.c.orig +6 -0
@@ -35,6 +35,7 @@#include <linux/notifier.h> #include <linux/stop_machine.h> #include <linux/device.h> +#include <linux/smp_lock.h> #include <asm/uaccess.h> #include <asm/semaphore.h> #include <asm/cacheflush.h>
@@ -97,6 +98,11 @@ static inline int strong_try_module_get(void __module_put_and_exit (struct module *mod,long code) {module_put (mod); +/* +* Release the kernel lock if held: +*/ +while (current->lock_depth !=-1 ) +unlock_kernel ();do_exit (code); }EXPORT_SYMBOL (__module_put_and_exit);
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5 (networking problems)
In reply to Ingo MolnarQuoted 11 lines · Ingo Molnar
Quoted 6 lines · Bill Huey
getting closer...
http:590 BUG: lock held at task exit time!
[c03f9e84] {r:0,a:-1,kernel_sem.lock}
.. held by: http/ 590 [dc0508a0, 121]
... acquired at:__schedule+0x3ac/0x850hm. Something called
do_exit()with the BKL held which is a no-no. Do you have a stacktrace, is thissys_exit()or some other code callingdo_exit()?
Attached:
bill
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
i have released the -V0.3 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release, but still experimental.
OK. Currently with RT-V0.3.2.
So it seems that the jackd -R is no more an issue here.
I've tested several times now, and can even start more than 7 (yes, seven!) fluidsynth instances, with respective soundfonts loaded, all running without problems, besides the cpu cost topping to 80% (user) and memory is near the swappiness edge, which is usually a normal behavior, or so I believe.
Remember that having just 2 (two) fluidsynth instances was quite enough for hosing the system in no time, on RT-V0.2.
However (oh no!:) those jackd -R xruns are still frequent, much frequent than RT-U3, which is my stable RT kernel atm.
OK. I'll take this time for some questions:
What's the rationale that you guys are using on tunning the IRQ threading policies and priorities?
What's the best approach to take, regarding the jackd, soundcard, usb, keyboard, mouse, whatever IRQ handlers?
I've heard somewhat contraditory opinions elsewhere, but would like to know what's in the road ahead ;)
As a side note, while I was testing this snd-usb-usx2y ALSA development module for my Tascam US-224 USB audio/midi control interface, I've found that the best and stable results are achieved by leveraging the ohci_hcd IRQ handler (normally IRQ 10) to a higher priority than jackd's.
I've been doing just that with e.g. chrt -p -f 60 pidof "IRQ 10". Failing to do so just makes jackd (or it's alsa backend) missing some deadline and drop out very easily. This has been my conclusion while testing with RT-U3. Don't know what is reserved by RT-V0.3.2, yet. I'll do that later.
Take care.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.3
Quoted 3 lines · Rui Nuno Capela
OK. Currently with RT-V0.3.2.
So it seems that the jackd -R is no more an issue here.
great.
Quoted 2 lines
However (oh no!:) those jackd -R xruns are still frequent, much frequent than RT-U3, which is my stable RT kernel atm.
-V0.4.1 could help with this problem. There were a number of places where the PREEMPT_REALTIME kernel missed reschedules so it could easily happen that jackd would sit in the runqueue waiting to be executed and the kernel got quickly out of a critical section but then the kernel 'forgot' to reschedule for many milliseconds!
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 9 lines · Ingo Molnar
Quoted 3 lines · Rui Nuno Capela
OK. Currently with RT-V0.3.2.
So it seems that the jackd -R is no more an issue here.
great.
Quoted 9 lines
Quoted 2 lines
However (oh no!:) those jackd -R xruns are still frequent, much frequent than RT-U3, which is my stable RT kernel atm.
-V0.4.1 could help with this problem. There were a number of places where the
PREEMPT_REALTIMEkernel missed reschedules so it could easily happen that jackd would sit in the runqueue waiting to be executed and the kernel got quickly out of a critical section but then the kernel 'forgot' to reschedule for many milliseconds!
On RT-V0.4.1, xruns seems slighly reduced, but plenty enough for my taste.
Running jackd -R with 6 fluidsynth instances gives me 0 (zero) xruns on RT-U3, but more than 20 (twenty) on RT-V0.4.1, under a 5 minute time frame. It was 30 (thirty something) on RT-V0.4, but overall "feel" is about the same.
Cheers.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 2 lines · Rui Nuno Capela
On RT-V0.4.1, xruns seems slighly reduced, but plenty enough for my taste.
Have you tried making ksoftirqd SCHED_OTHER? This drastically reduced xruns on my system with an earlier version.
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 12 lines
Lee Revell
Quoted 3 lines · Rui Nuno Capela
On RT-V0.4.1, xruns seems slighly reduced, but plenty enough for my taste.
Have you tried making ksoftirqd
SCHED_OTHER? This drastically reduced xruns on my system with an earlier version.Lee
Hmm... ksoftirqd/0 (or also ksoftirqd/1 on 2cpu SMP) are already SCHED_OTHER by default, at least on both of my boxes that are running RT-V0.4.1 now.
Should I try the other way around? Lets see... 'chrt -p -f 90 pidof ksoftirwd/0',... yes, apparentely the xrun rate seems to decrease into half, but IMHO not conclusive enough, thought.
CU
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 6 lines · --- Rui Nuno Capela
Should I try the other way around? Lets see... 'chrt -p -f 90 `pidof
ksoftirwd/0`',... yes, apparentely the xrun rate seems to decrease into
half, but IMHO not conclusive enough, thought.
'into half' makes me wonder:
did you also 'chrt -p -f 90 pidof ksoftirwd/1'? I guess you meant that with '...'. Just in case :-)
Best,
Karsten
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 10 lines · karsten wiese
Quoted 5 lines · Rui Nuno Capela
Should I try the other way around? Lets see... 'chrt -p -f 90
pidof ksoftirwd/0',... yes, apparentely the xrun rate seems to decrease into half, but IMHO not conclusive enough, thought.'into half' makes me wonder:
did you also 'chrt -p -f 90pidof ksoftirwd/1'? I guess you meant that with '...'. Just in case :-)
Wonder no more. All my statistical-wise tests were carried on a UP box (my laptop), so there's no "ksoftirqd/1" in there, just a single "ksoftirqd/0".
Speaking of which, I was not taking tests very seriously on my other SMP/HT box, just because I don't want to rant about it anymore :) Only recently VP and RT kernels were barely able to boot there, where even plain vanilla 2.6.9 seems to be snappier and with far fewer xruns than V0.4.1 or even U3 (either RT or not).
OTOH, on my laptop (P4/UP) I can testify as truth that, at least for RT-U3, the improvement is real: I don't have a record of such a top performer, when regarding the zero-xrun, low-latency audio setup potential. When even compared, it just outperforms by far that old 2.4+preempt+low-latency myth ;)
Unfortunately, this is not what I see on my P4/SMP/HT desktop box. I cannot tell a lie ;)
Bye now.
Signature · 6 lines
rncbc aka Rui Nuno Capela [email protected] P.S. Karsten, my US-224 is working real nice on my laptop now (provided I'm with RT-U3 :) I'm real thankful for all of your work on snd-usb-usx2y. Cheers.
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Rui Nuno CapelaQuoted 6 lines · --- Rui Nuno Capela
Should I try the other way around? Lets see... 'chrt -p -f 90 `pidof
ksoftirwd/0`',... yes, apparentely the xrun rate seems to decrease into
half, but IMHO not conclusive enough, thought.
'into half' makes me wonder:
did you also 'chrt -p -f 90 pidof ksoftirwd/1'?
(I guess you meant that with '...') And isn't it
'ksoftirqd'? Just in case :-)
Best,
Karsten
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Rui Nuno CapelaQuoted 7 lines · Rui Nuno Capela
On RT-V0.4.1, xruns seems slighly reduced, but plenty enough for my taste.
Running jackd -R with 6 fluidsynth instances gives me 0 (zero) xruns on RT-U3, but more than 20 (twenty) on RT-V0.4.1, under a 5 minute time frame. It was 30 (thirty something) on RT-V0.4, but overall "feel" is about the same.
does the wakeup tracer show any high latency?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Rui Nuno CapelaQuoted 7 lines · Rui Nuno Capela
On RT-V0.4.1, xruns seems slighly reduced, but plenty enough for my taste.
Running jackd -R with 6 fluidsynth instances gives me 0 (zero) xruns on RT-U3, but more than 20 (twenty) on RT-V0.4.1, under a 5 minute time frame. It was 30 (thirty something) on RT-V0.4, but overall "feel" is about the same.
ok, i've uploaded RT-V0.4.2 which has more of the same: it fixes other missed preemption checks. Does it make any difference to the xruns on your UP box?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 3 lines · Ingo Molnar
ok, i've uploaded RT-V0.4.2 which has more of the same: it fixes other missed preemption checks. Does it make any difference to the xruns on your UP box?
uploaded RT-V0.4.3 - there was a thinko in the latency tracer that caused early boot failures.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 8 lines · Ingo Molnar
Quoted 4 lines
ok, i've uploaded RT-V0.4.2 which has more of the same: it fixes other missed preemption checks. Does it make any difference to the xruns on your UP box?
uploaded RT-V0.4.3 - there was a thinko in the latency tracer that caused early boot failures.
Yes, the xrun rate has decreased, slightly. RT-V0.4.3 is now ranking under 10 per 5 min (~2/min), with jackd -R -r44100 -p128 -n2, fluidsynth x 6.
Better still, but not to par as RT-U3, under the very same conditions.
Cya.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 8 lines · Rui Nuno Capela
Quoted 7 lines
Quoted 3 lines
ok, i've uploaded RT-V0.4.2 which has more of the same: it fixes other missed preemption checks. Does it make any difference to the xruns on your UP box?
uploaded RT-V0.4.3 - there was a thinko in the latency tracer that caused early boot failures.
Quoted 5 lines
Yes, the xrun rate has decreased, slightly. RT-V0.4.3 is now ranking under 10 per 5 min (~2/min), with jackd -R -r44100 -p128 -n2, fluidsynth x 6.
Better still, but not to par as RT-U3, under the very same conditions.
how much idle time do you have in the RT-U3 and in the RT-V0.4 tests, compared? If it's close to 100% then make sure you have the following debug options disabled:
# CONFIG_DEBUG_SLAB is not set
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_PREEMPT_TIMING is not set
# CONFIG_RWSEM_DEADLOCK_DETECT is not set
# CONFIG_FRAME_POINTER is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
RWSEM_DEADLOCK, DEBUG_PREEMPT, PREEMPT_TIMING and LATENCY_TRACE are especially expensive, so depending on the amount of kernel work done, it can make or break the total balance of CPU time used and you could get xruns not only due to kernel latencies but purely due to having not enough CPU time to generate audio output. (fluidsynth is a software audio generator?)
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 31 lines · Ingo Molnar
Quoted 8 lines · Rui Nuno Capela
Quoted 7 lines
Quoted 3 lines
ok, i've uploaded RT-V0.4.2 which has more of the same: it fixes other missed preemption checks. Does it make any difference to the xruns on your UP box?
uploaded RT-V0.4.3 - there was a thinko in the latency tracer that caused early boot failures.
Quoted 5 lines
Yes, the xrun rate has decreased, slightly. RT-V0.4.3 is now ranking under 10 per 5 min (~2/min), with jackd -R -r44100 -p128 -n2, fluidsynth x 6.
Better still, but not to par as RT-U3, under the very same conditions.
how much idle time do you have in the RT-U3 and in the RT-V0.4 tests, compared? If it's close to 100% then make sure you have the following debug options disabled:
#
CONFIG_DEBUG_SLABis not set
#CONFIG_DEBUG_PREEMPTis not set
#CONFIG_DEBUG_SPINLOCK_SLEEPis not set
#CONFIG_PREEMPT_TIMINGis not set
#CONFIG_RWSEM_DEADLOCK_DETECTis not set
#CONFIG_FRAME_POINTERis not set
#CONFIG_DEBUG_STACKOVERFLOWis not set
#CONFIG_DEBUG_STACK_USAGEis not set
#CONFIG_DEBUG_PAGEALLOCis not set
Quoted 7 lines
RWSEM_DEADLOCK,DEBUG_PREEMPT,PREEMPT_TIMINGandLATENCY_TRACEare especially expensive, so depending on the amount of kernel work done, it can make or break the total balance of CPU time used and you could get xruns not only due to kernel latencies but purely due to having not enough CPU time to generate audio output. (fluidsynth is a software audio generator?)
As far as nmeter can tell, this a rough cpu usage pattern between RT-U3 and RT-V0.4.3, during my jackd + 6*fluidsynth "benchmark" tests:
cpu usage RT-U3.0 RT-V0.4.3
---------------------------- ---------- ---------
system (kernel) <10% 10%
user 30% 60%
---------------------------- ---------- ---------
total <40% 70%
The following table compares the state between my RT-U3 and RT-V0.4.3 configurations, regarding only the mentioned options:
option RT-U3.0 RT-V0.4.3
---------------------------- ---------- ---------
CONFIG_DEBUG_SLAB n n CONFIG_DEBUG_PREEMPT y y CONFIG_DEBUG_SPINLOCK_SLEEP n - CONFIG_PREEMPT_TIMING n n CONFIG_RWSEM_DEADLOCK_DETECT - y CONFIG_FRAME_POINTER y y CONFIG_DEBUG_STACKOVERFLOW y y CONFIG_DEBUG_STACK_USAGE n n CONFIG_DEBUG_PAGEALLOC n n
(dash "-" means that the option is not available in the config).
As you can see, it can only be CONFIG_RWSEM_DEADLOCK_DETECT, being new in RT-V0.4.3, that is probably affecting on RT-V0.4.3. I'll try to rebuild and test all over without it, and see if it gets any better.
BBL
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 15 lines · Rui Nuno Capela
The following table compares the state between my RT-U3 and RT-V0.4.3 configurations, regarding only the mentioned options:
option RT-U3.0 RT-V0.4.3
---------------------------- ---------- ---------CONFIG_DEBUG_SLAB n n CONFIG_DEBUG_PREEMPT y y CONFIG_DEBUG_SPINLOCK_SLEEP n - CONFIG_PREEMPT_TIMING n n CONFIG_RWSEM_DEADLOCK_DETECT - y CONFIG_FRAME_POINTER y y CONFIG_DEBUG_STACKOVERFLOW y y CONFIG_DEBUG_STACK_USAGE n n CONFIG_DEBUG_PAGEALLOC n n
Quoted 5 lines
(dash "-" means that the option is not available in the config).
As you can see, it can only be
CONFIG_RWSEM_DEADLOCK_DETECT, being new in RT-V0.4.3, that is probably affecting on RT-V0.4.3. I'll try to rebuild and test all over without it, and see if it gets any better.
note that DEBUG_PREEMPT got more expensive in the -V kernels. I'd suggest to disable all the 'y' ones in both the -U and -V kernel and compare them then.
but especially the userspace overhead seems to be significantly higher in the -V kernel so i'm not quite sure it can all be attributed to debugging overhead. We'll see.
also, how does the context-switching rate compare between the two tests? This test is pretty steady when it's running, so the context-switch rates can be directly compared, correct?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 28 lines · Ingo Molnar
Quoted 15 lines · Rui Nuno Capela
The following table compares the state between my RT-U3 and RT-V0.4.3 configurations, regarding only the mentioned options:
option RT-U3.0 RT-V0.4.3
---------------------------- ---------- ---------CONFIG_DEBUG_SLAB n n CONFIG_DEBUG_PREEMPT y y CONFIG_DEBUG_SPINLOCK_SLEEP n - CONFIG_PREEMPT_TIMING n n CONFIG_RWSEM_DEADLOCK_DETECT - y CONFIG_FRAME_POINTER y y CONFIG_DEBUG_STACKOVERFLOW y y CONFIG_DEBUG_STACK_USAGE n n CONFIG_DEBUG_PAGEALLOC n nQuoted 5 lines
(dash "-" means that the option is not available in the config).
As you can see, it can only be
CONFIG_RWSEM_DEADLOCK_DETECT, being new in RT-V0.4.3, that is probably affecting on RT-V0.4.3. I'll try to rebuild and test all over without it, and see if it gets any better.note that
DEBUG_PREEMPTgot more expensive in the -V kernels. I'd suggest to disable all the 'y' ones in both the -U and -V kernel and compare them then.
Quoted 8 lines
but especially the userspace overhead seems to be significantly higher in the -V kernel so i'm not quite sure it can all be attributed to debugging overhead. We'll see.
also, how does the context-switching rate compare between the two tests? This test is pretty steady when it's running, so the context-switch rates can be directly compared, correct?
OK. That was it. After switching off CONFIG_RWSEM_DEADLOCK_DETECT on RT-V0.4.3, I can say that it's now on par to RT-U3.
Later today, I will conduct some extendeded testing, where I'll able to compare the jackd performance between vanilla, RT-U3 and RT-V0.4.3, on my UP laptop. All kernel configurations will be stripped off from all the debug options.
I will take note of xrun rate, jackd scheduling delay histogram, and cpu usage. Context switch rate will be also acquainted.
Anything else?
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 2 lines · Rui Nuno Capela
OK. That was it. After switching off
CONFIG_RWSEM_DEADLOCK_DETECTon RT-V0.4.3, I can say that it's now on par to RT-U3.
great!
Quoted 9 lines
Later today, I will conduct some extendeded testing, where I'll able to compare the jackd performance between vanilla, RT-U3 and RT-V0.4.3, on my UP laptop. All kernel configurations will be stripped off from all the debug options.
I will take note of xrun rate, jackd scheduling delay histogram, and cpu usage. Context switch rate will be also acquainted.
Anything else?
yeah, that's good enough. I'd still suggest to first test new kernels with all the debug options on, to make sure it's stable. For performance comparisons turn all the debug options off.
i'd also suggest to turn the NMI watchdog off (if enabled), that can inject a 10-20 usec latency into any critical path. For the absolute lowest latencies i'd also suggest to turn off all the APIC options (possible in a UP kernel only, and only if the XT-PIC setup doesnt cause unacceptable IRQ-line sharing), the IO-APIC mask handling is a bit expensive compared to the XT-PIC.
If you find (or suspect) larger latencies anywhere then PREEMPT_TIMING + LATENCY_TRACE + preempt_enable=4 is the preferred variant to use. (right now it's not possible to do wakeup-timing without LATENCY_TRACE, i'll fix that.)
Ingo
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-V0.5.2
Quoted 2 lines · Ingo Molnar
(right now it's not possible to do wakeup-timing without
LATENCY_TRACE, i'll fix that.)
i've fixed this in -RT-V0.5.2. Also, the trace_enabled=4 method is deprecated now and the new mechanism is to use:
/proc/sys/kernel/preempt_wakeup_timing
this flag is default-enabled. So starting at -RT-V0.5.2 to activate wakeup timing it's enough to enable PREEMPT_TIMING and reset the max after bootup:
echo 0 > /proc/sys/kernel/preempt_max_latency
this will switch back to critical-section timing/tracing:
echo 0 > /proc/sys/kernel/preempt_wakeup_timing
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5.2
Quoted 15 lines · Ingo Molnar
Quoted 2 lines · Ingo Molnar
(right now it's not possible to do wakeup-timing without
LATENCY_TRACE, i'll fix that.)i've fixed this in -RT-V0.5.2. Also, the trace_enabled=4 method is deprecated now and the new mechanism is to use:
/proc/sys/kernel/preempt_wakeup_timingthis flag is default-enabled. So starting at -RT-V0.5.2 to activate wakeup timing it's enough to enable
PREEMPT_TIMINGand reset the max after bootup:
Quoted 5 lines
echo 0 >
/proc/sys/kernel/preempt_max_latencythis will switch back to critical-section timing/tracing:
echo 0 >
/proc/sys/kernel/preempt_wakeup_timing
What kind of benchmarking tools about from the inkernel timing/tracing do you use for testing REALTIME_PREEMPT?
Quoted 2 lines
Ingo
-DaMouse
Signature · 1 line
I know I broke SOMETHING but its their fault for not fixing it before me
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.5.2
Quoted 8 lines · DaMouse
Quoted 5 lines
echo 0 >
/proc/sys/kernel/preempt_max_latencythis will switch back to critical-section timing/tracing:
echo 0 >
/proc/sys/kernel/preempt_wakeup_timingWhat kind of benchmarking tools about from the inkernel timing/tracing do you use for testing
REALTIME_PREEMPT?
amlat's 'realfeel' with the patch i posted yesterday.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Ingo MolnarQuoted 13 lines · Ingo Molnar
Quoted 2 lines · Rui Nuno Capela
OK. That was it. After switching off
CONFIG_RWSEM_DEADLOCK_DETECTon RT-V0.4.3, I can say that it's now on par to RT-U3.great!
Quoted 5 lines
Later today, I will conduct some extendeded testing, where I'll able to compare the jackd performance between vanilla, RT-U3 and RT-V0.4.3, on my UP laptop. All kernel configurations will be stripped off from all the debug options.
Quoted 6 lines
Quoted 4 lines
I will take note of xrun rate, jackd scheduling delay histogram, and cpu usage. Context switch rate will be also acquainted.
Anything else?
yeah, that's good enough.
OK. Here are my early consolidated results. Feel free to comment.
2.6.9 RT-U3 RT-V0.4.3
--------- --------- ---------
XRUN Rate . . . . . . . . . . . 424 8 4 /hour
Delay Rate (>spare time) . . . 496 0 0 /hour
Delay Rate (>1000 usecs) . . . 940 8 4 /hour
Maximum Delay . . . . . . . . . 6904 921 721 usecs
Maximum Process Cycle . . . . . 1449 1469 1590 usecs
Average DSP CPU Load . . . . . 38 39 40 %
Average Context-Switch Rate . . 7480 8929 9726 /secNote: all tests were carried out running jackd -v -dalsa -dhw:0 -r44100 -p128 -n2 -S -P, loaded with 9 (nine) fluidsynth instances, on a [email protected] laptop, against the onboard sound device (snd-ali5451).
On the RT kernels only, the following optimizations were issued:
chrt --pid --fifo 90 2 (pidof "ksoftirqd/0" = 2) chrt --pid --fifo 60 `pidof "IRQ 5"` (snd-ali5451)
Take care.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 11 lines · Rui Nuno Capela
OK. Here are my early consolidated results. Feel free to comment.
2.6.9 RT-U3 RT-V0.4.3 --------- --------- --------- XRUN Rate . . . . . . . . . . . 424 8 4 /hour Delay Rate (>spare time) . . . 496 0 0 /hour Delay Rate (>1000 usecs) . . . 940 8 4 /hour Maximum Delay . . . . . . . . . 6904 921 721 usecs Maximum Process Cycle . . . . . 1449 1469 1590 usecs Average DSP CPU Load . . . . . 38 39 40 % Average Context-Switch Rate . . 7480 8929 9726 /sec
looks pretty good, doesnt it?
how is the 'maximum delay' calculated? Could you put in a tracing hook into jackd whenever such a ~720 usecs maximum is hit? I'd _love_ to see how such a latency path looks like, it seems a bit long.
It should be a relatively simple hack to jackd. Firstly, download the -V0.5.3 patch and enable LATENCY_TRACE, then do:
echo 2 > /proc/sys/kernel/trace_enabled
this activates the 'application-triggered kernel tracer' functionality.
No tracing happens by default, but tracing starts if the application executes this function:
gettimeofday(0,1);
and tracing stops if the application does:
gettimeofday(0,0);
whenever the app does this (0,0) call the trace gets saved and you can retrieve it from /proc/latency_trace where you can retrieve it. There is no combination of these parameters that can break the kernel, so it's a 100% safe tracing facility. You can 'ignore' a latency [e.g. if it's not a maximum] by simply not doing the (0,0) call. The next (0,1) call done will override the previous, already running trace.
[stupid function but this combination of the syscall parameters is not used otherwise so the latency tracer hijacks it.]
i dont know how Jackd does things, but i'd suggest to enable tracing the first time possible when getting an interrupt - in theory this should happen as soon as the wakeup-latency-tracer says - i.e. at most in like 30 usecs. The bulk of the remaining 700 usecs will be spent in jackd, and you can trace those 700 usecs.
or if you would be willing to do a little bit of ALSA hacking, you could add this to the ALSA interrupt handler:
#include <linux/syscalls.h> ... sys_gettimeofday(0, 1);
[the attached patch implements this for ali5451.]
and do the gettimeofday(0,0) in jackd [if the latency measured there is a new maximum]! This way tracing is turned on within the kernel IRQ handler (i.e. as soon as possible) and turned off within ALSA. This will enable us to see an even more complete latency path.
NOTE: there can only be one trace active at a time. So if there can be multiple channels active at a time then this user-triggered tracer might be less useful. Do these channels have any priority? Or if multiple channels are necessary then you could modify the patch to only do the (0,1) call for say channel #0:
if (channel == 0) sys_gettimeofday(0, 1);
in this case the trace-off-save (0,0) call in Jackd must also only do this for channel 0 processing! (or whichever channel you find the most interesting.)
also, i looked at the sound/pci/ali5451/ali5451.c driver code and it has one weird piece of code on line 988:
udelay(100);
that adds a 100 usecs latency to the main path, for no good reason! It also spends that time burning CPU time, delaying other processing. Could you add an IRQs/sec measurement too if possible, so that we can compare the IRQ rates of various kernels?
Also, i'd suggest to simply remove that line (or apply the attached patch) - does the driver still work fine with that?
plus i've also got questions about how Jackd interfaces with ALSA: does it use SIGIO, or some direct driver ioctl? If SIGIO is used then how is it done precisely - is an 'RT' queued signal used or ordinary SIGIO? Also, how is the 'channel' information established upon getting a SIGIO, is it in the siginfo structure?
Ingo
sound/pci/ali5451/ali5451.c renamed from sound/pci/ali5451/ali5451.c.orig +2 -1
@@ -33,6 +33,7 @@#include <linux/pci.h> #include <linux/slab.h> #include <linux/moduleparam.h> +#include <linux/syscalls.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/info.h>
@@ -985,11 +986,11 @@ static void snd_ali_update_ptr(ali_t *co pvoice = &codec->synth.voices[channel]; runtime = pvoice->substream->runtime; -udelay (100 );spin_lock (&codec->reg_lock);if (pvoice->pcm && pvoice->substream) {/* pcm interrupt */ +sys_gettimeofday ((void *)0 , (void *)1 );// start the tracer #ifdef ALI_DEBUG outb ((u8)(pvoice->number),ALI_REG (codec,ALI_GC_CIR )); temp =inw (ALI_REG (codec,ALI_CSO_ALPHA_FMS +2 ));
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 15 lines · Ingo Molnar
Quoted 11 lines · Rui Nuno Capela
OK. Here are my early consolidated results. Feel free to comment.
2.6.9 RT-U3 RT-V0.4.3 --------- --------- --------- XRUN Rate . . . . . . . . . . . 424 8 4 /hour Delay Rate (>spare time) . . . 496 0 0 /hour Delay Rate (>1000 usecs) . . . 940 8 4 /hour Maximum Delay . . . . . . . . . 6904 921 721 usecs Maximum Process Cycle . . . . . 1449 1469 1590 usecs Average DSP CPU Load . . . . . 38 39 40 % Average Context-Switch Rate . . 7480 8929 9726 /sec
Quoted 2 lines
looks pretty good, doesnt it?
Yes indeed :)
Quoted 4 lines
how is the 'maximum delay' calculated? Could you put in a tracing hook into jackd whenever such a ~720 usecs maximum is hit? I'd _love_ to see how such a latency path looks like, it seems a bit long.
That 'maximum delay' is collected on each jackd process cycle. AFAICS, it is the figure of a scheduling delay, as measured by jackd as the time interval between interrupt and effective jackd process handler (re)entry.
Please note that I'm not a JACK developer. I'm just a regular user with ancient coding skills ;) I do however subscribe to the jackit-devel maillist. And the author of qjackctl, if that matters...
For reading this 'maximum delay' I am actually using a custom patch against jack-0.99.7cvs, being a Lee Revell's original.
Quoted 53 lines
It should be a relatively simple hack to jackd. Firstly, download the -V0.5.3 patch and enable
LATENCY_TRACE, then do:echo 2 >
/proc/sys/kernel/trace_enabledthis activates the 'application-triggered kernel tracer' functionality.
No tracing happens by default, but tracing starts if the application executes this function:
gettimeofday(0,1);and tracing stops if the application does:
gettimeofday(0,0);whenever the app does this (0,0) call the trace gets saved and you can retrieve it from
/proc/latency_tracewhere you can retrieve it. There is no combination of these parameters that can break the kernel, so it's a 100% safe tracing facility. You can 'ignore' a latency [e.g. if it's not a maximum] by simply not doing the (0,0) call. The next (0,1) call done will override the previous, already running trace.[stupid function but this combination of the syscall parameters is not used otherwise so the latency tracer hijacks it.]
i dont know how Jackd does things, but i'd suggest to enable tracing the first time possible when getting an interrupt - in theory this should happen as soon as the wakeup-latency-tracer says - i.e. at most in like 30 usecs. The bulk of the remaining 700 usecs will be spent in jackd, and you can trace those 700 usecs.
or if you would be willing to do a little bit of ALSA hacking, you could add this to the ALSA interrupt handler:
#include <linux/syscalls.h> ... sys_gettimeofday(0, 1);[the attached patch implements this for ali5451.]
and do the
gettimeofday(0,0)in jackd [if the latency measured there is a new maximum]! This way tracing is turned on within the kernel IRQ handler (i.e. as soon as possible) and turned off within ALSA. This will enable us to see an even more complete latency path.NOTE: there can only be one trace active at a time. So if there can be multiple channels active at a time then this user-triggered tracer might be less useful. Do these channels have any priority? Or if multiple channels are necessary then you could modify the patch to only do the (0,1) call for say channel #0:
Quoted 7 lines
if (channel == 0) sys_gettimeofday(0, 1);in this case the trace-off-save (0,0) call in Jackd must also only do this for channel 0 processing! (or whichever channel you find the most interesting.)
Ouch. This is a bit too much to digest in so little time :) I'll try to re-read this from cache, erm... tomorrow ;)
BTW, this means that I have to re-enable LATENCY_TIMING back again? Notice that all my results were taken with a production configuration, that is, with all debug options now set to off (OK, I think I've left the stack-overflow on, but that was the only one).
OTOH, this latency timing has been troublesome on either of my setups, recently. But I'll give it another try...
Quoted 10 lines
also, i looked at the
sound/pci/ali5451/ali5451.cdriver code and it has one weird piece of code on line 988:udelay(100);that adds a 100 usecs latency to the main path, for no good reason! It also spends that time burning CPU time, delaying other processing. Could you add an IRQs/sec measurement too if possible, so that we can compare the IRQ rates of various kernels?
Yes, I can add interrupts/sec measuring with nmeter. Neat utility indeed, thanks to Denis Vlasenko.
Quoted 3 lines
Also, i'd suggest to simply remove that line (or apply the attached patch) - does the driver still work fine with that?
Now that you call, I remember to hack that very same line, some time go, but couldn't get no better than a udelay(33). Removing that line just ended in some kind of malfunction, but can't remember what exactly. One thing's for sure, sound didn't came out of it :-/
Quoted 6 lines
plus i've also got questions about how Jackd interfaces with ALSA: does it use SIGIO, or some direct driver ioctl? If SIGIO is used then how is it done precisely - is an 'RT' queued signal used or ordinary SIGIO? Also, how is the 'channel' information established upon getting a SIGIO, is it in the siginfo structure?
Now that's really pushing me over. Any ALSA-JACK developers around here to comment?
Bye now.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 10 lines · Rui Nuno Capela
Quoted 6 lines
plus i've also got questions about how Jackd interfaces with ALSA: does it use SIGIO, or some direct driver ioctl? If SIGIO is used then how is it done precisely - is an 'RT' queued signal used or ordinary SIGIO? Also, how is the 'channel' information established upon getting a SIGIO, is it in the siginfo structure?
Now that's really pushing me over. Any ALSA-JACK developers around here to comment?
I think it uses a direct driver ioctl to open the device. Then jack uses mmap to talk to the audio device.
Anyway I forwarded your question to Paul Davis, the author of JACK, and cc'ed jackit-devel.
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Rui Nuno CapelaQuoted 1 line · Rui Nuno Capela
BTW, this means that I have to re-enable
LATENCY_TIMINGback again?
yes. I'd suggest to start with the simplest setup - i.e. just one fluidsynth instance running. I suspect 3-4 instances later on will be enough to trigger some xruns or at least some of the bigger delays.
you possibly wont be able to debug the 'production' setup, but that's not an issue because the latencies should show up under just 2-3 instances running as well.
Quoted 8 lines
Quoted 3 lines
Also, i'd suggest to simply remove that line (or apply the attached patch) - does the driver still work fine with that?
Now that you call, I remember to hack that very same line, some time go, but couldn't get no better than a udelay(33). Removing that line just ended in some kind of malfunction, but can't remember what exactly. One thing's for sure, sound didn't came out of it :-/
ugh. Possibly some sort of interaction with the firmware and/or an outright driver bug?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 17 lines · Ingo Molnar
Quoted 1 line · Rui Nuno Capela
BTW, this means that I have to re-enable
LATENCY_TIMINGback again?yes. I'd suggest to start with the simplest setup - i.e. just one fluidsynth instance running. I suspect 3-4 instances later on will be enough to trigger some xruns or at least some of the bigger delays.
you possibly wont be able to debug the 'production' setup, but that's not an issue because the latencies should show up under just 2-3 instances running as well.
Quoted 4 lines
Quoted 3 lines
Also, i'd suggest to simply remove that line (or apply the attached patch) - does the driver still work fine with that?
Quoted 8 lines
Quoted 4 lines
Now that you call, I remember to hack that very same line, some time go, but couldn't get no better than a udelay(33). Removing that line just ended in some kind of malfunction, but can't remember what exactly. One thing's for sure, sound didn't came out of it :-/
ugh. Possibly some sort of interaction with the firmware and/or an outright driver bug?
Just confirmed that, by removing that udelay(100) line on ali5451.c, the result is crappy sound (worst than normally is :) and most relevant to the subject, I get a nasty jackd XRUN storm, without even blinking an eye. Useless.
Regarding my test results, maybe this is just a distraction. I was just comparing the kernels, not the hardware, jackd or the ali5451 alsa driver, which were kept as constants along the evaluation.
In fact, those tests were only about to confirm, by numbers on-the-field, that RT-V0 is on par to RT-U3. Don't bother to compare it to your own setup and/or hardware. These are the kind of things that YMMCV = Your Mileage Certainly Varies :)
For example, in my own case, if those tests are done with ACPI disabled (yes, with acpi=off), this laptop of mine just skews the results
completely: vanilla 2.6.9 gets better results, while the RT ones go slumber. Go figure ;)
OK. I'm really running out of time now. Family's calling for the weekend.
On the next few days I'll take the latency_trace route, as Ingo proposed, patching ali5451 and jackd to issue a sys_gettimeofday(0, 0) and gettimeofday(0, 1) trace on/off instrumentation respectively, while using a proper RT-V0.5.x kernel patch line (or newer).
Bye now.
Signature · 2 lines
rncbc aka Rui Nuno Capela [email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 4 lines · Rui Nuno Capela
For example, in my own case, if those tests are done with ACPI disabled (yes, with acpi=off), this laptop of mine just skews the results
completely: vanilla 2.6.9 gets better results, while the RT ones go slumber. Go figure ;)
I suspect that your laptop uses SMM traps to talk to the battery. That could certainly explain the 700 us xruns, because SMM disables all interrupts. This was covered recently in another thread. According to Alan Cox most laptops work this way.
Has anyone been able to reproduce the problem on a desktop system?
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Rui Nuno CapelaQuoted 16 lines · On Thu, 28 Oct 2004 17:33:50 +0100 (WEST) "Rui Nuno Capela" <[email protected]>…
OK. Here are my early consolidated results. Feel free to comment.
2.6.9 RT-U3 RT-V0.4.3 --------- --------- --------- XRUN Rate . . . . . . . . . . . 424 8 4 /hour Delay Rate (>spare time) . . . 496 0 0 /hour Delay Rate (>1000 usecs) . . . 940 8 4 /hour Maximum Delay . . . . . . . . . 6904 921 721 usecs Maximum Process Cycle . . . . . 1449 1469 1590 usecs Average DSP CPU Load . . . . . 38 39 40 % Average Context-Switch Rate . . 7480 8929 9726 /secNote: all tests were carried out running jackd -v -dalsa -dhw:0 -r44100 -p128 -n2 -S -P, loaded with 9 (nine) fluidsynth instances, on a [email protected] laptop, against the onboard sound device (snd-ali5451).
Quoted 6 lines
On the RT kernels only, the following optimizations were issued:
chrt --pid --fifo 90 2 (pidof "ksoftirqd/0" = 2) chrt --pid --fifo 60 `pidof "IRQ 5"` (snd-ali5451)Take care.
hi,
i tried a V0.5.2 with PREEMPT_REALTIME and all debugging off (config attached). I cannot reproduce your results. I have experienced around 30 xruns in 10 minutes. And big ones, too (> 5ms). I don't know exactly what kind of load triggers them. Here's a bit of qjackctl message window (btw:
jackd was idle, no clients connected, except for qjackctl):
**** alsa_pcm: xrun of at least 0.594 msecs
**** alsa_pcm: xrun of at least 0.037 msecs
16:20:44.832 XRUN callback (2).
16:20:44.840 XRUN callback (3).
**** alsa_pcm: xrun of at least 0.024 msecs
**** alsa_pcm: xrun of at least 3.682 msecs
16:22:59.834 XRUN callback (4).
16:22:59.839 XRUN callback (5).
**** alsa_pcm: xrun of at least 0.016 msecs
**** alsa_pcm: xrun of at least 3.460 msecs
16:23:03.513 XRUN callback (6).
**** alsa_pcm: xrun of at least 2.028 msecs
16:23:03.869 XRUN callback (7).
**** alsa_pcm: xrun of at least 7.061 msecs
**** alsa_pcm: xrun of at least 4.510 msecs
16:23:03.894 XRUN callback (8).
16:23:03.895 XRUN callback (9).
**** alsa_pcm: xrun of at least 0.428 msecs
**** alsa_pcm: xrun of at least 0.157 msecs
16:23:54.546 XRUN callback (10).
16:23:54.547 XRUN callback (11).
16:23:54.549 XRUN callback (12).
**** alsa_pcm: xrun of at least 1.507 msecs
16:25:49.194 XRUN callback (13).
subgraph starting at qjackctl-1013 timed out (subgraph_wait_fd=14, status = 0, state = Triggered) **** alsa_pcm: xrun of at least 1.534 msecs
16:28:23.530 XRUN callback (14).
**** alsa_pcm: xrun of at least 0.222 msecs
**** alsa_pcm: xrun of at least 2.674 msecs
**** alsa_pcm: xrun of at least 3.904 msecs
16:28:26.790 XRUN callback (15).
16:28:26.794 XRUN callback (16).
16:28:26.795 XRUN callback (17).
**** alsa_pcm: xrun of at least 0.701 msecs
Here's some setup info:
ksoftirqd/0:
mango:~# chrt -p 2 pid 2's current scheduling policy: SCHED_FIFO pid 2's current scheduling priority: 99
snd-cs46xx:
mango:~# chrt -p `pidof "IRQ 3"` pid 118's current scheduling policy: SCHED_FIFO pid 118's current scheduling priority: 90
mango:~# pidof jackd 1014 mango:~# chrt -p 1014 pid 1014's current scheduling policy: SCHED_OTHER pid 1014's current scheduling priority: 0 mango:~# chrt -p 1015 pid 1015's current scheduling policy: SCHED_OTHER pid 1015's current scheduling priority: 0 mango:~# chrt -p 1016 pid 1016's current scheduling policy: SCHED_FIFO pid 1016's current scheduling priority: 70 mango:~# chrt -p 1017 pid 1017's current scheduling policy: SCHED_FIFO pid 1017's current scheduling priority: 60
Hmm, it seems i haven't disabled all debugging. This is from dmesg:
BUG: atomic counter underflow at: [<c010649e>] dump_stack+0x1e/0x20 (20) [<c025f319>] qdisc_destroy+0xd9/0xe0 (28) [<c025f506>] dev_shutdown+0x36/0xb0 (28) [<c0254679>] unregister_netdevice+0x129/0x2b0 (40) [<c0221919>] unregister_netdev+0x19/0x40 (16) [<f0902134>] ppp_shutdown_interface+0x64/0xd0 [ppp_generic] (36) [<f08fe0a6>] ppp_release+0x86/0x90 [ppp_generic] (16) [<c0155c3f>] __fput+0x14f/0x170 (36) [<c0154457>] filp_close+0x57/0x80 (28) [<c01544f0>] sys_close+0x70/0x90 (32) [<c0105ecf>] syscall_call+0x7/0xb (-8124)
Here's some context from syslog:
Oct 29 15:04:01 mango pppd[324]: LCP: timeout sending Config-Requests Oct 29 15:04:01 mango pppd[324]: Connection terminated. Oct 29 15:04:01 mango kernel: BUG: atomic counter underflow at: Oct 29 15:04:01 mango kernel: [valid_stack_ptr+46/96] dump_stack+0x1e/0x20 (20) Oct 29 15:04:01 mango kernel: [unregister_netdevice+553/672] qdisc_destroy+0xd9/0xe0 (28) Oct 29 15:04:01 mango kernel: [ethtool_op_get_tso+6/32] dev_shutdown+0x36/0xb0 (28) Oct 29 15:04:01 mango kernel: [__sock_create+185/704] unregister_netdevice+0x129/0x2b0 (40) Oct 29 15:04:01 mango kernel: [blk_wait_queue_drained+25/304] unregister_netdev+0x19/0x40 (16) Oct 29 15:04:01 mango kernel: [pg0+810783028/1069765632] ppp_shutdown_interface+0x64/0xd0 [ppp_generic] (36) Oct 29 15:04:01 mango kernel: [pg0+810766502/1069765632] ppp_release+0x86/0x90 [ppp_generic] (16) Oct 29 15:04:01 mango kernel: [shmem_writepage+463/480] __fput+0x14f/0x170 (36) Oct 29 15:04:01 mango kernel: [sys_swapon+1591/2080] filp_close+0x57/0x80 (28) Oct 29 15:04:01 mango kernel: [sys_swapon+1744/2080] sys_close+0x70/0x90 (32) Oct 29 15:04:01 mango kernel: [do_notify_resume+15/76] syscall_call+0x7/0xb (-8124) Oct 29 15:04:10 mango pppoe[326]: Timeout waiting for PADS packets Oct 29 15:04:31 mango pppd[324]: Serial connection established. Oct 29 15:04:31 mango pppd[324]: Using interface ppp0 Oct 29 15:04:31 mango pppd[324]: Connect: ppp0 <--> /dev/pts/0 Oct 29 15:04:47 mango pppoe[822]: PADS: Service-Name: '' Oct 29 15:04:47 mango pppoe[822]: PPP session is 2133 Oct 29 15:04:47 mango pppd[324]: CHAP authentication succeeded Oct 29 15:04:48 mango pppd[324]: Cannot determine ethernet address for proxy ARP Oct 29 15:04:48 mango pppd[324]: local IP address 213.23.197.161 Oct 29 15:04:48 mango pppd[324]: remote IP address 145.253.4.148 Oct 29 15:04:48 mango pppd[324]: primary DNS address 195.50.140.250 Oct 29 15:04:48 mango pppd[324]: secondary DNS address 145.253.2.11
flo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 6 lines · Florian Schmidt
Here's some setup info:
ksoftirqd/0:
mango:~# chrt -p 2 pid 2's current scheduling policy: SCHED_FIFO pid 2's current scheduling priority: 99
dont do this ... ksoftirqd can spend alot of time processing various stuff and it should not be relevant to the audio path. It should be SCHED_OTHER.
Quoted 5 lines
Hmm, it seems i haven't disabled all debugging. This is from dmesg:
BUG: atomic counter underflow at: [<c010649e>] dump_stack+0x1e/0x20 (20) [<c025f319>] qdisc_destroy+0xd9/0xe0 (28)
this is automatic and doesnt introduce alot of overhead (unless the printout happens while you are testing latencies). You can remove the WARN_ON from include/asm-i386/atomic.h.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 8 lines · On Fri, 29 Oct 2004 16:25:38 +0200 Ingo Molnar <[email protected]> wrote:
Quoted 4 lines
ksoftirqd/0:
mango:~# chrt -p 2 pid 2's current scheduling policy: SCHED_FIFO pid 2's current scheduling priority: 99dont do this ... ksoftirqd can spend alot of time processing various stuff and it should not be relevant to the audio path. It should be
SCHED_OTHER.
ah ok, i was wondering about this.. i saw it in rui's setup [SCHED_FIFO with high prio]. Doesn't seem to make a difference though on first sight. still xruns plenty above 1ms.
playback only or rmmod'ing the network adapter driver or using the dummy soundcard driver instead of snd-cs46xx doesn't make a difference either.
after rmmoding the network card driver i saw:
sis900 0000:00:03.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
in m dmesg. rmmod'ing snd-cs46xx gives me:
Sound Fusion CS46xx 0000:00:0f.0: Device was removed without properly calling pci_disable_device(). This may need fixing.
too, so maybe i have already hit a BUG in the kernel and this screwed up all further test results.
Will build a kernel with debugging stuff to see what's up. I'll also build a VP only version to see if i still get these pci_disable_device() messages with a "more vanilla" kernel ;)
flo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Florian SchmidtQuoted 6 lines · On Fri, 29 Oct 2004 16:31:35 +0200 Florian Schmidt <[email protected]> wrote:
i tried a V0.5.2 with
PREEMPT_REALTIMEand all debugging off (config attached). I cannot reproduce your results. I have experienced around 30 xruns in 10 minutes. And big ones, too (> 5ms). I don't know exactly what kind of load triggers them. Here's a bit of qjackctl message window (btw:
jackd was idle, no clients connected, except for qjackctl):
[snip]
i forgot to mention though that i do use jack in full duplex mode and with a periodsize of 64:
/usr/bin/jackd -R -P60 -t20000 -dalsa -dhw:0 -r48000 -p64 -n2
The results are thus not really comparable. Anyways, 7ms xruns still shouldn't happen (with the older VP patches i could run 32 frames full duplex for hours w/o xruns).
flo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Florian SchmidtQuoted 6 lines · Florian Schmidt
i tried a V0.5.2 with
PREEMPT_REALTIMEand all debugging off (config attached). I cannot reproduce your results. I have experienced around 30 xruns in 10 minutes. And big ones, too (> 5ms). I don't know exactly what kind of load triggers them. Here's a bit of qjackctl message window (btw:
jackd was idle, no clients connected, except for qjackctl):
I am seeing the same behavior, about 30 xruns in 10 minutes. It seems to be triggered by display activity, among other things. This cannot be a jackd issue, because with an earlier version (T3) I can run for 24 hours without a single xrun.
There has to be a bug somewhere in the RT preempt patch.
Lee
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 8 lines · Lee Revell
Quoted 6 lines · Florian Schmidt
i tried a V0.5.2 with
PREEMPT_REALTIMEand all debugging off (config attached). I cannot reproduce your results. I have experienced around 30 xruns in 10 minutes. And big ones, too (> 5ms). I don't know exactly what kind of load triggers them. Here's a bit of qjackctl message window (btw:
jackd was idle, no clients connected, except for qjackctl):
Quoted 8 lines
I am seeing the same behavior, about 30 xruns in 10 minutes. It seems to be triggered by display activity, among other things. This cannot be a jackd issue, because with an earlier version (T3) I can run for 24 hours without a single xrun.
There has to be a bug somewhere in the RT preempt patch.
Lee
There is, this has been a well-known issue with many versions of real-time voluntary preemption, which is also a main reason as to why I avoid it, voluntary preemption performs flawlessly however RT has been horrendous. Hopefully the bugs will get smoothed out.
PATCH 1/1 Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Ingo Molnari have released the -V0.4 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this is a fixes-only release, but still experimental.
this release should fix more bugs of the 'slowdown' and 'interactivity problems' variety.
To debug the wakeup anomalies reported i've implemented a new variant of the latency tracer, which now traces 'wakeup latencies' too - i.e. it measures and traces maximum delays observed from the point of wakeup to the point of the really starting to execute. Only the highest-priority runnable task in the system is traced at a time, but this should be more than enough to find the high latency scheduling paths.
This new tracing mode can be enabled by compiling a LATENCY_TRACE kernel as usual and doing:
echo 4 > /proc/sys/kernel/trace_enabled
then to start tracing, reset the current max latency value via e.g.:
echo 10 > /proc/sys/kernel/preempt_max_latency
then the kernel should signal wakeup latency events in the syslog:
(sshd/3093/CPU#0): new 18 us maximum-latency wakeup. (sshd/3093/CPU#0): new 19 us maximum-latency wakeup. (hackbench/3818/CPU#0): new 20 us maximum-latency wakeup. (hackbench/3762/CPU#0): new 21 us maximum-latency wakeup. (hackbench/3814/CPU#0): new 22 us maximum-latency wakeup. (ksoftirqd/0/3/CPU#0): new 35 us maximum-latency wakeup.
the latency trace of the last (and highest) event can always be found in /proc/latency_trace, as usual. Note that the trace output is a bit different in the wakeup-tracing case.
NOTE: the tracer works on SMP too, but since on SMP tasks can switch from one CPU to another a given trace can be less useful if the delay happened on another CPU.
using this wakeup tracer i found and fixed a couple of 'missed preemption check' bugs - all introduced by PREEMPT_REALTIME in the -U/-V timeframe. So if you had latency/interactivity problems please re-check -V0.4.
the wakeup tracer is nice in the sense of that it traces actual, realy.
Changes since -V0.3.2:
- fixed the rtc_lock related crash reported by K.R. Foley and Robert Crocombe.
- fixed missing preemption checks in rwsem-generic.c
- fixed missing preemption check in schedule_tail() [==new task wakeup]
- implemented wakeup-latency tracer
to create a -V0.4 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.4
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
I'm testing out this patch on an debian box.
There seems to be a problem with enable_irq in the e100 driver that makes the network to b0rk.
What information do you need to get something useful out of this?
I saw that others have this problem, so I've got an serial console to the box, if you want me to do any tests, tell me how.
Regards,
Magnus
Setting up IP spoofing protection: rp_filter.
Configuring network interfaces: ifconfig/924: BUG in enable_irq at kernel/irq/manage.c:112
[<c01362a0>] enable_irq+0xe4/0x12c (8) [<d08a44f6>] e100_up+0x119/0x224 [e100] (44) [<d08a5743>] e100_open+0x2c/0x84 [e100] (44) [<c0237dda>] dev_open+0x76/0x85 (28) [<c02394a8>] dev_change_flags+0x5d/0x138 (24) [<c0237cbd>] dev_load+0x31/0x6c (12) [<c027915c>] devinet_ioctl+0x5f9/0x6c6 (20) [<c027b1b8>] inet_ioctl+0xc7/0xd3 (104) [<c022ea5e>] sock_ioctl+0x19f/0x26a (24) [<c016c897>] sys_ioctl+0x1e8/0x249 (28) [<c0113eea>] do_page_fault+0x0/0x5ee (24) [<c0105bb3>] syscall_call+0x7/0xb (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: enable_irq+0x31/0x12c [<c01361ed>] / (0x0 [<00000000>]) .. entry 2: print_traces+0x14/0x47 [<c0130201>] / (0x0 [<00000000>])
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 3 lines · Magnus Naeslund(t)
I'm testing out this patch on an debian box. There seems to be a problem with
enable_irqin the e100 driver that makes the network to b0rk.
this e100 driver warning seems mostly harmless - i get it too and the device works just fine.
Quoted 3 lines
What information do you need to get something useful out of this? I saw that others have this problem, so I've got an serial console to the box, if you want me to do any tests, tell me how.
even just using it and reporting any potential breakages you get during bootup or normal use would be very useful. I'd suggest to initially enable all the relevant debugging options:
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=y
CONFIG_EARLY_PRINTK=y
this will slow the kernel down but in case of problems there is a much higher chance of getting a useful assert on the serial console and not some silent lockup.
if things look good for normal use then a bit advanced type of testing would be to enable the wakeup-latency tracer:
echo 4 > /proc/sys/kernel/tracing_enabled
echo 5 > /proc/sys/kernel/preempt_max_latency
this will measure the highest wakeup latency of highprio tasks, starting at 5 microseconds. You'll get a short 1-line notification of the latest latency in the syslog, and the latest trace will always be available in /proc/latency_trace. Depending on the speed of the system, 'larger' latencies should be reported to me. 'larger' means more than 20 usecs on a 2 GHz box or more than 40 usecs on a 1 GHz box. (Dont worry about reporting duplicates, i can skip them quickly.)
then if things are still looking good (i'm not betting on it though :-), you could try various stesstests, running LTP's:
./runalltests.sh -x 20
and things like that. If you have a stable system then it would also be nice to try to trigger as high wakeup-latencies as possible. E.g. run a couple of thousand tasks on it, or try to start as many mozilla instances, or make it go into heavy swapping. I.e. if the core is ok, explore the edges a bit. The kernel is supposed to offer very low (wakeup-) latencies no matter what the load. [this doesnt mean your system will necessarily feel fast - if it's running lots of tasks, even if the highest prio one is woken up quickly, then it's gonna be slow.]
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 12 lines · Ingo Molnar
Quoted 3 lines · Magnus Naeslund(t)
I'm testing out this patch on an debian box. There seems to be a problem with
enable_irqin the e100 driver that makes the network to b0rk.this e100 driver warning seems mostly harmless - i get it too and the device works just fine.
Well, this isn't my experience.
I can't even ping another box on the same net with e100 or eepro100 driver. I'm running a UP p4 2.4 ghz box with 2.6.9-mm1-RT-V0.4.3.
After letting it ping a while, this turns up:
NETDEV WATCHDOG: eth0: transmit timed out ksoftirqd/0/2: BUG in enable_irq at kernel/irq/manage.c:112
[<c01384d9>] enable_irq+0xe1/0x122 (12) [<d08055ab>] e100_up+0x112/0x211 [e100] (48) [<c0247e37>] dev_watchdog+0x0/0xb6 (36) [<c0247eeb>] dev_watchdog+0xb4/0xb6 (12) [<c0124391>] run_timer_softirq+0x1c9/0x48b (20) [<c0111ac0>] mcount+0x14/0x18 (32) [<c012018e>] ___do_softirq+0x4e/0xd6 (20) [<c01202a0>] _do_softirq+0x8/0x22 (8) [<c012066a>] ksoftirqd+0xa5/0xeb (4) [<c01202b8>] _do_softirq+0x20/0x22 (28) [<c012066a>] ksoftirqd+0xa5/0xeb (8) [<c013015e>] kthread+0xa1/0xce (28) [<c01205c5>] ksoftirqd+0x0/0xeb (20) [<c01300bd>] kthread+0x0/0xce (12) [<c0104195>] kernel_thread_helper+0x5/0xb (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: enable_irq+0x33/0x122 [<c013842b>] / (e100_up+0x112/0x211 [e100] [<d08055ab>]) .. entry 2: print_traces+0x1b/0x55 [<c013243e>] / (dump_stack+0x23/0x25 [<c0106eb8>])
Other latecy traces are:
(ksoftirqd/0/2/CPU#0): new 22 us maximum-latency critical section.
=> started at timestamp 116357664: <call_console_drivers+0x8c/0x163>
=> ended at timestamp 116357686: <__sched_text_start+0x30e/0x6c1>
[<c0131d71>] sub_preempt_count+0x62/0xc5 (4) [<c01319e9>] check_preempt_timing+0x20b/0x2da (8) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (8) [<c0106a10>] common_interrupt+0x18/0x20 (24) [<c013007b>] kthread_exit_files+0x14/0x56 (32) [<c0131d71>] sub_preempt_count+0x62/0xc5 (20) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (8) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (20) [<c028a2aa>] schedule+0x29/0xd1 (84) [<c0111ac0>] mcount+0x14/0x18 (8) [<c01206ae>] ksoftirqd+0xe9/0xeb (28) [<c013015e>] kthread+0xa1/0xce (28) [<c01205c5>] ksoftirqd+0x0/0xeb (20) [<c01300bd>] kthread+0x0/0xce (12) [<c0104195>] kernel_thread_helper+0x5/0xb (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __sched_text_start+0x4e/0x6c1 [<c0289c0e>] / (schedule+0x29/0xd1 [<c028a2aa>]) .. entry 2: print_traces+0x1b/0x55 [<c013243e>] / (dump_stack+0x23/0x25 [<c0106eb8>])
=> dump-end timestamp 116461059
(bash/1156/CPU#0): new 16 us maximum-latency critical section.
=> started at timestamp 227980588: <call_console_drivers+0x8c/0x163>
=> ended at timestamp 227980604: <irq_exit+0x3c/0x45>
[<c0131d71>] sub_preempt_count+0x62/0xc5 (4) [<c01319e9>] check_preempt_timing+0x20b/0x2da (8) [<c01380a1>] irq_exit+0x3c/0x45 (8) [<c0115f81>] try_to_wake_up+0x135/0x137 (28) [<c0131d71>] sub_preempt_count+0x62/0xc5 (48) [<c01380a1>] irq_exit+0x3c/0x45 (8) [<c01380a1>] irq_exit+0x3c/0x45 (20) [<c0108784>] do_IRQ+0x5c/0x81 (12) [<c0106a10>] common_interrupt+0x18/0x20 (20) [<c0114ab3>] do_page_fault+0x8e/0x5e7 (44) [<c0131d71>] sub_preempt_count+0x62/0xc5 (72) [<c013183a>] check_preempt_timing+0x5c/0x2da (16) [<c0131d71>] sub_preempt_count+0x62/0xc5 (4) [<c01163ff>] schedule_tail+0x37/0x8f (4) [<c0114a25>] do_page_fault+0x0/0x5e7 (36) [<c0106acd>] error_code+0x2d/0x38 (8) [<c011007b>] set_fixed_ranges+0x62/0xd1 (40) [<c0116447>] schedule_tail+0x7f/0x8f (12) [<c0114a25>] do_page_fault+0x0/0x5e7 (20) [<c0106acd>] error_code+0x2d/0x38 (8)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __do_IRQ+0x104/0x196 [<c01382a6>] / (do_IRQ+0x57/0x81 [<c010877f>]) .. entry 2: print_traces+0x1b/0x55 [<c013243e>] / (dump_stack+0x23/0x25 [<c0106eb8>])
=> dump-end timestamp 228101445
(ksoftirqd/0/2/CPU#0): new 18 us maximum-latency critical section.
=> started at timestamp 228104930: <call_console_drivers+0x8c/0x163>
=> ended at timestamp 228104948: <__sched_text_start+0x30e/0x6c1>
[<c0131d71>] sub_preempt_count+0x62/0xc5 (4) [<c01319e9>] check_preempt_timing+0x20b/0x2da (8) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (8) [<c0106a10>] common_interrupt+0x18/0x20 (24) [<c013007b>] kthread_exit_files+0x14/0x56 (32) [<c0131d71>] sub_preempt_count+0x62/0xc5 (20) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (8) [<c0289ece>] __sched_text_start+0x30e/0x6c1 (20) [<c028a2aa>] schedule+0x29/0xd1 (84) [<c0111ac0>] mcount+0x14/0x18 (8) [<c01206ae>] ksoftirqd+0xe9/0xeb (28) [<c013015e>] kthread+0xa1/0xce (28) [<c01205c5>] ksoftirqd+0x0/0xeb (20) [<c01300bd>] kthread+0x0/0xce (12) [<c0104195>] kernel_thread_helper+0x5/0xb (16)
preempt count: 00000002
. 2-level deep critical section nesting:
.. entry 1: __sched_text_start+0x4e/0x6c1 [<c0289c0e>] / (schedule+0x29/0xd1 [<c028a2aa>]) .. entry 2: print_traces+0x1b/0x55 [<c013243e>] / (dump_stack+0x23/0x25 [<c0106eb8>])
=> dump-end timestamp 228208260
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Magnus Naeslund(t)Quoted 3 lines · Magnus Naeslund(t)
What information do you need to get something useful out of this? I saw that others have this problem, so I've got an serial console to the box, if you want me to do any tests, tell me how.
also, if you hit problems make sure you have the latest patch, i sometimes upload a small update with a trivial fix without announcing it (or the announcement lags on lkml), and i upload larger changes roughly daily. The current latest version is RT-V0.4.3.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
i have released the -V0.4 Real-Time Preemption patch, which can be downloaded from:
I have been having problems on my UP system at home with all of the more recent patches (since U10.X). Some would boot and then the networking was severely busted (slowdowns, hangs, etc.), some would not even boot. V0.4.3 was of the no boot variety. Just for grins I disabled kudzu, and the thing boots fine with no networking or other problems. This very well may have been a fluke, but I have successfully booted this kernel twice now. It did hang on a reboot at the point when it should have been doing the actual reboot and I had to press the button. I didn't have time this morning to turn kudzu back on to see if was just a fluke that it didn't boot the first time. Not sure what, if anything, this means, but V0.4.3 is running very nicely on my UP system with no lag or noticeable problems.
kr
Re: [patch] Real-Time Preemption, -RT-2.6.9-mm1-V0.4
Quoted 4 lines · K.R. Foley
I have been having problems on my UP system at home with all of the more recent patches (since U10.X). Some would boot and then the networking was severely busted (slowdowns, hangs, etc.), some would not even boot. V0.4.3 was of the no boot variety. Just for grins I
Quoted 8 lines
disabled kudzu, and the thing boots fine with no networking or other problems. This very well may have been a fluke, but I have successfully booted this kernel twice now. It did hang on a reboot at the point when it should have been doing the actual reboot and I had to press the button. I didn't have time this morning to turn kudzu back on to see if was just a fluke that it didn't boot the first time. Not sure what, if anything, this means, but V0.4.3 is running very nicely on my UP system with no lag or noticeable problems.
just to make sure - could try to run kudzu manually after bootup and observe what happens? Do you have a udev based system? I recently corrupted my udev database via a crash and had to remove the /dev/.udev.tdb file and had to regenerate it via 'udevstart'. (be careful doing that though, it might mess up your system.) The symtoms were a hung kudzu - while in reality it 'hung' because udev and udevinfo processes looped in userspace forever. Weirdly, the stock Fedora kernel didnt hang in this same phase, so there might still be a PREEMPT_REALTIME bug here.
Ingo
PATCH 1/1 Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
In reply to Ingo Molnari have released the -V0.7.1 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this release is mainly a merge of -V0.6.9 to 2.6.10-rc2-mm2.
I havent done a proper changelog for a couple of days so here is a list of bigger changes since -V0.4:
- implemented a first version of the priority inheritance handling and priority inversion avoidance logic. This feature, after some initial stability problems, solved the jackd and rtc_wakeup latencies that were introduced by the ultra-finegrained locking in the -V series.
(the -T/U series had a coarser locking scheme triggered much lower levels of priority inversion scenarios. The locking in the -V series was clearly the tipping point.)
The new PI code covers all synchronization objects in Linux (on PREEMPT_REALTIME): spinlocks, rwlocks, semaphores and rwsems. Feedback on the design of this code would be welcome, and patches as well, if you have a better scheme. The code is pretty modular so feel free to experiment with alternative schemes.
- completely reworked the debugging framework. All lock types (spinlocks, rwlocks, semaphores and rwsems) are now tracked, both their symbolic name and their place of acquire are traced and printed out upon detection of a deadlock. More and better information is printed upon a deadlock. Got rid of the 'semaphore owners array' in debugging mode, this reduces the footprint of semaphores quite significantly and speeds up deadlock detection.
- got rid of the separate 'counted semaphores' implementation, it was too intrusive. Made the core 'generic semaphores' implementation compatible with vanilla Linux counted semaphore semantics. This also enabled the unrolling of the completion-handling cleanups which, while being very nice, were getting intrusive as well.
- countless build and driver related reports/fixes from lots of people
- more latency breaks in the remaining critical sections. A particularly important one was the irqs-off latency bugfix from Thomas Gleixner.
- sped up the i8259 PIC and the PIT timer hardirq handling routines - these are now in the path of the longest latency.
- cleaned up IRQ and signal preemption - there were missed check-rescheds and possibilities for IRQ recursion.
- made ALSA's ioctl()s not use the BKL - this fixes more jackd latencies.
to create a -V0.7.1 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/v2.6/testing/patch-2.6.10-rc1.bz2
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/2.6.10-rc1-mm2.bz2
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.10-rc1-mm2-V0.7.1
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 7 lines · Ingo Molnar
i have released the -V0.7.1 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this release is mainly a merge of -V0.6.9 to 2.6.10-rc2-mm2.
AS arch/i386/lib/checksum.o CC arch/i386/lib/dec_and_lock.o CC arch/i386/lib/delay.o AS arch/i386/lib/getuser.o CC arch/i386/lib/memcpy.o CC arch/i386/lib/mmx.o CC arch/i386/lib/strstr.o CC arch/i386/lib/usercopy.o AR arch/i386/lib/lib.a GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o LD init/mounts.o LD init/built-in.o LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference to rcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In function netpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
CONFIG_NETPOLL=y
# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not setCONFIG_NET_POLL_CONTROLLER=y
Signature · 1 line
I route therefore you are
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 7 lines · Lorenzo Allegrucci
LD
init/built-in.o
LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference torcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In functionnetpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
fixed in -V0.7.3.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Lorenzo Allegrucci
LD
init/built-in.o
LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference torcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In functionnetpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
Quoted 1 line
fixed in -V0.7.3.
I've just tried V0.7.3 but my PS/2 mouse and keyboard don't work. No message from the kernel. I attach my .config
Signature · 1 line
I route therefore you are
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 12 lines · Lorenzo Allegrucci
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Lorenzo Allegrucci
LD
init/built-in.o
LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference torcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In functionnetpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
Quoted 4 lines
Quoted 1 line
fixed in -V0.7.3.
I've just tried V0.7.3 but my PS/2 mouse and keyboard don't work. No message from the kernel. I attach my .config
Problem solved disabling ACPI.
Signature · 1 line
I route therefore you are
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 13 lines · Lorenzo Allegrucci
Quoted 12 lines · Lorenzo Allegrucci
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Lorenzo Allegrucci
LD
init/built-in.o
LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference torcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In functionnetpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
fixed in -V0.7.3.
I've just tried V0.7.3 but my PS/2 mouse and keyboard don't work. No message from the kernel. I attach my .config
Problem solved disabling ACPI.
does the same problem happen in vanilla 2.6.10-rc1-mm2 too?
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 16 lines · Ingo Molnar
Quoted 13 lines · Lorenzo Allegrucci
Quoted 12 lines · Lorenzo Allegrucci
Quoted 11 lines · Ingo Molnar
Quoted 7 lines · Lorenzo Allegrucci
LD
init/built-in.o
LD .tmp_vmlinux1
net/built-in.o(.text+0x1887f): In function `netpoll_setup':
: undefined reference torcu_read_lock_up_read' net/built-in.o(.text+0x188ed): In functionnetpoll_setup':
: undefined reference to `rcu_read_lock_up_read'
make: *** [.tmp_vmlinux1] Error 1
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
fixed in -V0.7.3.
I've just tried V0.7.3 but my PS/2 mouse and keyboard don't work. No message from the kernel. I attach my .config
Problem solved disabling ACPI.
does the same problem happen in vanilla 2.6.10-rc1-mm2 too?
No it doesn't.
Signature · 1 line
I route therefore you are
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
In reply to Ingo MolnarQuoted 5 lines · Ingo Molnar
The new PI code covers all synchronization objects in Linux (on
PREEMPT_REALTIME): spinlocks, rwlocks, semaphores and rwsems. Feedback on the design of this code would be welcome, and patches as well, if you have a better scheme. The code is pretty modular so feel free to experiment with alternative schemes.
I didn't see closure being performed of a possible blocked-owner dependency chain, but only promotion of the immediate owner. It is possible for a mutex owner to itself be blocked on another mutex requiring promotion of the latter mutex owner(s).
Signature · 1 line
[email protected]
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
In reply to Ingo MolnarQuoted 7 lines · Ingo Molnar
i have released the -V0.7.1 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this release is mainly a merge of -V0.6.9 to 2.6.10-rc2-mm2.
[snip]
I just wanted to tell you that my network problems with the e100 driver disappeared. I still get the BUG in enable_irq, but now the network works. I dunno if this is due to 2.6.10-rc2-mm2 fixes or your own fixes, but i'm now happy :)
I'm going to try this patch on a network game server, that's pretty latency demanding.
Regards,
Magnus
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 6 lines · Magnus Naeslund(t)
Quoted 5 lines · Ingo Molnar
i have released the -V0.7.1 Real-Time Preemption patch, which can be downloaded from:
Quoted 8 lines
Quoted 2 lines
this release is mainly a merge of -V0.6.9 to 2.6.10-rc2-mm2.
[snip]
I just wanted to tell you that my network problems with the e100 driver disappeared. I still get the BUG in
enable_irq, but now the network works. I dunno if this is due to 2.6.10-rc2-mm2 fixes or your own fixes, but i'm now happy :)
while doing the merge i noticed and removed an older hack i added to the e100 driver (and the rtl8139 driver) - possibly this could be related.
Ingo
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
In reply to Ingo MolnarQuoted 61 lines · Ingo Molnar
i have released the -V0.7.1 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this release is mainly a merge of -V0.6.9 to 2.6.10-rc2-mm2.
I havent done a proper changelog for a couple of days so here is a list of bigger changes since -V0.4:
- implemented a first version of the priority inheritance handling and priority inversion avoidance logic. This feature, after some initial stability problems, solved the jackd and
rtc_wakeuplatencies that were introduced by the ultra-finegrained locking in the -V series.(the -T/U series had a coarser locking scheme triggered much lower levels of priority inversion scenarios. The locking in the -V series was clearly the tipping point.)
The new PI code covers all synchronization objects in Linux (on
PREEMPT_REALTIME): spinlocks, rwlocks, semaphores and rwsems. Feedback on the design of this code would be welcome, and patches as well, if you have a better scheme. The code is pretty modular so feel free to experiment with alternative schemes.- completely reworked the debugging framework. All lock types (spinlocks, rwlocks, semaphores and rwsems) are now tracked, both their symbolic name and their place of acquire are traced and printed out upon detection of a deadlock. More and better information is printed upon a deadlock. Got rid of the 'semaphore owners array' in debugging mode, this reduces the footprint of semaphores quite significantly and speeds up deadlock detection.
- got rid of the separate 'counted semaphores' implementation, it was too intrusive. Made the core 'generic semaphores' implementation compatible with vanilla Linux counted semaphore semantics. This also enabled the unrolling of the completion-handling cleanups which, while being very nice, were getting intrusive as well.
- countless build and driver related reports/fixes from lots of people
- more latency breaks in the remaining critical sections. A particularly important one was the irqs-off latency bugfix from Thomas Gleixner.
- sped up the i8259 PIC and the PIT timer hardirq handling routines - these are now in the path of the longest latency.
- cleaned up IRQ and signal preemption - there were missed check-rescheds and possibilities for IRQ recursion.
- made ALSA's ioctl()s not use the BKL - this fixes more jackd latencies.
to create a -V0.7.1 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/v2.6/testing/patch-2.6.10-rc1.bz2
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/2.6.10-rc1-mm2.bz2
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.10-rc1-mm2-V0.7.1
Quoted 9 lines
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Hey,
I get a lock up with my wireless pcmcia cisco card. When i try to run to dhcpcd command or iwconfig it just hangs. Also when
i insert my card at boot time it hangs when running the net init scripts. I had this with version V0.7.8 and V0.7.10, have tested any other RT patches, i didn't have this problem with VP-T3. Also i can now mount and use my reiser4 partition.
Re: [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm2-V0.7.1
Quoted 7 lines
Quoted 4 lines · Ingo Molnar
- implemented a first version of the priority inheritance handling and priority inversion avoidance logic. This feature, after some initial stability problems, solved the jackd and
rtc_wakeuplatencies that were introduced by the ultra-finegrained locking in the -V series.
How does this play with Inaky's priority inheritance patch? Could they be combined somehow?
Chris
PATCH 1/1 Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.18
In reply to Ingo Molnari have released the -V0.7.18 Real-Time Preemption patch, which can be downloaded from:
http://redhat.com/~mingo/realtime-preempt/
this release includes fixes and cleanups.
Changes between -V0.7.12 and -V0.7.18:
- merged to 2.6.10-rc1-mm3
- fixed the e1000 xmit warnings reported by Amit Shah. Same fix for tg3 too.
- added irq-latency fix from Thomas Gleixner: re-enable interrupts before adding timings to the entropy pool.
- fixed excessive ksoftirqd overhead during outgoing TCP traffic. ksoftirqd kept getting re-woken while it had no way to progress.
- added upstream fix from Andi Kleen for the vmalloc bug causing module load problems/crashes. Added ipc/shm fix too.
Changes between -V0.7.1 and -V0.7.12:
- big source level cleanups: completely rearranged the mutex type definitions and source files, to make it reflect the code. Made all locking objects based on a new, central lock type: struct rt_mutex. This type is never exposed externally, it is internal to the RT code. Unified all the RT locking code in kernel/rt.c, this also simplified and sped things up. Undid collateral damage to the generic rwsem code - it is now untouched and independent of the RT code.
- rearranged the way spinlocks interact with the RT code and cleaned up the RT spinlock definitions. Found and fixed a bug in the process:
rwlocks were dropping the BKL upon contention.
- small x86 speedup: call __schedule not preempt_schedule_irq from work_resched.
- ported PREEMPT_RT to x64. This resulted in the generalization of some of the x86 changes.
- hopefully fixed fbcon kernel logging
- hacked reiser4 to make it work on PREEMPT_REALTIME.
- dropped the swap-layout-improvements patch. While it was working fine it's not necessary for latencies anymore under the PREEMPT_REALTIME approach, and the swap-patch was getting intrusive.
- fixed preemption-bug in drain_cpu_caches() on SMP [bug introduced by PREEMPT_REALTIME]
- new attempt at getting rid of the networking related deadlocks
- selinux deadlock fix and RCU-code conversion to RT semantics
to create a -V0.7.18 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/v2.6/testing/patch-2.6.10-rc1.bz2
http://kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm3/2.6.10-rc1-mm3.bz2
http://redhat.com/~mingo/realtime-preempt/realtime-preempt-2.6.10-rc1-mm3-V0.7.18
Ingo