linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-9
@ 2004-11-23 19:24 Mark_H_Johnson
  2004-11-23 19:50 ` Adam Heath
  0 siblings, 1 reply; 16+ messages in thread
From: Mark_H_Johnson @ 2004-11-23 19:24 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	K.R. Foley, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Karsten Wiese, Gunther Persoons, emann, Shane Shrybman,
	Amit Shah, Esben Nielsen

>i have released the -V0.7.30-9 Real-Time Preemption patch,

The profile script (5 second wait, dump data if wait > 10 seconds) was
stuck for over 300 seconds & when it woke up there were 34 jobs waiting
to run. A couple excerpts from the data [will send that separately].
This was with -V0.7.30-7 (PREEMPT_RT) running latencytest & I believe
the disk write test (comparing date/time modified of log files...) plus
a pair of data collecting scripts.

Don't know if this is the journaling problem you mention being fixed
in -9 or not. This huge delay did not recur with the disk copy test.

The odd data point I notice here was the nearly 100% cpu time for
the shell script get_ltrace.sh which is...

#!/bin/sh

let MAX=`cat /proc/sys/kernel/preempt_max_latency`
let I=0 J=1
let MP=${1:-1000}
echo "Current Maximum is $MAX, limit will be $MP."
while (( I < 100 )) ; do
    sleep 1s
    let NOW=`cat /proc/sys/kernel/preempt_max_latency`
    if (( MAX != NOW )) ; then
        echo "New trace $I w/ $NOW usec latency."
        cat /proc/latency_trace > lt.`printf "%02d" $I`
        sync ; sync
        let I++
        let MAX=NOW
    elif (( J++ >= 10 )) ; then
        if (( MAX != MP )) ; then
            echo "Resetting max latency from $MAX to $MP."
            echo $MP > /proc/sys/kernel/preempt_max_latency
            let MAX=$MP
        else
            echo "No new latency samples at `date`."
        fi
        let J=1
# else do nothing...
    fi
done

Perhaps the sync caused the 100% CPU usage for the moment (but certainly
not for five minutes!). It is however suspicious that the total run time
for that script (5:33) is very close to the delay time (336 seconds) for
the profile script. Both of these run at RT FIFO priority 1. There is also
a 5 minute gap in the files generated by get_ltrace.sh as well.

--Mark

--- excerpts follow ---

Tue Nov 23 12:40:48 CST 2004
336 seconds elapsed time.
Load Average ->
36.00 24.57 12.44 36/125 8600

Tasks in RUN state...

                        PID PRI RTPRIO  NI S     TIME %CPU CMD
041123-01/prof002.txt:    1  23      -   0 R 00:00:04  0.1 init [5]
041123-01/prof002.txt:    5  34      - -10 R 00:00:00  0.0 [desched/0]
041123-01/prof002.txt:    8  34      - -10 R 00:00:00  0.0 [desched/1]
041123-01/prof002.txt:  100  24      -   0 R 00:00:00  0.0 [pdflush]
041123-01/prof002.txt:  310  24      -   0 R 00:00:00  0.0 [kirqd]
041123-01/prof002.txt:  320  24      -   0 R 00:00:02  0.1 [kjournald]
041123-01/prof002.txt: 1208  23      -   0 R 00:00:03  0.1 [kjournald]
041123-01/prof002.txt: 1803  23      -   0 R 00:00:00  0.0 /sbin/dhclient
-1 -q -lf /var/lib/dhcp/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid
-cf /etc/dhclient-eth0.conf eth0
041123-01/prof002.txt: 1838  23      -   0 R 00:00:00  0.0 syslogd -m 0
041123-01/prof002.txt: 1909  23      -   0 R 00:00:00  0.0 rpc.idmapd
041123-01/prof002.txt: 2040  23      -   0 R 00:00:18  0.7 /usr/sbin/nscd
041123-01/prof002.txt: 2072  23      -   0 R 00:00:02  0.0 cupsd
041123-01/prof002.txt: 2361  23      -   0 R 00:00:00  0.0 ntpd -U ntp -p
/var/run/ntpd.pid
041123-01/prof002.txt: 2381  23      -   0 R 00:00:00  0.0
/usr/local/nagios/sbin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
041123-01/prof002.txt: 2400  23      -   0 R 00:00:00  0.0 sendmail:
accepting connections
041123-01/prof002.txt: 2426  23      -   0 R 00:00:00  0.0 gpm -m
/dev/input/mice -t imps2
041123-01/prof002.txt: 2551  23      -   0 R 00:00:00  0.0 crond
041123-01/prof002.txt: 2574  23      -   0 R 00:00:00  0.0 xfs -droppriv
-daemon
041123-01/prof002.txt: 2593  23      -   0 R 00:00:00  0.0 /usr/sbin/atd
041123-01/prof002.txt: 2911  23      -   0 R 00:00:00  0.0
/usr/bin/ssh-agent /home/u21305/.Xclients
041123-01/prof002.txt: 2944  23      -   0 R 00:00:00  0.0 kdeinit:
klauncher
041123-01/prof002.txt: 2947  24      -   0 R 00:00:02  0.1 kdeinit: kded
041123-01/prof002.txt: 3174  24      -   0 R 00:00:03  0.1 kdeinit: knotify
041123-01/prof002.txt: 3196  23      -   0 R 00:00:00  0.0 kwrapper
ksmserver
041123-01/prof002.txt: 3201  23      -   0 R 00:00:02  0.0 kdeinit:
kdesktop
041123-01/prof002.txt: 3203  24      -   0 R 00:00:18  0.7 kdeinit: kicker
041123-01/prof002.txt: 3216  23      -   0 R 00:00:00  0.0
/sbin/pam_timestamp_check -d root
041123-01/prof002.txt: 3220  23      -   0 R 00:00:11  0.4 kdeinit: konsole
-session 11c034d757000106674694500000017150004_1101232254_900758
041123-01/prof002.txt: 3624  41      1   0 R 00:00:04  0.2 /bin/sh
./getlog.sh
041123-01/prof002.txt: 3782   4      -  10 R 00:20:05 68.5 ./cpu_burn
041123-01/prof002.txt: 6030  23      -   0 R 00:00:01  0.1
/usr/bin/kdesktop_lock
041123-01/prof002.txt: 8497  21      -   0 R 00:00:06  1.6 head -c
750000000 /dev/zero
041123-01/prof002.txt: 8594  70      1   0 R 00:05:33 99.9 /bin/sh
./get_ltrace.sh 100


^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-9
@ 2004-11-23 18:06 Mark_H_Johnson
  2004-11-23 21:15 ` Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Mark_H_Johnson @ 2004-11-23 18:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Lee Revell, Rui Nuno Capela, Mark_H_Johnson,
	K.R. Foley, Bill Huey, Adam Heath, Florian Schmidt,
	Thomas Gleixner, Michal Schmidt, Fernando Pablo Lopez-Lezcano,
	Karsten Wiese, Gunther Persoons, emann, Shane Shrybman,
	Amit Shah, Esben Nielsen

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

