summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2015-06-09makefile: fixed release targetHEADv0.92masterClark Williams1-1/+1
Added MAINTAINERS, doc and README.markdown to the tar archive generation logic. Signed-off-by: Clark Williams <williams@redhat.com>
2015-06-09Version bump to v0.92John Kacur2-1/+18
Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09Add a MAINTAINERS fileJohn Kacur1-0/+9
Adding a MAINTAINERS file to let people know where to send their patches. Signed-off-by: John Kacur <jkacur@redhat.com>
2015-06-09cyclictest: Align measurement threads to the next full secondAnna-Maria Gleixner1-5/+34
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-08cyclictest: Convert the offset of the alignment option to microsecondsAnna-Maria Gleixner1-2/+2
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-02cyclictest: Ensure that next wakeup time is never in the pastanna-maria@glx-um.de1-0/+12
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-05-27Allow building with -DHAVE_PARSE_CPUSTRING_ALLJohn Kacur1-3/+7
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-20cyclictest: consider the 4 as the major versionSebastian Andrzej Siewior1-1/+1
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-03-03Makefile: cleanup linking to librttest.aMichael Olbrich1-12/+13
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-03Fix minor grammar mistake in the help outputJohn Kacur1-1/+1
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-03pi_stress: Clear affinity for DEADLINE tasksDaniel Wagner1-0/+13
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-02-24Makefile: pi_stress need librttest.a so it should depend on itMichael Olbrich1-1/+1
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2015-02-17version bump to 0.91v0.91Clark Williams2-1/+10
Signed-off-by: Clark Williams <williams@redhat.com>
2015-02-17pi_stress: remove timestamp of compilation from version outputUwe Kleine-König1-1/+0
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-17rt-migrate-test: sanity check --prio valueClark Williams1-1/+5
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-17rt-migrate-test: make sure input parameters are converted to correct unitsClark Williams1-3/+3
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-17rt-migrate-test: use variables instead of macrosBoris Egorov1-3/+3
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-17rt-migrate-test: exit early if nr_runs is non-positiveBoris Egorov1-1/+4
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-01-27version bump to 0.90v0.90Clark Williams2-1/+25
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15Makefile: allow building selected tests with non-NPTL toolchainAlexey Brodkin1-3/+8
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-15specfile: update template and make build exclusive to x86_64Clark Williams1-3/+6
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2015-01-15pip_stress: parameterize usleep value to work-around platform issuesClark Williams1-1/+13
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>
2014-11-06pi_stress: Store schedule attributes per threadDaniel Wagner1-34/+211
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-06rt-utils: Add gettid()Daniel Wagner2-0/+8
We still lack a gettid implemenation from libc. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-utils: Add helper to parse/print scheduling policiesDaniel Wagner2-0/+43
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-sched: Add sched_setattr/sched_getattr APIDaniel Wagner3-2/+121
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-06pi_stress: Use error.h for logging and debuggingDaniel Wagner1-140/+115
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-06error: Add debug() functionDaniel Wagner2-0/+11
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06pi_stress: Remove unused TIMER_SIGNAL definitionDaniel Wagner1-2/+0
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06rt-tests.h: Remove unused header fileDaniel Wagner1-124/+0
There is no user of this header file. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06hackbench: Don't re-assign context for each fdDaniel Wagner1-4/+4
A small optimization. Setting it once is enough. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
2014-11-06Merge remote-tracking branch 'jkacur/v0.89-devel' into workClark Williams0-0/+0
2014-08-18cyclictest: make affinity option only use number of online cpusJoakim Hernberg2-2/+2
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-18cyclictest: Add long option --laptop to preserve battery powerJohn Kacur1-1/+13
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-15Merge remote-tracking branch 'jkacur/v0.89-devel' into workClark Williams3-26/+49
2014-08-15cyclictest: make affinity option only use number of online cpusJoakim Hernberg2-2/+2
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-14cyclictest: Add long option --laptop to preserve battery powerJohn Kacur1-1/+13
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-14cyclictest: Fix help for long options onlyJohn Kacur1-4/+5
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-14cyclictest: Change the output from function sighand() to stderrJohn Kacur1-4/+4
cyclictest can be run from other tools such as rteval in order to get current status on long runs, SIGUSR1 is sent to cyclictest and caught by function sighand() This creates difficulties for rteval when parsing cyclictest output, so change the output to stderr. Note, a RFC was sent out on Apr.15 2014 entitled "RFC: SIGUSR1 to stderr" to: RT <linux-rt-users@vger.kernel.org> cc: Carsten Emde <C.Emde@osadl.org>, Thomas Gleixner <tglx@linutronix.de>, Clark Williams <williams@redhat.com> Since I didn't receive any replies, I'm assumin there are no objections Signed-off-by: John Kacur <jkacur@redhat.com>
2014-08-14cyclictest: Always print an err message if write of 0 to cpu-dma_latency failsJohn Kacur1-12/+22
In set_latency_target() there are some paths that don't print an error message even when a write of 0 to /dev/cpu_dma_latency fails. This patch does the following - always print an error message if the write to /dev/cpu_dma_latency fails - Fix the error check with the write call. (a return of 0 or -1 indicate problems - rename ret to err since this function is void and returns no value - use err_msg_n instead of printf (which also prints to stderr) Signed-off-by: John Kacur <jkacur@redhat.com>
2014-07-23make SMP option only use online cpus.Joakim Hernberg2-2/+2
2014-05-09rt_numa.h: Suppress discards 'const' qualifier warningJohn Kacur1-1/+1
In rt-tests we try to use const where appropriate for read-only, but we need to tell the compiler we are intentionally discarding const when calling library functions that expect char * Signed-off-by: John Kacur <jkacur@redhat.com>
2014-05-09lib: Rework err_msg_n to output strerror after messageJohn Kacur2-4/+4
Outputting the message first followed by the strerror makes the error messages more readable. Signed-off-by: John Kacur <jkacur@redhat.com>
2014-03-30Merge branch 'work'Clark Williams4-22/+26
2014-03-30version bump to 0.89v0.89Clark Williams2-1/+5
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-30cyclictest: fix leftover debbuging comment in argument processingClark Williams1-1/+1
Left a single line comment in the switch statement for handling affinity options. Removed it. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-29hwlatdetect: convert to run with both python2 and python3Clark Williams1-20/+20
Ran 2to3 on hwlatdetect.py and checked in the result. Tested on F20 system running 3.12.14-rt23 with both python2 and python3. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28removed debugging comments and printfsClark Williams1-4/+2
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28Merge branch 'work'Clark Williams2-1/+8
2014-03-28version bump to 0.88v0.88Clark Williams2-1/+8
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2014-03-28cyclictest: Don't offer --numa option when unavailableGary S. Robertson1-1/+3
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-28cyclictest: Restore CPU affinity function for non-NUMA buildsGary S. Robertson1-70/+127
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-26Don't offer --numa option when unavailableworkGary S. Robertson1-3/+7
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-03-26Restore CPU affinity function for non-NUMA buildsGary S. Robertson1-70/+127
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org> Signed-off-by: Clark Williams <williams@redhat.com>
2014-01-31cyclictest: Fix tracemark output when the latency threshold is hit on ARMUwe Kleine-König1-1/+3
on ARM I'm seeing output like: cyclicte-623 0....... 19619418us+: tracing_mark_write: hit latency threshold (2000 > 2097) That's because of a format mismatch in tracemark("hit latency threshold (%d > %d)", diff, tracelimit); diff is a u64 and tracelimit an int. So on ARM the string is passed in r0, tracelimit in r1 and diff in r2+r3. vsnprintf used in tracemark only expects two ints passed and so only uses r1 and r2 yielding the permutation in the output. This patch also adds a gcc attribute to tracemark that helps catching similar bugs. In this case just adding the attribute but not touching the call site, would result in: src/cyclictest/cyclictest.c: In function ‘timerthread’: src/cyclictest/cyclictest.c:899:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘uint64_t’ [-Wformat] --- Hello after some chatting with Clark and John I dropped the c99 stuff and added the attribute annotation. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-12rt-tests: hackbench: fix for uninitialized start timeCiprian Barbu1-4/+10
Hello, While playing around with hackbench I discovered that I would sometimes get an enormous time reported, even if the run time would be less than a second or so. The problem was that the struct timeval start was not initialized until after all children have been created. But if the program receives a signal before this is done, the start time is left uninitialized. I propose that in such situations an error message be displayed, like the following patch does. Please let me know if this is acceptable. Regards, /Ciprian Signed-off-by: Clark Williams <williams@redhat.com>
2013-12-11version bump to 0.87v0.87Clark Williams2-1/+5
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-11fixed #ifdef that cuts -A option in display_help()Clark Williams1-6/+6
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-12-11CPU affinity now takes arbitrary set of cpus.Aaron Fabbri3-22/+181
e.g. cyclictest -a4,6-8 -t5 will use 5 threads, assigned round-robin to the set of CPUs {4,6,7,8}. CPU 4 will get threads 1 and 5, CPU 6 gets thread 2, CPU 7 gets thread 3, and CPU 8 gets thread 4. As explained in the updated manpage, libnuma >= v2 is required for these arbitrary CPU sets. With libnuma v1, the -a option behaves as before. As before, compiling without libnuma is supported. The command usage help is fixed up at compile time to always show the correct usage of the -a option. Also note that, since numa_parse_cpustring_all() wasn't available in early libnuma v2 versions, we use numa_parse_cpustring(). This means you'll have to use taskset in some cases (isolcpus kernel parameter) to add the desired CPUs to the set of allowed cores, e.g.: taskset -c4-6 cyclictest -a4-6 Tested with out libnuma (numactl), and with versions 1.0.2 and 2.0.9-rc3. Signed-off-by: Aaron Fabbri <ajfabbri@gmail.com> (cherry picked from commit 5375ab86e77881d8043e5e309bb8daf5a84cc05f) Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15updated Makefile and do-git-push script to use kupClark Williams2-11/+14
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-15version bump to 0.86v0.86Clark Williams2-10/+29
Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14cyclictest: Align option fixesJohn Kacur1-9/+12
These changes make the align option truly optional as claimed. 1. Rename disaligned to offset for readability. 2. Fix the aligned option so that if no optional argument is given, the offset defaults to 0 3. Fix some white space problems as reported by checkpatch.pl in the kernel Signed-off-by: John Kacur <jkacur@redhat.com>
2013-11-14cyclictest: add align thread wakeup times optionNicholas Mc Guire2-6/+44
This patch provides and additional -A/--align flag to cyclictest to align thread wakeup times of all threads as closly defined as possible. When running multiple threads in cyclictest (-S or -t # option) the threads are launched in an unsynchronized manner. Basically the creation order and time for thread creation determines the start time. For provoking a maximum congestion situation (e.g. cache evictions) and to improve reproducibility or run conditions the start time should be defined distances appart. The well defined distance is implemented as a offset parameter to -A/--align and will offset each threads start time by the parameter * the sequentially assigned thread number (par->tnum), together with the -d0 (distance in the intervals of the individual threads) this alignment option allows to get the thread wakeup times as closely synchronized as possible. The method to sync is simply that the thread with par->tnum == 0 is chosen to set a globally shared timestamp, and all other threads use this timestamp as their starting time rather than each calling clock_gettime() at startup. To ensure synchronization of the thread startup the setting of the global time is guarded by pthread_barriers. Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Reviewed-by: Andreas Platschek <andreas.platschek@opentech.at> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14minor cleanup in cyclictestNicholas Mc Guire1-1/+0
HI ! just noticed a, presumably, unnecessary tsnorm in cyclictest Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-11-14cyclictest: modify option handling to use enumerated typesClark Williams1-82/+162
Change return value from option parsing to be enumerated type rather than a character. Hopefully this will clean up the option handling a bit and not confuse me when I come back to add yet another option to cyclictest. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-04-11hackbench: init child's struct before using itSebastian Andrzej Siewior1-1/+2
Commit ad27df7 ("Reimplement better child tracking and improve error handling") changed the way of reporting pid/error after creating a child. It will return an union which is a mix pid_t, pthread_t and a signed long long for errors. Now on 32bit x86 both pid_t and pthread_t are four byte in size and are stored in the first 4 bytes. Now if the most significant bit of the long long variable happens to be set by chance (because nobody really initializes the variable here) then error variable will be negative. On little endian machines the assignment of pid or threadid won't reset the sign bit and you see this: | Running in process mode with 10 groups using 40 file descriptors each (== 400 tasks) | Each sender will pass 100 messages of 100 bytes | 0 children started. Expected 40 | sending SIGTERM to all child processes | signaling 0 worker threads to terminate | Creating workers (error: Success) A machine with proper endian handlig (that is big endian) would reset the sign bit during the assignment of pid and I would not have to make this patch :) While here, I make create_worker() since it is not used outside of this file. Cc: David Sommerseth <davids@redhat.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-03-13cyclictest: allow break threshold without doing any tracingClark Williams1-4/+7
Add the --notrace/-A option, intended to be used in conjunction with the -b option. This will cause cyclictest to exit when a threshold is hit, but will not perform any tracing operations, allowing more sophisticated tracing to be done externally. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-03-13cyclictest: add named fifo for statisticsClark Williams1-11/+79
This code adds the -F/--fifo option to cyclictest. Using the --fifo <path> option will cause cyclictest to create a named fifo at <path> and will dump the current run statistics to that fifo when it is opened an read. Signed-off-by: Clark Williams <clark.williams@gmail.com>
2013-02-15cyclictest: finish removal of 1 second first loopsJim Somerville1-4/+2
Huge latencies are observed (close to 1 second) when certain options are used in cyclictest. The problem was 1st introduced at commit da4956cbcaf7945554f ("use interval on first loop instead of 1 second"). It removed the 1 second first timing loop out of the main path in cyclictest but left it in two other paths, namely the ones triggered by these two options: -r --relative use relative timer instead of absolute -s --system use sys_nanosleep and sys_setitimer which in turn causes the huge latencies of close to 1 second to be reported by cyclictest with certain uses of those two options. Here we extend the original commit to remove the 1 second hardcoded timer values from the RELTIME and ITIMER options, by simply using the actual interval provided instead. Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com> Cc: Clark Williams <williams@redhat.com> Cc: John Kacur <jkacur@redhat.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15Makefile: Don't tag files in dir BUILD from rpm buildsJohn Kacur1-1/+1
Don't tag copies of files in BUILD created when building an rpm Without this change tags finds both copies, eg: for tag cyclictest.c # pri kind tag file 1 F F cyclictest.c BUILD/rt-tests/src/cyclictest/cyclictest.c 1 2 F F cyclictest.c src/cyclictest/cyclictest.c With this change, only the later one is found Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15rt-tests: NUMA optional for make rpmFrank Rowand2-3/+14
version 2: - Add new placeholders in rt-tests.spec-in to make the replacements by "make rpm" more visible to future maintainers of rt-tests.spec-in - fix typo of my name in rt-tests.spec-in rt-tests can be built without NUMA: make NUMA=0 But "make rpm" does not have a way to be successful without NUMA: build_rt-tests_0.85> make rpm for F in cyclictest signaltest pi_stress rt-migrate-test ptsematest sigwaittest svsematest pmqtest sendme pip_stress hackbench *.o .depend *.*~ *.orig *.rej rt-tests.spec *.d *.a ChangeLog; do find -type f -name $F | xargs rm -f; done rm -f hwlatdetect rm -f tags rm -rf BUILD BUILDROOT RPMS SRPMS SPECS releases *.tar.gz rt-tests.spec tmp git log >ChangeLog mkdir -p releases mkdir -p tmp/rt-tests cp -r Makefile COPYING ChangeLog src tmp/rt-tests tar -C tmp -czf rt-tests-0.85.tar.gz rt-tests rm -f ChangeLog cp rt-tests-0.85.tar.gz releases sed s/__VERSION__/0.85/ <rt-tests.spec-in >rt-tests.spec rpmbuild -ba --define "_topdir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85" --define "_sourcedir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/releases" --define "_builddir /a/home/frowand/me/src/rt-tests/build_rt-tests_0.85/BUILD" rt-tests.spec error: Failed build dependencies: numactl-devel is needed by rt-tests-0.85-1.fc12.src make: *** [rpm] Error 1 The following patch allows the rpm to be built without NUMA, with the command: make NUMA=0 rpm Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2013-02-15Makefile: Add BUILDROOT and SPECS to the dirs to remove for distcleanJohn Kacur1-1/+2
make rpm creates the dirs BUILDROOT and SPECS that are missed by distclean. Gather all rpm related DIRS to the RPMDIRS and add that to distclean. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15Makefile: Add tmp dir to distclean and "make release" call distcleanJohn Kacur1-3/+3
The files in the tmp dir are generated during make release. These are the kind of generated files that should be removed for distclean, So add tmp. make release can be slightly simplified by then depending on distclean instead of clean. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-02-15Makefile: Don't tag tmp files created when making a releaseJohn Kacur1-1/+1
Don't tag the copies of the source files placed in the tmp directory during the creation of a release. Without this change tags finds both copies, eg: for tag cyclictest.c # pri kind tag file 1 F C F cyclictest.c src/cyclictest/cyclictest.c 1 2 F F cyclictest.c tmp/rt-tests/src/cyclictest/cyclictest.c 1 With this change only the first one is found. Signed-off-by: John Kacur <jkacur@redhat.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Frank Rowand <frank.rowand@am.sony.com>
2013-01-30cyclictest: white space cleanupFrank Rowand1-22/+21
Clean up cyclictest formatting: Change leading spaces to tabs. Align function parameters. Place type of function on same line as function name. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-11-13version bump to 0.85v0.85Clark Williams2-1/+16
Signed-off-by: Clark Williams <williams@redhat.com>
2012-11-09Merge branch 'clrkwllms/work' into rt-tests-0.84-develJohn Kacur1-0/+33
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17V3: cyclictest: report large measured clock latencyFrank Rowand1-1/+108
V3: Use src/lib/error.c functions instead of fprintf. Fix printf format warnings for 32 bit vs 64 bit systems with cast. One issue with using warn() and info() instead of fprintf is that the compiler no longer warns about format mismatches. Fix bad continuation line white space prefix. Remove unused variable zero_diff. cyclictest: ARM panda clock resolution will be ~30 usec unless CONFIG_OMAP_32K_TIMER=n, resulting in a poor latency report. This patch does _not_ fix the problem, it merely provides the instrumentation to make it visible. The value of measured resolution is useful information for any system. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> - Fixed up minor white space problem. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17V3: cyclictest: clean up getopt_long() parametersFrank Rowand1-71/+74
V3: unchanged from V2 cyclictest getopt_long() parameter clean up. Clean up before following patch which will add a new option. Some elements of long_options were not in alphabetical order. Some elements of optstring were not in alphabetical order. '-e', '--latency' was missing help text short form of --duration ('D') was missing from optstring Change a few instances of leading spaces to tabs. Add white space to long_options to improve readability. Some cases of the switch processing the result of getopt_long() were not in alphabetical order. Did _not_ clean up option value parsing and processing. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com> Conflicts: src/cyclictest/cyclictest.c
2012-10-17rt-tests Makefile: Add CPPFLAGS to the pattern rule to generate dependenciesJohn Kacur1-1/+1
Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests Makefile: separate CFLAGS and CPPFLAGSUwe Kleine-König1-2/+3
For compilation to work -D_GNU_SOURCE -Isrc/include is needed to be passed to the compiler. For Debian packaging several things are added but not these two from above. So be a bit more friendly and add them unconditionally. There is no harm if they are included in the user supplied CFLAGS and so passed twice. Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be passed to the compiler with CFLAGS taking options for the compiler and CPPFLAGS taking options for the preprocessor. This is also needed for Debian packaging where the helper scripts set CPPFLAGS. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests: have printf use %s format for stringsUwe Kleine-König4-8/+8
Discovered while compiling with "hardening flags" For Debian 7.0 (aka wheezy) packages it's recommended to use several hardening flags, the default on amd64 being: CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro This patch doesn't fix all warnings but at least makes all programs compile again by not using char *variables as printf format strings. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17rt-tests / gitignore: Exclude patches and .a libs too.John Kacur1-0/+2
Minor fix to make working with git nicer. Now that we're building a lib, we need to exclude it from git status output. Do the same for patches we generate or apply. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17cyclictest: histogram overflow instance trackingBhavesh Davda1-3/+23
Add feature to cyclictest histogram mode to track cycle counts every time a sample overflows the histogram limit. This should help identify if there is a timing pattern to jitters in cyclictest runs. Example output (with -h 10): ... Histogram Overflows: 00001 00007 00000 00009 00004 00007 00000 00001 Histogram Overflow at cycle number: Thread 0: 09964 Thread 1: 00000 00004 00006 00008 00010 09962 11594 Thread 2: Thread 3: 01169 04698 06782 09033 10299 11561 21517 28734 29532 Thread 4: 11574 11580 11583 11586 Thread 5: 00020 09448 13954 14954 18954 20587 24973 Thread 6: Thread 7: 18950 ... Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Reviewed-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-10-17cyclictest: whitespace cleanupBhavesh Davda1-20/+20
Cosmetic whitespace cleanup Signed-off-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-08-30add setup and call of tracemark function for breaktraceClark Williams1-0/+33
Add back call to the tracemark function but only if we're using the breaktrace option and only when we actually hit the breaktrace threshold. Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-09version bump to 0.84v0.84Clark Williams2-1/+24
Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-09rt-tests / cyclictest: Make cyclictest fail if it cannot run with requested ↵John Kacur1-1/+75
priority. Currently if a non-root user requests a priority higher than the soft limit in /etc/security/limits.conf the call to sched_setscheduler will silently fail and the user will be running with priority of 0. Cyclictest will not complain, and display the requested priority resulting in seemingly poor results. The following patch fixes this by doing two things. 1. If the requested priority is higher than the soft limit but lower than the hard limit, it will raise the soft limit to the requested priority. 2. If the requested priority is higher than the hard limit, it will fail with a warning. The patch should not affect privileged users. Reported-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: John Kacur <jkacur@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: printf format compile warningFrank Rowand1-1/+1
V2: use type casting instead of ugly constant in format string Fix printf format string to fix compile warning for ARM 32 bit target. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: incorrect first latency value for --verbose optionFrank Rowand1-6/+16
When the --verbose option is selected, the first value for each thread is incorrectly reported as zero. This is because when collecting the first value, the index into stat->values is incremented from zero to one before storing the value. But when printing the values, the first value printed is stat->values[0], which has been initialized to zero. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: Makefile get machinetype from compiler instead of unameFrank Rowand1-2/+2
Fix the machinetype check for cross-compiling. This has been tested on an x86_64 Fedora host for an x86_64 target and an ARM target. Additional testing would be greatly appreciated. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: cyclictest warn of interaction between '-a', '--smp', and '--numa'Frank Rowand1-4/+12
The '-a' option is always ignored if --smp or --numa is specified. Fix the warning message to not depend on --smp or --numa occuring first. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: cyclictest avoid unneeded warningFrank Rowand1-2/+3
Avoid annoying warning message when tracing is not requested and the debug file system is not available. The same test already protects against calling event_enable_all(). Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Reviewed-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-03rt-tests: cyclictest segfault with '-a'Frank Rowand1-1/+3
This fixes a segfault on ARM when the '-a' option is used. man sched_setaffinity says to use pthread_setaffinity_np() when using the POSIX threads API. Signed-off-by: Frank Rowand <frank.rowand@am.sony.com> Tested-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-26Merge remote-tracking branch 'jkacur/rt-tests-0.83-devel' into workClark Williams0-0/+0
Conflicts: Makefile
2012-03-26change cyclictest measurement thread to check returns and exit on errorClark Williams1-15/+26
Start of an ongoing process to have error strategy where return is checked and if error, exit with appropriate status. Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-26report number of samples written in hwlatdetectClark Williams1-1/+3
Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-26install: Fix failed to create symbolic link hwlatdetect file existsJohn Kacur1-1/+1
The following build error can occur if you have done a previous make install if test -n "/usr/lib/python2.7/site-packages" ; then \ install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \ ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \ fi ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists make: *** [install] Error 1 I initially wanted to fix the error by removing the symbolic link, with rm -rf but Andrew Burgess pointed out that you can just use the ln's -f (force) flag. I like that solution better. Suggested-by: Andrew Burgess <aab@cichlid.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23Revert "cyclictest problem/bug as non-root"Clark Williams1-15/+1
This reverts commit 64e635bc513a3a114729f86de7a87780b2737605. moving to the check-return-and-exit strategy Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-23Merge remote-tracking branch 'jkacur/rt-tests-0.83-devel' into workClark Williams12-110/+138
2012-03-23install: Fix failed to create symbolic link hwlatdetect file existsJohn Kacur1-0/+1
The following build error can occur if you have done a previous make install if test -n "/usr/lib/python2.7/site-packages" ; then \ install -D -m 755 src/hwlatdetect/hwlatdetect.py /usr/lib/python2.7/site-packages/hwlatdetect.py ; \ ln -s /usr/lib/python2.7/site-packages/hwlatdetect.py "/usr/local/bin/hwlatdetect" ; \ fi ln: failed to create symbolic link `/usr/local/bin/hwlatdetect': File exists make: *** [install] Error 1 Fix the error by removing the symbolic link. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23Move info, warn, and fatal functions to error.[ch]John Kacur8-36/+39
Move warning, error and fatal function to the error files. This is a first step in cleaning up rt-tests. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23Makefile: Introduce a static libraryJohn Kacur1-10/+13
Introduce a static libray. Currently it contains the functions in rt-utils.c error.c and rt-get_cpu.c Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23Makefile: Support user supplied CFLAGS and LDFLAGSDarren Hart1-12/+13
Accept user supplied CFLAGS and LDFLAGS, overwriting the Makefile supplied versions. This can cause the build to fail if the user does not provide at least what the Makefile defines, but so be it. Signed-off-by: Darren Hart <dvhart@linux.intel.com> CC: Clark Williams <williams@redhat.com> CC: John Kacur <jkacur@redhat.com> CC: Denys Dmytriyenko <denis@denix.org> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23pi_stress: Check the status of sched_getaffinityJohn Kacur1-0/+8
Check the status of sched_getaffinity and exit upon error. CPU_ISSET only checks whether a cpu is in a mask, and not whether the mask is valid. Checking the status ensures we aren't working with garbage values. This also removes the warning from gcc about the status variable being unused as reported by Darren Hart. Reported-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23rt-tests: Update rt-migrate-test to use ftrace infrastructureSteven Rostedt1-39/+46
The rt-migrate-test in the rt-tests is still using the old logdev interface that requires the logdev patch. Ftrace has been introduced into mainline Linux since 2.6.27 and has many more features than logdev. The rt-migrate-test should interact with ftrace instead of logdev. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: John Kacur <jkacur@redhat.com>
2012-03-23gitignore: differentiate between program names and directoriesJohn Kacur1-13/+18
Many rt-test programs including cyclictest have directories with the same name as the generated binaries. Tell .gitignore to only ignore the program names and not the directories by using a slash prefix. Signed-off-by: John Kacur <jkacur@redhat.com>
2012-02-13Merge branch 'master' into workClark Williams1-1/+15
2012-02-13cyclictest problem/bug as non-rootNicholas Mc Guire1-1/+15
HI ! minor bug in cyclictest but potential causing confusion on cyclictest resuults when running as non-root user. Setup: if one sets the rtprio in /etc/security/limits.conf to something below prio max - like: @hofrat hard rtprio 10 @hofrat soft rtprio 10 but then starts cylictest with -p 80 cyclictest will not fuss and also display priority 80 (as it uses par->prio in print_stat) but effectively runs with prio 0 as the return value of sched_setscheduler is not being checked in timerthread), resulting in semingly bad scheduling jitter values. So maybe cyclictest should take the effective maximum schduling priority of the user and not the scheduling policy maximum. Not sur if the check in timerthread is actually really needed - but it should not hurt ither. patch below (against current git) at "works for me" quality. thx! hofrat
2011-11-10Merge https://github.com/flosse/rt-tests into workClark Williams1-0/+87
2011-11-10[cyclictest] added priority spreading option --priospreadClark Williams1-2/+12
Add option to spread priorities across measurement threads in decending order. Signed-off-by: Clark Williams <williams@redhat.com>
2011-10-24added description from osadl.orgMarkus Kohlhase1-0/+87
2011-09-26version bump to 0.83v0.83Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-26Modified Makefile to be smarter about turning on/off NUMA compileClark Williams1-2/+6
Combined Uwe Kleine-König and Frank Rowand's suggestions into a Makefile modification that tries to be smart about turning on NUMA, while allowing it to be explicitly enabled/disabled via command line options Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-21version bump to 0.82v0.82Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-21fix print that causes histogram processing error in cyclictestClark Williams1-2/+2
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20version bump to 0.81v0.81Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20cleaned up previous hack for using /dev/cpu_dma_latencyClark Williams1-12/+21
Changed function name to set_latency_target() and added a command line argument to allow passing in values other than the default of zero microseconds. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20version bump to 0.80v0.80Clark Williams2-1/+5
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20use latency trick to hold system in idle=poll for duration of cyclictest runClark Williams1-1/+39
Use the /dev/cpu_dma_latency power management interface to hold the system in idle=poll state while cyclictest is running. Look in the kernel documenation: Documentation/power/pm_qos_interface.txt for more information. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-15version bump to 0.79v0.79Clark Williams2-1/+5
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-15hackbench mods to work better under stressClark Williams1-2/+26
added a signal_worker routine to send individual SIGTERM's to worker threads (since sending via pid=0 seems to have issues). Also added the -F/--fifo option to change the main thread to a SCHED_FIFO realtime thread after creating the workers. This will allow the mangagement thread to run when there are tons of workers. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-14version bump to 0.78v0.78Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-14modify signal handling logic and clarify modeClark Williams1-12/+18
Modify signal handling logic so main can't receive sigterm when reaping children Also added THREAD_MODE and PROCESS_MODE defines to use rather than bare constants 0 and 1. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-09version bump to 0.77v0.77Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-09remove tracemark functions from cyclictestClark Williams1-35/+1
removed trace marking functions because they cause too much contention on multiprocessor systems. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07version bump to 0.76v0.76Clark Williams2-1/+8
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07add stat(2) shortcuts to mount_debugfs()Clark Williams2-10/+36
Before trying to parse /proc/mount, check for existance of directories /sys/kernel/debug/tracing and /debug/tracing using stat(2). Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07modify /proc/sys/kernel/ftrace_enabled handlingClark Williams1-3/+16
Only turn on ftrace_enabled if we're doing tracing that requires the function tracer. Don't turn it on for event-based tracing. Also, turn it off a the end of a run. Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07handle stupid systemd automount of debugfsClark Williams1-3/+19
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-02version bump to 0.75v0.75Clark Williams2-1/+11
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-01allow tracemark() to take variable argsSteven Rostedt1-2/+13
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01use interval on first loop instead of 1 secondSteven Rostedt1-1/+4
Use the interval given for the first loop instead of one second wait. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01only check file descriptor in tracemark() functionSteven Rostedt1-1/+1
If the tracemark_fd is >= 0, then we know we can write to the trace_marker file. We only need to check that and not version of the kernel or anything else at every instance of calling tracemark(). Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01do not touch tracing_threshSteven Rostedt1-3/+0
The -b argument is for stopping the cyclictest when it misses a wakup by that # microseconds. Setting the tracing_thresh causes the latency tracer to ignore any latency under tracing_thresh. These two meanings are completely agnostic to each other, and should not be the same. We want the max latency, that should be good enough. Not only those that are bigger than our missed deadline. That misses most of our traces that we want. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01Have -I and -P together also be -BSteven Rostedt1-6/+22
-B is used to enable preemptirqsoff, but it also makes sense that one could use both -I and -P together for the same thing. Also rename the enum IRQPREEMPTOFF TO PREEMPTIRQSOFF to match the tracer it represents and avoid confusion. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01allow events for all tracersSteven Rostedt1-12/+14
Events are available for all tracers, including function and latency tracers. Do not treat them as a tracer. The -E option is agnostic to the tracer options, and if it is set, then events will be enabled for any tracer that is also set. If it is set by itself, then events will be enabled with the nop tracer. Also, the nop tracer is set before setting any of the tracers. This makes the nop tracer the default as well as clears out the trace before running the test. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01commit WIP for rostedtClark Williams3-45/+200
Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-18version bump to 0.74v0.74Clark Williams2-1/+11
Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-18fix possible buffer overflow in string handlingUwe Kleine-König2-4/+19
strncat writes up to n+1 chars when n is passed as 3rd argument. So when doing strncpy(filename, fileprefix, sizeof(filename)); strncat(filename, name, sizeof(filename) - strlen(fileprefix)); with strlen(fileprefix) + strlen(name) >= sizeof(filename) a buffer overflow occurs. Addionally there is no check if filename is big enough. So convert to memcpy and handle filename not being big enough. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-18added files to git repoClark Williams4-0/+814
Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-12update cyclictest to handle 3.0-rt as well is update ftraceClark Williams1-33/+81
reworked the kernel versioning logic to handle the 3.0 kernel and update the ftrace logic to deal with changes to the debugfs tracing directory. Signed-off-by: Clark Williams <williams@redhat.com>
2011-08-09Merge remote-tracking branch 'jkacur/rt-tests-dev-new' into workClark Williams1-5/+3
2011-05-13Minor Fix-upsJohn Kacur1-6/+4
1. Make the function header style consistent with the rest of cyclictest. 2. Spelling clean-ups. Signed-off-by: John Kacur <jkacur@redhat.com>
2011-05-12fixed spelling error in printfClark Williams1-1/+1
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-09fixed BuildRequires in specfile for PythonClark Williams1-1/+1
Need python to be able to correctly install hwlatdetect. Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-09version bump to 0.73v0.73Clark Williams2-1/+16
Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-05hackbench: add setjmp/longjmp and rework signal handling logicClark Williams1-34/+49
Use setjmp/longjump to get the parent process back out of processing loop and into forced kill mode for the child processes/threads. Added function reset_worker_signals() so that workers (sender and receiver) don't try to reap as well. Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04cyclictest: Fixed incorrect wakeup reset interfaceGeunsik Lim1-1/+2
When we try to run ftrace with cyclictest command of rt-test, We view the error according to different kernel version. We need to modify this hard coded interface. * Directory name of each kernel version 2.6.24.7-rt23 /sys/kernel/debug/tracing/latency_hist/wakeup_latency/reset 2.6.31-rc9-rt9.1 /sys/kernel/debug/tracing/latency_hist/wakeup/reset 2.6.33.7.2-rt30 /sys/kernel/debug/tracing/latency_hist/wakeup/reset * parsing verification: ./linux-2.6/scripts/checkpatch.pl --> OK Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com> Reviewed-by: John Kacur <jkacur@redhat.com> Reviewed-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04Simplify Makefile using -D option to installWolfram Sang1-4/+2
install can also create directories with -D Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04add histogram summary column option (-H) to cyclictestCarsten Emde2-10/+47
To compare histograms of several SMP machines or to gain an overview when cyclictest is running more than a single thread, an overall histogram is required that contains a summary of the individual thread latencies. This patch adds this functionality and introduces the new option -H/--histofall for this purpose. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04fix sched_setaffinity type error when building with UCLIBCDaniel Sangorrin1-4/+16
Change type of faux sched_setaffinity to match headers. Also add additional report info when dumping histogram. Signed-off-by: Clark Williams <williams@redhat.com>
2010-07-01install backfire's MakefileUwe Kleine-König1-0/+1
Only installing backfire.c hardly makes sense. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-01modernize backfire's MakefileUwe Kleine-König1-9/+12
- don't rely on non-standard envvar PWD, use make's CURDIR instead - allow overwriting KERNELDIR - less repetition by conflating targets - explicitly differentiate between kbuild and ordinary make part Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-06-25version bump to 0.72v0.72Clark Williams2-1/+7
Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-25convert convert 'unsigned long long' and 'long long' to uint64_t and int64_tClark Williams1-8/+9
Cleanup spurred by need to make the 'diff' variable in timerthread() to be unsigned and 64-bits (rather than a signed 32-bit). Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-14added --numa option to cyclictest man pageClark Williams1-1/+9
Documented the --numa mode option to cyclictest in the man page. Also updated the command summary to include the short options for the --smp and --numa modes (-S and -U). Signed-off-by: Clark Williams <williams@redhat.com>
2010-05-18version bump to 0.71v0.71Clark Williams2-1/+5
Signed-off-by: Clark Williams <williams@redhat.com>
2010-05-18cyclictest: fix accumulating overruns in periodic timer modeMichal Schmidt1-0/+5
When using a POSIX interval timer and an overrun occurs, a signal is always lost. From then on cyclictest would report all measurements as increased by N*period (where N is the number of overruns). cyclictest can detect the overruns and adjust the expected time of the next tick accordingly. Reported-by: Marti Raudsepp <marti@juffo.org> Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-09version bump to 0.70v0.70Clark Williams2-1/+5
2010-04-09skip python dependency in rt-tests make installOlaf Hering1-3/+6
If python is not available on the target, skip the hwlatdetect.py installation with: make PYLIB= DESTDIR=/some/dir install Create PYLIB during make install with DESTDIR set Also, the second bindir should probably be srcdir. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-09version bump to 0.69v0.69Clark Williams2-1/+8
2010-04-09default cyclictest to SCHED_OTHER; clean up help messageClark Williams1-3/+3
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>
2010-04-09added pmqtest to .gitignoreClark Williams1-0/+1
2010-04-01fix bus error when in numa mode with more than 16 coresClark Williams1-1/+1
The call numa_node_to_cpus() in rt_numa_numa_node_of_cpu() was failing because the cpumask buffer size was only 16 bytes and it seems to require 32. Change the declaration to be 256 just for paranoia's sake. Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01replace nanosleep with clock_nanosleep in pmqtestClark Williams1-2/+2
Since it's doing relative time sleeps probably not an issue, but move to clock_nanosleep(CLOCK_MONOTONIC, 0,...) to be clear. Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01Add pmqtest programCarsten Emde5-2/+668
This patch adds the program pmqtest to the rt-tests suite. The test mechanism is the same as in ptsematest, svsematest and friends, but it uses message queues to synchronize the test threads. To test the - now hopefully fixed - kernel problem that occurred when a timeout was specified, the -T option is available. On an 8-way machine, the test result may look like: Signed-off-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01fixed typo in cyclictest.8 man pageClark Williams1-1/+1
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-19version bump to 0.68v0.68Clark Williams2-1/+4
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-19handle ftrace difference between 2.6.24 and 2.6.33Clark Williams1-3/+24
Somewhere between 2.6.24 and 2.6.33, the tracing_on field was added to the debugfs tracing dir. If it exists use it to turn tracing on and off; if not use tracing_enabled. Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16version bump to 0.67v0.67Clark Williams2-3/+21
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16Merge branch 'work' into tempClark Williams7-10/+610
Conflicts: .gitignore Makefile
2010-03-16added hackbench executable to ignore targets in .gitignoreClark Williams1-0/+1
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16reword rpm %description field for clarity (BZ# 572323)Clark Williams1-3/+3
Changed description field to be more descriptive Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16modifications to ftrace logic for correct operationClark Williams1-4/+11
Change enable/disable file to be tracing/tracing_on; enable the options/latency-trace format for function tracing; add tracetype CUSTOM for use with the -T/--tracer option. Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-10cyclictest - fixed missing ':' in option processing string for -T optionClark Williams1-2/+2
the -T option (set tracer) option was missing a ':' for to indicate that it required an argument. Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-08add-smp-option-to-svsematest.patchCarsten Emde1-2/+23
Add SMP testing option (-S, --smp) to svsematest, same as in cyclictest. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Acked-by: John Kacur <jkacur@redhat.com>
2010-03-08add-smp-option-to-ptsematest.patchCarsten Emde1-2/+23
Add SMP testing option (-S, --smp) to ptsematest, same as in cyclictest. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Acked-by: John Kacur <jkacur@redhat.com>
2010-03-08remove-incorrect-options-from-smp-help-message-in-cyclictest.patchCarsten Emde1-2/+2
The help message of cyclictest's -S option says that it equals -a -t -n -m -d0. In reality, it only equals -a -t -n. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Acked-by: John Kacur <jkacur@redhat.com>
2010-03-08fix-policy-display-for-cyclictest.patchCarsten Emde1-6/+19
If the policy is forced to SCHED_OTHER, since the priority no longer fits into the SCHED_FIFO or SCHED_RR range, the policy display of cyclictest is somewhat incorrect. Display all policies. Also make the variable policystr static; the condition "if (!policystr)" is useless, otherwise. In addition, place the priority logic before decrementing the priority; a priority of 1 is incorrectly made SCHED_OTHER, otherwise. Signed-off-by: Carsten Emde <C.Emde@osadl.org> Acked-by: John Kacur <jkacur@redhat.com>
2010-03-08cyclictest: Make the default scheduling policy SCHED_FIFOJohn Kacur1-2/+1
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>
2010-03-08cyclictest: Fix spelling mistake in the man page.John Kacur1-1/+1
- In the -mlockall section, change "an" to "and" Signed-off-by: John Kacur <jkacur@redhat.com>
2010-03-08cyclictest: Use symbolic names for scheduling policyJohn Kacur1-10/+5
- Use symbolic names for scheduling policies, that is, don't assume SCHED_RR is 2, use SCHED_RR instead, and so on. - Fix the logic in handlepolicy(char *polname) - remove the test with the unreachable line, - make the default SCHED_FIFO if we don't recognize the requested policy. Signed-off-by: John Kacur <jkacur@redhat.com>
2010-03-08Revert "simplify equal priority logic for cyclictest"John Kacur1-5/+2
This reverts commit 582be2a52c43801a10d318de7491f1cc7243d5cf. Unfortunately this commit introduces a bug because the priority is not retested, and this can result in reported priorities below 0. For example, sudo ./cyclictest -t3 -p1 policy: fifo: loadavg: 0.09 0.06 0.05 1/331 21732 T: 0 (21730) P: 1 I:1000 C: 593 Min: 34 Act: 155 Avg: 100 Max: 672 T: 1 (21731) P: 0 I:1500 C: 395 Min: 15 Act: 43 Avg: 72 Max: 853 T: 2 (21732) P:-1 I:2000 C: 297 Min: 21 Act: 57 Avg: 79 Max: 330 Notice that the last priority is reported as -1. After reverting this commit, we get the correct expected behaviour. sudo ./cyclictest -t3 -p1 policy: fifo: loadavg: 0.07 0.05 0.04 2/330 21754 T: 0 (21752) P: 1 I:1000 C: 11600 Min: 13 Act: 7072 Avg: 3593 Max: 7841 T: 1 (21753) P: 0 I:1500 C: 7737 Min: 12 Act: 1572 Avg: 516 Max: 2381 T: 2 (21754) P: 0 I:2000 C: 5804 Min: 12 Act: 53 Avg: 59 Max: 548 I think it can be argued that the original code is also clearer, although that is somewhat subjective. With the original code I don't need to track down exactly what "sameprio" means, and it is clear what is being tested. Signed-off-by: John Kacur <jkacur@redhat.com>
2010-03-01rename pip to pip_stress as pip is too generalUwe Kleine-König4-12/+11
The command name is already taken by a perl script working with CPAN and a Python package installer. While at it remove trailing whitespace from three lines in src/pi_tests/pip_stress.c. Closes: http://bugs.debian.org/572104 Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: John Kacur <jkacur@redhat.com>
2010-03-01Makefile: don't use temporary files in generation of dependency filesUwe Kleine-König1-4/+1
These temporary files were a real problem when creating the Debian package for rt-tests. debhelper (a generic suite of scripts to ease packaging) did something like: perl -c 'close(STDERR); exec("make distclean");' which leaked the *.d.$$ files and then wailed that the package contained untracked changes to the vanilla source. See http://bugs.debian.org/570443 for some more details. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: John Kacur <jkacur@redhat.com>
2010-03-01install backfire.c to $(srcdir)/backfire/Uwe Kleine-König1-0/+1
Acked-by: John Kacur <jkacur@redhat.com>
2010-03-01trivial: s/specifed/specified/Uwe Kleine-König1-1/+1
Acked-by: John Kacur <jkacur@redhat.com>
2010-02-24fix stupid typo in %changelog dateClark Williams1-1/+1
2010-02-24Merge remote branch 'uwe/for-clark' into workClark Williams2-5/+3
2010-02-24added hackbench manpage installation bitsClark Williams2-0/+2
Added hackbench.8 installation to both Makefile and specfile Signed-off-by: Clark Williams <williams@redhat.com>
2010-02-24Merge remote branch 'davids/master' into workClark Williams1-1/+37
2010-02-24Updated hackbench man page with some examples and some extra details re. fdsDavid Sommerseth1-1/+37
2010-02-24Makefile: don't use temporary files in generation of dependency filesUwe Kleine-König1-4/+1
These temporary files were a real problem when creating the Debian package for rt-tests. debhelper (a generic suite of scripts to ease packaging) did something like: perl -c 'close(STDERR); exec("make distclean");' which leaked the *.d.$$ files and then wailed that the package contained untracked changes to the vanilla source. See http://bugs.debian.org/570443 for some more details. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-02-24install backfire.c to $(srcdir)/backfire/Uwe Kleine-König1-0/+1
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-02-24Merge remote branch 'davids/master' into workClark Williams2-174/+50
2010-02-24hackbench - Taken out the runit.pl scriptDavid Sommerseth2-126/+1
We don't need to ship that, and Craig Thomas wrote only that code as far as we know, so taking him out of man page as well.
2010-02-24hackbench, man page: Added another contributor and a brief history of hackbenchDavid Sommerseth1-5/+19
2010-02-24man page, hackbench - Corrected wrong spellingDavid Sommerseth1-1/+1
2010-02-24Updated man page for hackbenchDavid Sommerseth1-51/+38