Preemption Test

From RTwiki
(Difference between revisions)
Jump to: navigation, search
(Preemption-Test)
m (Minor formatting changes)
Line 1: Line 1:
This will test several attributes of the linux RT scheduler.  It checks to
+
=Concept=
 +
Preemption test will test several attributes of the linux RT scheduler.  It checks to
 
make sure that the scheduler allows higher priority tasks to preempt lower
 
make sure that the scheduler allows higher priority tasks to preempt lower
 
ones, and it measures the latency it takes to do so.
 
ones, and it measures the latency it takes to do so.
Line 16: Line 17:
 
This test was inspired by Steven Rostedt's "rt-migration-test", so many
 
This test was inspired by Steven Rostedt's "rt-migration-test", so many
 
thanks to him for getting this effort off the ground.
 
thanks to him for getting this effort off the ground.
 +
 +
=Download=
 +
You can get code of preemption test from:
  
 
[ftp://ftp.novell.com/dev/ghaskins/preempt-test-latest.tar.bz2]
 
[ftp://ftp.novell.com/dev/ghaskins/preempt-test-latest.tar.bz2]
  
You will need to have a development version of boost available to compile ([http://boost.org])
+
Note: You will need to have a development version of [http://boost.org boost] available to compile.

Revision as of 18:08, 23 October 2007

Concept

Preemption test will test several attributes of the linux RT scheduler. It checks to make sure that the scheduler allows higher priority tasks to preempt lower ones, and it measures the latency it takes to do so.

The basic premise of this test is to synchronously launch a series of threads which have a monotonically increasing RT priority by a parent that is running at the highest priority. So for 5 threads, we have 5 worker threads at priorities 1-5, and a parent at 6. The sequence would basically go: 6-1-6-2-6-3-6-4-6-5. We calibrate a busy-loop so that each child gets (by default) 20ms worth of busy work to do. We then measure the latency to wake the child, wake the parent, and run the entire test.

The expected result is that we should see short wake-latencies across the board, and the higher priority threads should finish their work first.

This test was inspired by Steven Rostedt's "rt-migration-test", so many thanks to him for getting this effort off the ground.

Download

You can get code of preemption test from:

[1]

Note: You will need to have a development version of boost available to compile.

Personal tools