summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Kacur <jkacur@redhat.com>2010-03-08 02:02:13 +0100
committerJohn Kacur <jkacur@redhat.com>2010-03-08 02:02:13 +0100
commit1263ebde632899a399b59ee8eec926bb81199122 (patch)
tree694454530bc730618f400d0e35e019bccd5293a8
parentce8c59023206ae409d28abdb3f6f3384ca825431 (diff)
downloadrt-tests-1263ebde632899a399b59ee8eec926bb81199122.tar.gz
cyclictest: Make the default scheduling policy SCHED_FIFO
The default scheduling policy if unspecified should be SCHED_FIFO. Before the change for example. sudo ./cyclictest policy: other: loadavg: 0.05 0.04 0.05 1/331 22367 T: 0 (22367) P: 0 I:1000 C: 1321 Min: 14 Act: 89 Avg: 77 Max: 942 After the change sudo ./cyclictest defaulting realtime priority to 2 policy: fifo: loadavg: 0.03 0.04 0.05 2/331 22387 T: 0 (22387) P: 2 I:1000 C: 713 Min: 17 Act: 41 Avg: 81 Max: 161 Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r--src/cyclictest/cyclictest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 066ca79..e4febec 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -792,7 +792,7 @@ static int use_nanosleep;
static int timermode = TIMER_ABSTIME;
static int use_system;
static int priority;
-static int policy = 0;
+static int policy = SCHED_FIFO; /* default policy if not specified */
static int num_threads = 1;
static int max_cycles;
static int clocksel = 0;
@@ -1037,7 +1037,6 @@ static void process_options (int argc, char *argv[])
if (num_threads < 1)
error = 1;
-
if (error)
display_help(1);
}