summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-09version bump to 0.84HEADv0.84masterClark Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2012-05-09rt-tests / cyclictest: Make cyclictest fail if it cannot run with requested ↵John Kacur
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 Rowand
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 Rowand
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 Rowand
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 Rowand
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 Rowand
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 Rowand
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 Williams
Conflicts: Makefile
2012-03-26change cyclictest measurement thread to check returns and exit on errorClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2012-03-26install: Fix failed to create symbolic link hwlatdetect file existsJohn Kacur
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 Williams
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 Williams
2012-03-23install: Fix failed to create symbolic link hwlatdetect file existsJohn Kacur
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 Kacur
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 Kacur
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 Hart
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 Kacur
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 Rostedt
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 Kacur
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 Williams
2012-02-13cyclictest problem/bug as non-rootNicholas Mc Guire
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 Williams
2011-11-10[cyclictest] added priority spreading option --priospreadClark Williams
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 Kohlhase
2011-09-26version bump to 0.83v0.83Clark Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-26Modified Makefile to be smarter about turning on/off NUMA compileClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-21fix print that causes histogram processing error in cyclictestClark Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20version bump to 0.81v0.81Clark Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20cleaned up previous hack for using /dev/cpu_dma_latencyClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-20use latency trick to hold system in idle=poll for duration of cyclictest runClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-15hackbench mods to work better under stressClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-14modify signal handling logic and clarify modeClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-09remove tracemark functions from cyclictestClark Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-07add stat(2) shortcuts to mount_debugfs()Clark Williams
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 Williams
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 Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-02version bump to 0.75v0.75Clark Williams
Signed-off-by: Clark Williams <williams@redhat.com>
2011-09-01allow tracemark() to take variable argsSteven Rostedt
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-09-01use interval on first loop instead of 1 secondSteven Rostedt
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 Rostedt
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 Rostedt
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 Rostedt
-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>