Commit Graph

556 Commits

Author SHA1 Message Date
Clark Williams 6855394943 Version bump to v0.93
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12 14:09:28 -05:00
Clark Williams 090d6e7507 doc: fix VERSION in release-checklist.txt
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12 13:54:29 -05:00
Clark Williams 9901c75cbd hwlatdetect: added --watch option to watch output in realtime
Signed-off-by: Clark Williams <williams@redhat.com>
2015-08-12 13:51:43 -05:00
Clark Williams e8e905ce4b Merge remote-tracking branch 'kernel.org/v0.93-devel' into work 2015-08-06 09:22:30 -05:00
Alexander Stein 0b3e1086f8 cyclictest: Fix long priority help text option
The help text shows prio as the long option name for the process priority.
But it is actually priority.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-24 09:07:24 -04:00
Alexander Stein 417ddb5db0 cyclictest: Fix long priority help text option
The help text shows prio as the long option name for the process priority.
But it is actually priority.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
2015-07-22 10:19:22 -05:00
John Kacur a67ec68b94 Create an rt-tests.tar file using git-archive
Create an rt-tests.tar file using git-archive so we don't mistakenly
pull in uncommitted files

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 15:32:40 +02:00
John Kacur b6b5c594b2 Change VERSION_STRING to VERSION
Adding _STRING doesn't add any extra meaning, but the extra length makes
the Makefile more unreadable than is necessary, so shorten this up

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 14:31:01 +02:00
John Kacur a8725114cd Add .tar files to .gitignore
Ignore .tar files too

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 14:31:01 +02:00
John Kacur 38893b530c Create a .gitattribute file to specify what files git-archive should ignore
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-07-09 14:16:28 +02:00
John Kacur 4010c3bce2 Fix possible exit on error without releasing mutex
Coverage tools indicate that there are two spots where the function
low_priority() could exit without releasing the mutex.

Since the only error that pthread_barrier_wait is supposed to give is
EINVAL when the barrier is not an initialized barrier object, the
chances of this happinning seem remote. However, if we are going to
test for the error and potentially exit, then we should release the
mutex too.

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-30 23:46:34 +02:00
John Kacur a7eeb3e0a0 Fix warning: unused variable ‘c’
This is a legitimate compiler warning, so remove the unused variable.

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-30 21:53:36 +02:00
Clark Williams 5f9f1e3fe3 makefile: fixed release target
Added MAINTAINERS, doc and README.markdown to the tar archive
generation logic.

Signed-off-by: Clark Williams <williams@redhat.com>
2015-06-09 08:57:17 -05:00
John Kacur 4f891fbf1e Version bump to v0.92
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09 14:34:42 +02:00
John Kacur 2a0dd6274e Add a MAINTAINERS file
Adding a MAINTAINERS file to let people know where to send their
patches.

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09 14:22:58 +02:00
Anna-Maria Gleixner b35bc97cfd cyclictest: Align measurement threads to the next full second
cyclictest: Align measurement threads to the next full second

cyclictest starts the test threads at a random point in time. For
fully reproducible tests it is required to schedule the threads with a
specified offset from the timer tick. The influence of the tick can be
measured by running the test with offset = 0 and offset =
tickinterval/2.

To achieve this we rely on the fact, that the kernel starts the tick
at CLOCK_MONOTONIC time 0. So it's guaranteed that the tick timer
expires always every second (if the interval between the ticks defined
by CONFIG_HZ is a whole-number divider of a second). Setting the
global start time of the test threads to a full second (plus offset)
and the interval to the interval between the ticks, the threads are
scheduled with the specified offset to the tick.

Add a new option --secaligned which select this mode and modify the
--aligned option code to support this. The --secaligned and --aligned
options are mutually exclusive.

Signed-off-by Anna-Maria Gleixner <anna-maria@glx-um.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09 14:06:11 +02:00
Anna-Maria Gleixner 7b16a551c5 cyclictest: Convert the offset of the alignment option to microseconds
The offset is specified in microseconds according to the
documentation, but, the microseconds to nanoseconds conversion is
missing so the effective offset has the unit of nanoseconds.

Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-08 19:30:54 +02:00
anna-maria@glx-um.de 5265d5ed96 cyclictest: Ensure that next wakeup time is never in the past
The calculated next wakeup time is already in the past, if the latency
is longer than the interval. Thereby latency is detected that does not
correspond to latency caused by the system but by cyclictest itself.

Force forward the next wakeup time past now.

Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-02 14:50:37 +02:00
John Kacur cc0901e72d Allow building with -DHAVE_PARSE_CPUSTRING_ALL
This is a temporary solution until we have time to look into autotools
If you know that you are building on a system that has
numa_parse_cpustring_all()

