2. A system is said to be real-time if the total
correctness of an operation depends not
only upon its logical correctness, but also
upon the time in which it is performed.
What is a Real-Time System?
3. Hard – missing a deadline is a total system
failure.
Types of Real-Time Systems
Soft – the usefulness of a result degrades
after its deadline, thereby degrading the
system's quality of service.
9. PREEMPT_RT patch
●Implementation of Concurrent Worker Queues.
●spinlock_t and rwlock_t : In RT linux, they are preemptible.
Therefore ensuring that critical sections are preemptible. It’s also
possible to create non-preemptible versions using
raw_spinlock_t
●Converting interrupt handlers into preemptible kernel threads.
●Implement priority-inheritance for in-kernel spinlocks and
semaphores to avoid priority inversion. Default linux doesn’t
support it.
11. Challenges
RT Patch that we used
was generated on
mainline linux codebase
(Codebase1)
Patch to be applied on
Dragonboard kernel with SoC
specific changes
(Codebase2)
Plus the codebase2 has
Android modifications on
linux kernel
Plus the codebase2
backported some changes
from linux 3.6 to linux 3.4
Merge Conflict
12. Challenges post solving merge conflicts
Adding changes introduced by RT patch to SoC specific drivers.
For example: GPU driver (msm_kgsl)
Fixing any build errors for various Preemption models.
14. No Forced Preemption
CONFIG_PREEMPT_NONE:
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the time, but
there are no guarantees and occasional longer delays are possible.
15. Voluntary Kernel Preemption
CONFIG_PREEMPT_VOLUNTARY:
This option reduces the latency of the kernel by adding more
"explicit preemption points" to the kernel code. These new
preemption points have been selected to reduce the maximum
latency of rescheduling, providing faster application reactions,
at the cost of slightly lower throughput.
16. Preemptible Kernel (Low latency)
CONFIG_PREEMPT__LL:
This option reduces the latency of the kernel by making all kernel
code (that is not executing in a critical section) preemptible.
17. Preemptible Kernel (Basic RT)
CONFIG_PREEMPT_RTB:
This option is basically the same as (Low-Latency Desktop) but
enables changes which are preliminary for the full preemptiple RT
kernel.