Frequently Asked Questions

From RTwiki
(Difference between revisions)
Jump to: navigation, search
(Section 2 - Architecture questions)
Line 131: Line 131:
  
 
==Section 3 - Mailing list questions==
 
==Section 3 - Mailing list questions==
'''Q1:''' realtime mailing list and archives
+
'''Q1:''' ''realtime mailing list and archives''
  
 
'''A1:''' http://www.mail-archive.com/linux-rt-users@vger.kernel.org/
 
'''A1:''' http://www.mail-archive.com/linux-rt-users@vger.kernel.org/
  
'''Q2:''' If I have some doubts or problems regarding realtime, do I need to send mail in realtime mailing list or linux kernel mailing list or both
+
'''Q2:''' ''If I have some doubts or problems regarding realtime, do I need to send mail in realtime mailing list or linux kernel mailing list or both''
  
 
'''A2:'''
 
'''A2:'''
Line 141: Line 141:
 
==Section 4 - Realtime Patches questions==
 
==Section 4 - Realtime Patches questions==
  
'''Q1:''' Why I need to download realtime patches, If realtime support is in Linux kernel
+
'''Q1:''' ''Why I need to download realtime patches, If realtime support is in Linux kernel''
  
 
'''A1:'''
 
'''A1:'''
  
'''Q2:''' Download latest realtime patches
+
'''Q2:''' ''Download latest realtime patches''
  
 
'''A2:''' http://www.kernel.org/pub/linux/kernel/projects/rt/
 
'''A2:''' http://www.kernel.org/pub/linux/kernel/projects/rt/
  
'''Q3:''' Where can I post my realtime patches
+
'''Q3:''' ''Where can I post my realtime patches''
  
 
'''A3:''' Please send patches for the CONFIG_PREEMPT_RT Patch Set to LKML and put Ingo Molnar and Thomas Gleixner on CC.  
 
'''A3:''' Please send patches for the CONFIG_PREEMPT_RT Patch Set to LKML and put Ingo Molnar and Thomas Gleixner on CC.  
Line 157: Line 157:
 
==Section 5 - Configuring/compiling questions==
 
==Section 5 - Configuring/compiling questions==
  
'''Q1:''' How to enable/disable realtime support
+
'''Q1:''' ''How to enable/disable realtime support''
  
 
'''A1:'''
 
'''A1:'''
  
'''Q2:''' Change realtime support run time or statically
+
'''Q2:''' ''Change realtime support run time or statically''
  
 
'''A2:'''
 
'''A2:'''
  
'''Q3:''' Required parameters for configuring realtime kernel
+
'''Q3:''' ''Required parameters for configuring realtime kernel''
  
 
'''A3:'''
 
'''A3:'''
  
'''Q4:''' Optional parameters for configuring realtime kernel, but they effect realtime performance
+
'''Q4:''' ''Optional parameters for configuring realtime kernel, but they effect realtime performance''
  
 
'''A4:'''
 
'''A4:'''
Line 175: Line 175:
 
==Section 6 - Realtime samples/Performance questions==
 
==Section 6 - Realtime samples/Performance questions==
  
'''Q1:''' What effects by realtime support and how much and samples to test it and who maintains these samples
+
'''Q1:''' ''What effects by realtime support and how much and samples to test it and who maintains these samples''
  
a. scheduling, task switching time
+
''a. scheduling, task switching time
  
 
b. Interrupt latency
 
b. Interrupt latency
Line 189: Line 189:
 
f. Network
 
f. Network
  
g. X-Windows
+
g. X-Windows''
  
 
'''A1:'''
 
'''A1:'''
Line 214: Line 214:
 
==Section 7 - Realtime Applications questions==
 
==Section 7 - Realtime Applications questions==
  
'''Q1:''' List of realtime APIs
+
'''Q1:''' ''List of realtime APIs''
  
 
'''A1:'''
 
'''A1:'''
  
'''Q2:''' How to write realtime applications
+
'''Q2:''' ''How to write realtime applications''
  
 
'''A2:'''
 
'''A2:'''
  
'''Q3:''' Which programming languages are suitable for writing realtime applications
+
'''Q3:''' ''Which programming languages are suitable for writing realtime applications''
  
 
'''A3:'''
 
'''A3:'''
  
'''Q4:''' Keep following things in mind while writing realtime applications
+
'''Q4:''' ''Keep following things in mind while writing realtime applications''
  
 
'''A4:''' Taking care of the following during the initial startup phase:  
 
'''A4:''' Taking care of the following during the initial startup phase:  
Line 235: Line 235:
  
  
'''Q5:''' Do I need to recompile my applications to get realtime performance
+
'''Q5:''' ''Do I need to recompile my applications to get realtime performance''
  
 
'''A5:'''
 
'''A5:'''
Line 241: Line 241:
 
==Section 8 - Maintainers questions==
 
==Section 8 - Maintainers questions==
  
'''Q1:''' Maintainers of realtime kernel patch
+
'''Q1:''' ''Maintainers of realtime kernel patch''
  
 
'''A1:'''
 
'''A1:'''

