summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2010-04-09 13:06:33 -0500
committerClark Williams <williams@redhat.com>2010-04-09 13:06:33 -0500
commitd6c4ab8698926a0bac6eae2bc9c563d6fd3103b9 (patch)
treec2a5a5722bbf993b24119ac08a9aab91479c3bd7
parentba12344ecb211627fdbb303d68ac6757d54d71d5 (diff)
downloadrt-tests-d6c4ab8698926a0bac6eae2bc9c563d6fd3103b9.tar.gz
default cyclictest to SCHED_OTHER; clean up help message
After much thought, I decided to keep cyclictest's default scheduling policy as SCHED_OTHER. My rationale is that if you don't specify a priority on the command line you get the priorityless policy. If you do specify a priority but no specific RT policy, we'll default to SCHED_FIFO. So to get SCHED_RR you have to specify priorty and policy name, for example: # cyclictest --priority=90 --policy=rr Yes, I realize that the vast majority of users will run it with a realtime priority, but I just don't like picking a priority if it wasn't specified. If you want a realtime policy, specify a priority. Signed-off-by: Clark Williams <williams@redhat.com>
-rw-r--r--src/cyclictest/cyclictest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c
index 92b7514..3a7e752 100644
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -801,7 +801,7 @@ static void display_help(int error)
" format: n:c:v n=tasknum c=count v=value in us\n"
"-w --wakeup task wakeup tracing (used with -b)\n"
"-W --wakeuprt rt task wakeup tracing (used with -b)\n"
- "-y POLI --policy=POLI policy of realtime thread (1:FIFO, 2:RR)\n"
+ "-y POLI --policy=POLI policy of realtime thread, POLI may be fifo(default) or rr\n"
" format: --policy=fifo(default) or --policy=rr\n"
"-S --smp Standard SMP testing: options -a -t -n and\n"
" same priority of all threads\n"
@@ -818,7 +818,7 @@ static int use_nanosleep;
static int timermode = TIMER_ABSTIME;
static int use_system;
static int priority;
-static int policy = SCHED_FIFO; /* default policy if not specified */
+static int policy = SCHED_OTHER; /* default policy if not specified */
static int num_threads = 1;
static int max_cycles;
static int clocksel = 0;
@@ -853,7 +853,7 @@ static void handlepolicy(char *polname)
else if (strncasecmp(polname, "rr", 2) == 0)
policy = SCHED_RR;
else /* default policy if we don't recognize the request */
- policy = SCHED_FIFO;
+ policy = SCHED_OTHER;
}
static char *policyname(int policy)