Grr. Had downloaded -V0.7.30-7 and was building when this message came in.

I do have a repeatable problem with -7 however (not yet checked in -9).
This
was with PREEMPT_DESKTOP and unthreaded IRQ's (hard and soft). As I look
at the .config differences, also enabled in 7PK (and not 7RT) was
  CONFIG_ASM_SEMAPHORES=y
  CONFIG_RWSEM_XCHGADD_ALGORITHM=y
and enabled in 7RT (and not 7PK) was
  CONFIG_RT_DEADLOCK_DETECT=y
I should also note that I applied a patch for NMI profiling in my build
as well (but not sure that caused the problem).

The system dies early in the boot process. Locks up and completely not
responsive and no error messages prior to failure. Serial console output
follows at the end of this email.

The PREEMPT_RT kernel I built (same source, only difference was previously
described .config changes) comes up OK.
  --Mark

--- first attempt ---

Linux version 2.6.10-rc2-mm2-V0.7.30-7PK (root@dws77) (gcc version 3.3.3
20040412 (Red Hat Linux 3.3.3-7)) #2 SMP Tue Nov 23 10:58:11 CST 2004
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
 BIOS-e820: 000000001fff0000 - 000000001fff8000 (ACPI data)
 BIOS-e820: 000000001fff8000 - 0000000020000000 (ACPI NVS)
 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
