Re: difference between realtime-kernel and low-latency-kernel?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Florian.
I understood nice to be an adjective, but I was questioning the word "low"; I see now you were referring to non-audio, so I understand.

I have two jackd scripts I use, one for Playback-only, and one for duplex using my Zoom H4 mic.  I have attached the scripts and their outputs from your script.  See anything I could improve?

Thanks.
-Chuckk

On 10/4/07, Florian Schmidt <mista.tapas@xxxxxxx> wrote:
On Thursday 04 October 2007, Chuckk Hubbard wrote:

> > Well, with a vanilla kernel you simply don't get the fine grained control
> > over
> > what code gets the cpu at what times as with a realtime-preemption
> > kernel..
> >
> > It is true that for many people a vanilla kernel with CONFIG_PREEMPT and
> > CONFIG_HZ=1000 delivers great performance, probably even better than
> > a "lowlatency" 2.4.x kernel. But basically one badly behaving kernel
> > driver
> > might cause delay, so for differing people the results differ. With a -rt
> > kernel you would just give this device a nice and low prio, so it doesn't
> > even get a chance to disturb the soundcard/jack..
>
> I'm a big fan of my rt-patched kernel; I'm also a big fan of taking out
> most of the distro's default stuff from the kernel.  One of these days I
> will compile an rt kernel with no network support even - my soundcard
> shares an IRQ with eth1, I don't know if this will help or not.
> But isn't it a nice and high prio?  As in, the chrt prio?  I understood
> this as different from the nice prio, no?  I may not be doing it correctly.
>  I set my soundcard IRQ to something like 70, jackd to something like 65,
> and Pd to something like 60.  The Pd GUI I set a little lower yet.  Do I
> also have to renice these apps?

Well forget the word "nice" in that sentence. It has nothing to do with nice
levels :) Nice levels are only relevant for SCHED_OTHER processes. Anyways,
if your e.g. hd controller device disturbs your audio device make sure you
give the audio device a high prio and the controller device a low prio. That
was what i meant..

And yes, i consider it a bug that top and other software report the SCHED_FIFO
prio as negative values. Where does that come from? Does the prio already get
listed as negative in /proc? Or do they simply do it to separate the
SCHED_FIFO threads from SCHED_OTHER threads? Anyways POSIX speaks of positive
SCHED_FIFO prios in the range 1..99 afaik..

> I get visible xruns but not audible so far.  I am guessing I have the wrong
> buffer sizes between Pd, Csound, and jackd...

No, i don't think so. If you use Pd and CSound as jack apps, then jack tells
them what buffer size to use. If one of these used the wrong size you would
definitely hear it..

Start jack and run this script and tell us the output please:

http://tapas.affenbande.org/rt-setup-report.sh

Thanks,
Flo

--
Palimm Palimm!
http://tapas.affenbande.org



--
http://www.badmuthahubbard.com

Attachment: jackd.sh
Description: Bourne shell script

Attachment: jackdup.sh
Description: Bourne shell script

chuckk@unclejesse:~$ ./rt-setup*
Hostname:
unclejesse

Kernel release info:
Linux unclejesse 2.6.22.1-acpi-cam #1 PREEMPT Wed Oct 3 22:49:48 EEST 2007 x86_64 GNU/Linux

