Age | Commit message (Collapse) | Author |
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Conflicts:
Makefile
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
This reverts commit 64e635bc513a3a114729f86de7a87780b2737605.
moving to the check-return-and-exit strategy
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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
|
|
|
|
Add option to spread priorities across measurement threads in
decending order.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
removed trace marking functions because they cause too much
contention on multiprocessor systems.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
Use the interval given for the first loop instead of
one second wait.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
|
|
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>
|
|
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>
|
|
-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>
|