511MB LOWMEM available.
found SMP MP-table at 000fb170
DMI 2.3 present.
Using APIC driver default
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:8 APIC version 17
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:8 APIC version 17
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.1
    Virtual Wire compatibility mode.
OEM ID: VIA      Product ID: VT3075       APIC at: 0xFEE00000
I/O APIC #2 Version 17 at 0xFEC00000.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Processors: 2
Built 1 zonelists
Initializing CPU#0
Kernel command line: ro root=LABEL=/ nmi_watchdog=1 single
console=ttyS0,38400n8r profile=2
kernel CPU profiling enabled
kernel profiling shift: 2
PID hash table entries: 2048 (order: 11, 32768 bytes)
Detected 864.162 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25

--- second attempt ---

Linux version 2.6.10-rc2-mm2-V0.7.30-7PK (root@dws77) (gcc version 3.3.3
20040412 (Red Hat Linux 3.3.3-7)) #2 SMP Tue Nov 23 10:58:11 CST 2004
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000001fff0000 (usable)
 BIOS-e820: 000000001fff0000 - 000000001fff8000 (ACPI data)
 BIOS-e820: 000000001fff8000 - 0000000020000000 (ACPI NVS)
 BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
511MB LOWMEM available.
found SMP MP-table at 000fb170
DMI 2.3 present.
Using APIC driver default
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
Processor #0 6:8 APIC version 17
ACPI: LAPIC (acpi_id[0x02] lapic_id[0x01] enabled)
Processor #1 6:8 APIC version 17
Using ACPI for processor (LAPIC) configuration information
Intel MultiProcessor Specification v1.1
    Virtual Wire compatibility mode.