Revision as of 15:50, 29 September 2007

Contents

Intro

Author

Questions are given by:

Jaswinder Singh

Answers are given by:

Luotao Fu (l.fu AT pengutronix DOT de), Pengutronix e.K., Kernel Development Group
Robert Schwebel (r.schwebel AT pengutronix DOT de), Pengutronix e.K., Kernel Development Group
Remy Bohmer

Revision

Revision History
Revision 1 2007-09-29
Draft / Work in progress

Abstract

FAQ for realtime support in Linux Kernel

Sections

Question Index

1. Realtime Support questions

2. Architecture questions

3. Mailing list questions

4. Realtime Patches questions

5. Configuring/compiling questions

6. Realtime samples/Performance questions

7. Realtime Applications questions

8. Maintainers questions

Section 1 - Realtime Support questions

Q1: What is realtime support

A1:

Q2: How realtime works

A2: The RT-Preempt patch converts Linux into a fully preemptible kernel. The magic is done with:

  • Making in-kernel locking-primitives (using spinlocks) preemptible though reimplementation with rtmutexes:
  • Critical sections protected by i.e. spinlock_t and rwlock_t are now preemptible. The creation of non-preemptible sections (in kernel) is still possible with raw_spinlock_t (same APIs like spinlock_t)
  • Implementing priority inheritance for in-kernel spinlocks and semaphores. For more information on priority inversion and priority inheritance please consult Introduction to Priority Inversion
  • Converting interrupt handlers into preemptible kernel threads: The RT-Preempt patch treats soft interrupt handlers in kernel thread context, which is represented by a task_struct like a common userspace process. However it is also possible to register an IRQ in kernel context.
  • Converting the old Linux timer API into separate infrastructures for high resolution kernel timers plus one for timeouts, leading to userspace POSIX timers with high resolution.

Q3: What is the procedure to add realtime support

A3: Download latest realtime preemption patch from http://www.kernel.org/pub/linux/kernel/projects/rt/ then get related vanilla kernel from http://kernel.org/ then patch, configure and compile

Section 2 - Architecture questions

Q1: Which Architecture are supporting realtime and who is maintainer

A1:

Processor Supported Contact(s)
alpha
arm
arm26
avr32
blackfin
cris
frv
h8300
i386 Yes
ia64
m32r
m86k
m68knommu
mips
parisc
powerpc
ppc
s390
sh
sh64
sparc
sparc64
um
v850
x86_64
xtensa


Q2: What is the procedure to support realtime in new architecture

A2:

Section 3 - Mailing list questions

Q1: realtime mailing list and archives

A1: http://www.mail-archive.com/linux-rt-users@vger.kernel.org/

Q2: If I have some doubts or problems regarding realtime, do I need to send mail in realtime mailing list or linux kernel mailing list or both

A2:

Section 4 - Realtime Patches questions

Q1: Why I need to download realtime patches, If realtime support is in Linux kernel

A1:

Q2: Download latest realtime patches

A2: http://www.kernel.org/pub/linux/kernel/projects/rt/

Q3: Where can I post my realtime patches

A3: Please send patches for the CONFIG_PREEMPT_RT Patch Set to LKML and put Ingo Molnar and Thomas Gleixner on CC.

Please do not send clocksource and clockevents related patches against the -rt patch. Make sure they apply against the latest -hrt-dyntick patch. -hrt-dyntick might be a bit ahead of -rt at times, but the -rt patch pulls -hrt-dyntick on a regular base.

Section 5 - Configuring/compiling questions

Q1: How to enable/disable realtime support

A1:

Q2: Change realtime support run time or statically

A2:

Q3: Required parameters for configuring realtime kernel

A3:

Q4: Optional parameters for configuring realtime kernel, but they effect realtime performance

A4:

Section 6 - Realtime samples/Performance questions

Q1: What effects by realtime support and how much and samples to test it and who maintains these samples

a. scheduling, task switching time

b. Interrupt latency

c. Interprocess communication

d. Filesystem

e. Device drivers

f. Network

g. X-Windows

A1:

Area Effected by Realtime(%) Samples Contact(s)
scheduling
Interrupt latency
IPC
Filesystem
Device drivers
Network
X-Windows

Section 7 - Realtime Applications questions

Q1: List of realtime APIs

A1:

Q2: How to write realtime applications

A2:

Q3: Which programming languages are suitable for writing realtime applications

A3:

Q4: Keep following things in mind while writing realtime applications

A4: Taking care of the following during the initial startup phase:

  • Call directly from the main() entry the mlockall() call.
  • Create all threads at startup time of the application, and touch each page of the entire stack of each thread. Never start threads dynamically during RT show time, this will ruin RT behavior.
  • Never use system calls that are known to generate pagefaults, such as fopen(). (Opening of files does the mmap() system call, which generates a page-fault).
  • Do not use 'compile time static arrays' without initializing them directly after startup, before RT show time.


Q5: Do I need to recompile my applications to get realtime performance

A5:

Section 8 - Maintainers questions

Q1: Maintainers of realtime kernel patch

A1:

Personal tools