Then you can type
make HAVE_PARSE_CPUSTRING_ALL=1
to define it.

If you omit that, then the default is the old behaviour that uses
numa_parse_cpustring((char *)s)

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-05-27 22:51:42 +02:00
Sebastian Andrzej Siewior 3bb3cef704 cyclictest: consider the 4 as the major version
Teach cyclictest to recognize the major version 4 which we do have now.
Featurewise it should behave like the 3.0 series

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-05-20 16:20:48 +02:00
Michael Olbrich bf74ac4067 Makefile: cleanup linking to librttest.a
Only add '-lrttest -L.' where it's actually needed.
Use '$<' instead of '$^'. Otherwise librttest is added twice:
As 'librttest.a' and as '-lrttest'.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03 19:54:05 +01:00
John Kacur ddc409343e Fix minor grammar mistake in the help output
Change "quick" to quicker, so the help message reads
-c    --check               Stop if lower prio task is quicker than
higher (off)

Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03 14:45:29 +01:00
Daniel Wagner 1207d5bdc0 pi_stress: Clear affinity for DEADLINE tasks
Deadline tasks are not allowed to set smp affinity.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-03-03 13:58:57 +01:00
Michael Olbrich 4f09abf780 Makefile: pi_stress need librttest.a so it should depend on it
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-02-24 15:28:33 +01:00
Clark Williams 3fed00ff8d version bump to 0.91
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 14:41:37 -06:00
Uwe Kleine-König a99c44c258 pi_stress: remove timestamp of compilation from version output
Having the date and time of compilation is hardly useful and is in the
way for reproducible building binaries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 13:12:36 -06:00
Clark Williams 9ea917520f rt-migrate-test: sanity check --prio value
Make sure we get a value between 1 and 99 for --prio. Also change
print for invalid --loops from Warning to Error (if we call exit
then it's an error).

Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 13:02:02 -06:00
Clark Williams ad68a5d91d rt-migrate-test: make sure input parameters are converted to correct units
The input parameters for run_interval and interval are specified on the
command line as millisecond values. Convert these to nanosecond values
before we use them.

Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 12:59:05 -06:00
Boris Egorov b690dfed2d rt-migrate-test: use variables instead of macros
By default, static variables run_interval and interval assigned to
macros with corresponding uppercase name, RUN_INTERVAL and INTERVAL.
Later in code we should only use these variables to properly handle
options passed by user.

Signed-off-by: Boris Egorov <egorov@linux.com>
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 12:56:44 -06:00
Boris Egorov f2ceb5e1f9 rt-migrate-test: exit early if nr_runs is non-positive
Program will crash if nr_runs is 0 due to dividing by it in
print_results(). Let's exit early instead.

Fixes: http://bugs.debian.org/716237
Signed-off-by: Boris Egorov <egorov@linux.com>
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17 12:56:18 -06:00
Clark Williams 48d20ffd06 version bump to 0.90
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-27 10:26:12 -06:00
Alexey Brodkin c68419b628 Makefile: allow building selected tests with non-NPTL toolchain
Some architectures are still stuck with non-NPTL toolchains.
These are for example ARC, Blackfin, Xtensa etc.

Still rt-tests are very good benchmarks and it would be good to enable use of
at least selected (those that will be built) tests on those architectures.

This change makes it possible to only build subset of tests that don't require
NPTL calls.

By default behavior is not modified - all tests are built, but if one wants
to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line
or modify "HAVE_NPTL" variable right in Makefile and execute "make".

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Clark Williams <clark.williams@gmail.com>
2015-01-15 16:31:20 -06:00
Clark Williams deb1e1eecc specfile: update template and make build exclusive to x86_64
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15 16:31:20 -06:00
Clark Williams 53956b6712 pip_stress: parameterize usleep value to work-around platform issues
ARM platforms have timing issues with pip_stress:

    Hello,

    pip_stress works out of the box on my x86 based laptop, but
    doesn't work on ARM devices, returned 'no inversion incurred'.
    Follow the comment to increase usleep value, 2500 worked for
    pandaboard and 3000 worked for Beaglebone Black board.

    I propose that increase the usleep value to 3500 from upstream,
    so that we can use pip_stress right out of the box.

Rather than hardcode the usleep value used by pip_stress, I made
the command line option --usleep which takes a microsecond value
that defaults to 500us.

Reported-by: Chase Qi <chase.qi@linaro.org>
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15 16:30:59 -06:00
Daniel Wagner d1f037dc3c pi_stress: Store schedule attributes per thread
Currently, the scheduling class is configured on a global
level. It is possible to run the test either with SCHED_FIFO
or SCHED_RR. All threads run then with the same configuration
except sched_priority is different.

By storing the scheduling attributes per thread we will be able
to use different scheduler classes at the same time. The aim is
to use SCHED_DEADLINE for the high priority thread.

First thing to get there is to introduce low_sa, med_sa, high_sa
and admin_sa. They are configured using the global policy variable
on default. Either using SCHED_FIFO or SCHED_RR. The user
can though use --sched command line options to configure each
thread seperately. E.g.

Starting PI Stress Test
Number of thread groups: 1
Duration of test run: infinite
Number of inversions per group: unlimited
     Admin thread SCHED_FIFO priority 4
1 groups of 3 threads will be created
      High thread SCHED_DEADLINE runtime 100000 deadline 200000 period 200000
       Med thread SCHED_FIFO priority 2
       Low thread SCHED_FIFO priority 1
Current Inversions: 2446249
Stopping test
Terminated

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:48 -06:00
Daniel Wagner 7efada9d5b rt-utils: Add gettid()
We still lack a gettid implemenation from libc.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:45 -06:00
Daniel Wagner e875ad63d3 rt-utils: Add helper to parse/print scheduling policies
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:43 -06:00
Daniel Wagner ef2dee4232 rt-sched: Add sched_setattr/sched_getattr API
Until we have a proper libc implementation we maintain a simple
version of it. We this new API we are able to use SCHED_DEADLINE.

This is shamelessly stolen from Dario Faggioli's libdl.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: Dario Faggioli <raistlin@linux.it>
2014-11-06 15:43:41 -06:00
Daniel Wagner 4450464a96 pi_stress: Use error.h for logging and debugging
In order to be able to use some of the rt-utils.h function we need
to get rid of our own info() & friends implementation.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:38 -06:00
Daniel Wagner bf246ba473 error: Add debug() function
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:35 -06:00
Daniel Wagner 62a796727a pi_stress: Remove unused TIMER_SIGNAL definition
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:32 -06:00
Daniel Wagner 37c4b02108 rt-tests.h: Remove unused header file
There is no user of this header file.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:29 -06:00
Daniel Wagner b45ce03638 hackbench: Don't re-assign context for each fd
A small optimization. Setting it once is enough.

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06 15:43:00 -06:00
Clark Williams 536baa7648 Merge remote-tracking branch 'jkacur/v0.89-devel' into work 2014-11-06 15:41:21 -06:00
Joakim Hernberg b23d5ced10 cyclictest: make affinity option only use number of online cpus
When I boot my 8 core i7 laptop with the maxcpus=4 kernel boot flag,
cyclictest -S runs 8 threads.  This patch makes it only use the number
of online cpus instead.

Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu>
Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-18 22:49:17 +02:00
John Kacur 5078ecff39 cyclictest: Add long option --laptop to preserve battery power
Some people running cyclictest on laptops don't want to automatically
take advantage of the trick that prevents the power management to
transition to high cstates, since it eats up their battery power.

Allow them to suppress this feature with --laptop

This will result in power latency results of course.

Feature-requested-by:  Joakim Hernberg <jhernberg@alchemy.lu>
Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-18 22:48:35 +02:00
Clark Williams b028c17565 Merge remote-tracking branch 'jkacur/v0.89-devel' into work 2014-08-15 10:38:26 -05:00
Joakim Hernberg 863f148222 cyclictest: make affinity option only use number of online cpus
When I boot my 8 core i7 laptop with the maxcpus=4 kernel boot flag,
cyclictest -S runs 8 threads.  This patch makes it only use the number
of online cpus instead.

Signed-off-by: Joakim Hernberg <jhernberg@alchemy.lu>
Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-15 14:52:28 +02:00
John Kacur dd01e7dab9 cyclictest: Add long option --laptop to preserve battery power
Some people running cyclictest on laptops don't want to automatically
take advantage of the trick that prevents the power management to
transistion to high cstates, since it eats up their battery power.

Allow them to suppress this feature with --laptop

This will result in power latency results of course.

Feature-requested-by:  Joakim Hernberg <jhernberg@alchemy.lu>
Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14 17:24:31 +02:00
John Kacur 72ce09a0fa cyclictest: Fix help for long options only
At some point in the history of cyclictest, a number of short options
were removed and changed to long only options. However the display_help
was not updated to reflect this and indicates short options that
no longer exist. Fix this. I also found a long option that wasn't listed
at all and added that.

Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14 17:01:05 +02:00