OEM ID: VIA      Product ID: VT3075       APIC at: 0xFEE00000
I/O APIC #2 Version 17 at 0xFEC00000.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
Processors: 2
Built 1 zonelists
Initializing CPU#0
Kernel command line: ro root=LABEL=/ nmi_watchdog=1 single
console=ttyS0,38400n8r profile=2
kernel CPU profiling enabled
kernel profiling shift: 2
PID hash table entries: 2048 (order: 11, 32768 bytes)
Detected 864.157 MHz processor.
Using tsc for high-res timesource
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 511160k/524224k available (2236k kernel code, 12524k reserved, 634k
data, 236k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode...
Ok.
Security Framework v1.0.0 initialized
SELinux:  Initializing.
SELinux:  Starting in permissive mode
selinux_register_security:  Registering secondary module capability
Capability LSM initialized as secondary
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 256K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support...


^ permalink raw reply	[flat|nested] 16+ messages in thread
* [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.23
@ 2004-11-09 16:05 Ingo Molnar
  2004-11-11 14:44 ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.25-0 Ingo Molnar
  0 siblings, 1 reply; 16+ messages in thread
From: Ingo Molnar @ 2004-11-09 16:05 UTC (permalink / raw)
  To: linux-kernel
  Cc: Lee Revell, Rui Nuno Capela, Mark_H_Johnson, K.R. Foley,
	Bill Huey, Adam Heath, Florian Schmidt, Thomas Gleixner,
	Michal Schmidt, Fernando Pablo Lopez-Lezcano, Karsten Wiese,
	Gunther Persoons, emann, Shane Shrybman, Amit Shah


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

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

this release includes fixes, development/debugging improvements and
latency improvements and other speedups.

the biggest change is the reworked timing/tracing framework. Wakeup
timing became a compile-time thing and can be selected independently of
the preemption mode - i.e. it can now be used on near-vanilla !PREEMPT
kernels too, providing good wakeup-latency comparison of the various
preemption models.

irqs-off and preempt-off critical section timing/tracing can be selected
if wakeup timing is disabled, the two options can be selected separately
or together as well.

another improvement is that wakeup-timing now works correctly on SMP too
- the tracer 'follows' the highest-priority task in the system as it
gets bounced between CPUs and always traces the CPU where the task is
pending.

other changes since -V0.7.22:

 - semaphore livelock fix: feedback from Mark H. Johnson pinpointed a 
   bug in the down_trylock() semaphore code: if preempted in the wrong
   moment a lower-prio task could cause a higher-prio task to livelock
   indefinitely. This fix could solve the 'keventd looping' problem 
   reported by Mark.

   the fix is to make the down_trylock() code a bit simpler, but this
   also introduces the potential for down_trylock() to get 'spurious' 
   locking-rejects. Hopefully this wont be a big problem - we dont 
   really guarantee that down_trylock() succeeds - but code using higher
   semaphore counts to track resources could be negatively impacted by
   this. We'll see.

 - console assert fix: implemented a different type of fbcon
   RT-preemption handling variant, this could solve the assert reported
   by Amit Shah.

 - debugging improvement: implemented a sequence counter for max latency 
   traces. This has the advantage of solving the 'slow console on SMP
   problem': the latency-timing code used to get confused by another CPU 
   printing a timing message to a slow console and thus delaying that 
   other CPU. Now any latency that gets generated while a maximum is 
   printed is skipped.

 - further shrunk the non-debug size of struct rt_mutex by moving the 
   save_state logic into the debug paths - size is now 4 machine-words.

 - fixed CONFIG_HIGHMEM latencies: all atomic-kmap APIs are now wrapped 
   seemlessly and in a preemptible way.

 - implemented an IO-APIC register cache to speed up the IRQ-redirection
   latency hotpath. Also, made the POST flush a bit faster.

 - disable KGDB if PREEMPT_RT - it's broken for now.

 - move some runtime checks to under DEBUG_PREEMPT - this speeds up 
   CRITICAL_PREEMPT_TIMING.

to create a -V0.7.23 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.23

	Ingo

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

end of thread, other threads:[~2004-11-24 23:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-23 19:24 [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-9 Mark_H_Johnson
2004-11-23 19:50 ` Adam Heath
  -- strict thread matches above, loose matches on Subject: below --
2004-11-23 18:06 Mark_H_Johnson
2004-11-23 21:15 ` Ingo Molnar
2004-11-09 16:05 [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.23 Ingo Molnar
2004-11-11 14:44 ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.25-0 Ingo Molnar
2004-11-11 21:51   ` [patch] Real-Time Preemption, -RT-2.6.10-rc1-mm3-V0.7.25-1 Ingo Molnar
2004-11-16 12:54     ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.27-0 Ingo Molnar
2004-11-16 13:09       ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.27-1 Ingo Molnar
2004-11-16 13:40         ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.27-3 Ingo Molnar
2004-11-17 12:42           ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.28-0 Ingo Molnar
2004-11-18 12:35             ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm1-V0.7.28-1 Ingo Molnar
2004-11-18 16:46               ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.29-0 Ingo Molnar
2004-11-22  0:54                 ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-2 Ingo Molnar
2004-11-23 17:58                   ` [patch] Real-Time Preemption, -RT-2.6.10-rc2-mm2-V0.7.30-9 Ingo Molnar
2004-11-23 17:53                     ` K.R. Foley
2004-11-23 18:01                     ` K.R. Foley
2004-11-24  0:28                     ` Florian Schmidt
2004-11-24  3:19                       ` Ingo Molnar
2004-11-24  2:48                         ` Florian Schmidt
2004-11-24  0:58                     ` Lee Revell
2004-11-24  3:45                       ` Ingo Molnar
2004-11-24 13:33                         ` Steven Rostedt
2004-11-24 19:23                     ` Fernando Lopez-Lezcano
2004-11-24 22:17                       ` Ingo Molnar
2004-11-24 21:56                         ` Fernando Lopez-Lezcano

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