PCI devices:
00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge (prog-if 00 [Normal decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        I/O behind bridge: 00009000-00009fff
        Memory behind bridge: c0100000-c01fffff
        Prefetchable memory behind bridge: 00000000c8000000-00000000cfffffff
        Capabilities: <access denied>

00:04.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=02, subordinate=04, sec-latency=0
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: c0200000-c02fffff
        Capabilities: <access denied>

00:05.0 PCI bridge: ATI Technologies Inc Unknown device 5a37 (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=05, subordinate=07, sec-latency=0
        Memory behind bridge: c0300000-c03fffff
        Capabilities: <access denied>

00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80) (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0004000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80) (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0005000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80) (prog-if 20 [EHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0006000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 83)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: 66MHz, medium devsel
        I/O ports at 8400 [size=16]
        Memory at fed00000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>

00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI (rev 80) (prog-if 82 [Master PriP])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 16
        I/O ports at 01f0 [size=8]
        I/O ports at 03f4 [size=1]
        I/O ports at 0170 [size=8]
        I/O ports at 0374 [size=1]
        I/O ports at 8410 [size=16]
        Capabilities: <access denied>

00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)
        Subsystem: ATI Technologies Inc SB450 HDA Audio
        Flags: bus master, slow devsel, latency 64, IRQ 16
        Memory at c0000000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80) (prog-if 01 [Subtractive decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=08, subordinate=0b, sec-latency=64
        I/O behind bridge: 00002000-00002fff
        Memory behind bridge: c0400000-c04fffff
        Prefetchable memory behind bridge: 50000000-53ffffff

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
        Flags: fast devsel
        Capabilities: <access denied>

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
        Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
        Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
        Flags: fast devsel
        Capabilities: <access denied>

01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M] (prog-if 00 [VGA])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 66, IRQ 10
        Memory at c8000000 (32-bit, prefetchable) [size=128M]
        I/O ports at 9000 [size=256]
        Memory at c0100000 (32-bit, non-prefetchable) [size=64K]
        [virtual] Expansion ROM at c0120000 [disabled] [size=128K]
        Capabilities: <access denied>

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8038 PCI-E Fast Ethernet Controller (rev 14)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at c0200000 (64-bit, non-prefetchable) [size=16K]
        I/O ports at a000 [size=256]
        Capabilities: <access denied>

05:00.0 Network controller: Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (rev 01)
        Subsystem: Broadcom Corporation Unknown device 0465
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at c0300000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

08:09.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 168, IRQ 20
        Memory at c0404000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=08, secondary=09, subordinate=0a, sec-latency=176
        Memory window 0: 50000000-53fff000 (prefetchable)
        Memory window 1: 54000000-57fff000
        I/O window 0: 00002000-000020ff
        I/O window 1: 00002400-000024ff
        16-bit legacy interface ports at 0001

08:09.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 64, IRQ 11
        Memory at c0405000 (32-bit, non-prefetchable) [size=2K]
        Memory at c0400000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

08:09.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 64, IRQ 20
        Memory at c0406000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>


Interrupts:
           CPU0       
  0:    7451384   IO-APIC-edge      timer
  1:      16910   IO-APIC-edge      i8042
  8:          0   IO-APIC-edge      rtc
 12:      91809   IO-APIC-edge      i8042
 14:      55194   IO-APIC-edge      ide0
 16:      17785   IO-APIC-fasteoi   eth1, HDA Intel
 17:     124946   IO-APIC-fasteoi   bcm43xx
 19:      41988   IO-APIC-fasteoi   ohci_hcd:usb1, ohci_hcd:usb2, ehci_hcd:usb3
 20:          1   IO-APIC-fasteoi   yenta, tifm_7xx1
 21:       3228   IO-APIC-fasteoi   acpi
NMI:          0 
LOC:    7451277 
ERR:          0

Irq handler priorities:
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.03 ksoftirqd/0        

Jackd priorities:
 4114 chuckk   -81   0 38116  21m 3796 S  0.0  2.4   0:00.00 jackd              
 4115 chuckk   -71   0 38116  21m 3796 S  0.0  2.4   0:00.05 jackd              
 4113 chuckk    18   0 38116  21m 3796 S  0.0  2.4   0:00.00 jackd              
 4109 chuckk    19   0 38116  21m 3796 S  0.0  2.4   0:00.01 jackd              
 4112 chuckk    19   0 38116  21m 3796 S  0.0  2.4   0:00.00 jackd              

Sound cards:
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xc0000000 irq 16
 1 [VirMIDI        ]: VirMIDI - VirMIDI
                      Virtual MIDI Card 1

Sound devices:
  0: [ 0]   : control
  1:        : sequencer
 16: [ 0- 0]: digital audio playback
 22: [ 0- 6]: digital audio playback
 24: [ 0- 0]: digital audio capture
 30: [ 0- 6]: digital audio capture
 32: [ 1]   : control
 33:        : timer
 40: [ 1- 0]: raw midi
 41: [ 1- 1]: raw midi
 42: [ 1- 2]: raw midi
 43: [ 1- 3]: raw midi
chuckk@unclejesse:~$ ./rt-setup*
Hostname:
unclejesse

Kernel release info:
Linux unclejesse 2.6.22.1-acpi-cam #1 PREEMPT Wed Oct 3 22:49:48 EEST 2007 x86_64 GNU/Linux

PCI devices:
00:00.0 Host bridge: ATI Technologies Inc RS480 Host Bridge (rev 10)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64

00:01.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge (prog-if 00 [Normal decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
        I/O behind bridge: 00009000-00009fff
        Memory behind bridge: c0100000-c01fffff
        Prefetchable memory behind bridge: 00000000c8000000-00000000cfffffff
        Capabilities: <access denied>

00:04.0 PCI bridge: ATI Technologies Inc RS480 PCI Bridge (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=02, subordinate=04, sec-latency=0
        I/O behind bridge: 0000a000-0000afff
        Memory behind bridge: c0200000-c02fffff
        Capabilities: <access denied>

00:05.0 PCI bridge: ATI Technologies Inc Unknown device 5a37 (prog-if 00 [Normal decode])
        Flags: bus master, fast devsel, latency 0
        Bus: primary=00, secondary=05, subordinate=07, sec-latency=0
        Memory behind bridge: c0300000-c03fffff
        Capabilities: <access denied>

00:13.0 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80) (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0004000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:13.1 USB Controller: ATI Technologies Inc IXP SB400 USB Host Controller (rev 80) (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0005000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:13.2 USB Controller: ATI Technologies Inc IXP SB400 USB2 Host Controller (rev 80) (prog-if 20 [EHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19
        Memory at c0006000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>

00:14.0 SMBus: ATI Technologies Inc IXP SB400 SMBus Controller (rev 83)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: 66MHz, medium devsel
        I/O ports at 8400 [size=16]
        Memory at fed00000 (32-bit, non-prefetchable) [size=1K]
        Capabilities: <access denied>

00:14.1 IDE interface: ATI Technologies Inc Standard Dual Channel PCI IDE Controller ATI (rev 80) (prog-if 82 [Master PriP])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 16
        I/O ports at 01f0 [size=8]
        I/O ports at 03f4 [size=1]
        I/O ports at 0170 [size=8]
        I/O ports at 0374 [size=1]
        I/O ports at 8410 [size=16]
        Capabilities: <access denied>

00:14.2 Audio device: ATI Technologies Inc SB450 HDA Audio (rev 01)
        Subsystem: ATI Technologies Inc SB450 HDA Audio
        Flags: bus master, slow devsel, latency 64, IRQ 16
        Memory at c0000000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

00:14.3 ISA bridge: ATI Technologies Inc IXP SB400 PCI-ISA Bridge (rev 80)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge: ATI Technologies Inc IXP SB400 PCI-PCI Bridge (rev 80) (prog-if 01 [Subtractive decode])
        Flags: bus master, 66MHz, medium devsel, latency 64
        Bus: primary=00, secondary=08, subordinate=0b, sec-latency=64
        I/O behind bridge: 00002000-00002fff
        Memory behind bridge: c0400000-c04fffff
        Prefetchable memory behind bridge: 50000000-53ffffff

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
        Flags: fast devsel
        Capabilities: <access denied>

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
        Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
        Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
        Flags: fast devsel
        Capabilities: <access denied>

01:05.0 VGA compatible controller: ATI Technologies Inc RS482 [Radeon Xpress 200M] (prog-if 00 [VGA])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, 66MHz, medium devsel, latency 66, IRQ 10
        Memory at c8000000 (32-bit, prefetchable) [size=128M]
        I/O ports at 9000 [size=256]
        Memory at c0100000 (32-bit, non-prefetchable) [size=64K]
        [virtual] Expansion ROM at c0120000 [disabled] [size=128K]
        Capabilities: <access denied>

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8038 PCI-E Fast Ethernet Controller (rev 14)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, fast devsel, latency 0, IRQ 16
        Memory at c0200000 (64-bit, non-prefetchable) [size=16K]
        I/O ports at a000 [size=256]
        Capabilities: <access denied>

05:00.0 Network controller: Broadcom Corporation Dell Wireless 1390 WLAN Mini-PCI Card (rev 01)
        Subsystem: Broadcom Corporation Unknown device 0465
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Memory at c0300000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

08:09.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 168, IRQ 20
        Memory at c0404000 (32-bit, non-prefetchable) [size=4K]
        Bus: primary=08, secondary=09, subordinate=0a, sec-latency=176
        Memory window 0: 50000000-53fff000 (prefetchable)
        Memory window 1: 54000000-57fff000
        I/O window 0: 00002000-000020ff
        I/O window 1: 00002400-000024ff
        16-bit legacy interface ports at 0001

08:09.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller (prog-if 10 [OHCI])
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 64, IRQ 11
        Memory at c0405000 (32-bit, non-prefetchable) [size=2K]
        Memory at c0400000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>

08:09.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
        Subsystem: Gateway 2000 Unknown device 0367
        Flags: bus master, medium devsel, latency 64, IRQ 20
        Memory at c0406000 (32-bit, non-prefetchable) [size=4K]
        Capabilities: <access denied>


Interrupts:
           CPU0       
  0:    7644552   IO-APIC-edge      timer
  1:      17700   IO-APIC-edge      i8042
  8:          0   IO-APIC-edge      rtc
 12:      92901   IO-APIC-edge      i8042
 14:      57175   IO-APIC-edge      ide0
 16:      50495   IO-APIC-fasteoi   eth1, HDA Intel
 17:     130474   IO-APIC-fasteoi   bcm43xx
 19:      57163   IO-APIC-fasteoi   ohci_hcd:usb1, ohci_hcd:usb2, ehci_hcd:usb3
 20:          1   IO-APIC-fasteoi   yenta, tifm_7xx1
 21:       3310   IO-APIC-fasteoi   acpi
NMI:          0 
LOC:    7644445 
ERR:          0

Irq handler priorities:
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.03 ksoftirqd/0        

Jackd priorities:
 4186 chuckk   -81   0 37876  21m 3556 S  0.0  2.4   0:00.00 jackd              
 4187 chuckk   -71   0 37876  21m 3556 S  4.0  2.4   0:00.06 jackd              
 4178 chuckk    17   0 10684 1524 1064 S  0.0  0.2   0:00.00 jackdup.sh         
 4184 chuckk    18   0 37876  21m 3556 S  0.0  2.4   0:00.00 jackd              
 4182 chuckk    21   0 37876  21m 3556 S  0.0  2.4   0:00.01 jackd              
 4183 chuckk    21   0 37876  21m 3556 S  0.0  2.4   0:00.00 jackd              

Sound cards:
 0 [SB             ]: HDA-Intel - HDA ATI SB
                      HDA ATI SB at 0xc0000000 irq 16
 1 [VirMIDI        ]: VirMIDI - VirMIDI
                      Virtual MIDI Card 1
 2 [H4             ]: USB-Audio - H4
                      ZOOM Corporation H4 at usb-0000:00:13.1-2, full speed

Sound devices:
  0: [ 0]   : control
  1:        : sequencer
 16: [ 0- 0]: digital audio playback
 22: [ 0- 6]: digital audio playback
 24: [ 0- 0]: digital audio capture
 30: [ 0- 6]: digital audio capture
 32: [ 1]   : control
 33:        : timer
 40: [ 1- 0]: raw midi
 41: [ 1- 1]: raw midi
 42: [ 1- 2]: raw midi
 43: [ 1- 3]: raw midi
 64: [ 2]   : control
 80: [ 2- 0]: digital audio playback
 88: [ 2- 0]: digital audio capture
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user

[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux