Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
|
|
1. Make the function header style consistent with the rest of cyclictest.
2. Spelling clean-ups.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Need python to be able to correctly install hwlatdetect.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
install can also create directories with -D
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
Only installing backfire.c hardly makes sense.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
- 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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Conflicts:
.gitignore
Makefile
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Changed description field to be more descriptive
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- In the -mlockall section, change "an" to "and"
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
- 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>
|
|
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>
|
|
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>
|
|
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>
|
|
Acked-by: John Kacur <jkacur@redhat.com>
|
|
Acked-by: John Kacur <jkacur@redhat.com>
|
|
|
|
|
|
Added hackbench.8 installation to both Makefile and specfile
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
|
|
|
|
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>
|
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
When receiving SIGINT or SIGTERM, it will now reap all worker
threads/processes and properly stop them.
|
|
Improved argument/option handling by using getopt_long(). Made more of the
parameters tunable as well. Hackbench now accepts the following arguments:
-P | --pipe Use pipe
-s | --datasize Number of bytes to pass from sender to receiver
(default 100 bytes)
-l | --loops Number of messages each sender will send
(default 100 rounds)
-g | --groups Number of groups with sender/receivers
(default 10 groups)
-f | --fds Number of file descriptors each group will use
(default 20*2)
-T | --threads Run using pthreads
-P | --process Run using fork()
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
This does much what earlier commits did before hackbench got updated
to the latest version in the previous commit.
Consider the following commits being "forward ported", feature wise:
4c39eff2136c39b3c2746ca293eed5b5242aea52
0a72fcaade064b70b698aab676217f28681280ff
fbd80c495bd861545713279d5f96f1e4770d6911
bd588c92b8bae59e3404fc3c90283e98c9f0a96e
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Downloaded from http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c
February 19 2010.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
|
|
Improved argument/option handling by using getopt_long(). Made more of the
parameters tunable as well. Hackbench now accepts the following arguments:
-P | --pipe Use pipe
-s | --datasize Number of bytes to pass from sender to receiver
(default 100 bytes)
-l | --loops Number of messages each sender will send
(default 100 rounds)
-g | --groups Number of groups with sender/receivers
(default 10 groups)
-f | --fds Number of file descriptors each group will use
(default 20*2)
-T | --threads Run using pthreads
-P | --process Run using fork()
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
This does much what earlier commits did before hackbench got updated
to the latest version in the previous commit.
Consider the following commits being "forward ported", feature wise:
4c39eff2136c39b3c2746ca293eed5b5242aea52
0a72fcaade064b70b698aab676217f28681280ff
fbd80c495bd861545713279d5f96f1e4770d6911
bd588c92b8bae59e3404fc3c90283e98c9f0a96e
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Downloaded from http://people.redhat.com/mingo/cfs-scheduler/tools/hackbench.c
February 19 2010.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
added makefile targets for hackbench scheduler benchmark
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Valgrind complained about usage of non-initialised data. The compiler
complained about the out_fds argument being unsigned int when calling
sender().
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Instead of just exiting immediately the original version did, we now
count how many children who failed to exit properly and report it.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
In commit 4c39eff2136c39b3c2746ca293eed5b5242aea52 a new approach for tracking
each child was implemented. But this implementation ignored the fact that each
group() call creates 2*num_fds children.
This patch refactors the previous attempt and will now track absolutely all
children. If fork() fails when called in group(), all spawned children will
now also be killed explicitly.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Quite often it's experienced in rteval that hackbench leaves some children
as zombies during closure. This is an attempt to keep an overview of the
status of each child separately. It's solved by having an array with all
sender and reciever children's pids and calling waitpid() on each of these
children pairs.
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Fix code in check_privs() that passes NULL as parameter
to sched_setscheduler().
Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Add a workaround to hwlatdetect to deal with a broken block of
code in drivers/misc/smi_detector.ko, where whenever you enable
the module (write a 1 to debugfs/smi_detector/enable) the stats
initialization routine resets the threshold from whatever it was
set to to 1us. This workaround checks the threshold after enabling
the module and resets it to what we want.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Ignore dependency files *.d ing git.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Automatically generate dependencies. This will tell the make file that
cyclictest is dependent on rt_numa.h for example, and that if a change
is made there, then cyclictest needs to be remade.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Fix some style problems, such as spaces instead of tabs, trailing spaces,
spaces required before }
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Remove the ret variable, the end lable and the goto. We already have
inconsistent exit points for the function, and the end lable wasn't strictly
for errors. Directly returning simplifies and shortens the code.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Separate the #ifdef LIBNUMA_API_VERSION of function rt_numa_numa_node_of_cpu,
it is slightly cleaner this way.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Add a header which includes a copyright notice to rt_numa.h for cyclictest.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Modified NUMA code to handle version 1 API (for RHEL5)
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Added NUMA=1 to specfile build command line to enable NUMA
options. Added description of --numa option to usage output.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: John Kacur <jkacur@redhat.com>
Cc: Carsten Emde <carsten.emde@osadl.org>
|
|
Moved the hwlatdetect script to the python site-library directory
so that it can be imported by other scripts
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Some embedded developers cross-compile the tests with the -static link flag.
Reordering the link flags in LIBS to put -lrt before -lpthread is necessary,
else you get undefined references to pthread calls.
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
use a variable to indicate that priorities should be equal
on all cpus when smp, numa or histogram options are specified.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Runtime tests are not sufficient, cyclic tests needs to be compilable
on non-numa systems.
This separates numa functionality into rt_numa.h
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
This adds a NUMA compile option, and links to numa only for the tests that
need it. (Currently that is only cyclictest)
If you want to build with the NUMA feature, then define NUMA to anything.
Eg., make NUMA=1
This only adds support to the Makefile. Further patches are required
to make this work in cyclictest itself.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
added back reference to outpar label in allocation failure for
statistics array (got dropped in previous two commits).
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
refactored numa allocation logic into threadalloc() and added
threadfree() for releasing it.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Modify cyclictest to have a --numa option which enables calls into
libnuma functions for binding threads to memory nodes.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Added the --smp (-S) option which is short hand for setting
the options -t, -a, and -n and for not changing any specified
priority across processors.
Also changed many printfs to use either warn() or fatal()
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Added routines to print warning and fatal messages with appropriate
text prefixes (e.g. WARNING: and FATAL: )
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
|
|
When reading the output from cyclictest with another program, the data is
buffered by default. This prevents nice 'live' display.
This patch adds an command line option to force the output to always be
unbuffered.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
John,
When creating an RPM package with the newly provided test pip, the message
error: Installed (but unpackaged) file(s) found:
/usr/bin/pip
appeared, and rpmbuild refused to finish building the package.
Carsten.
-=--------------------------------------------------------------------=-
Prevent rpmbuild from finding installed but unpackaged files.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
|
|
Add a "make tags" option to the Makefile
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Use check_privs() from the rt-utils library to make sure that the user is
running with real-time privileges for the pip test program.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Move header files from src/lib to src/include and adjust the Makefile to
reflect this change.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
This test is similar to pi_stress in that it purpursely triggers a priority-
inversion. However, instead of using pthreads it uses processes.
Since pthread_mutex_t are the only objects backed by priority inheritance
this is accomplished by having the processes use a pthread_mutex_t in
shared memory. See the header of pip.c for more information as well as the
code of course.
In addition this patch starts a src/include directory as a common place
to put header files.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Add error routines, similar to those found in Advanced Programming in the
UNIX Environment 2nd ed. for use by all rt test programs
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
classic_pi was the original proof of concept for a Priority
Inheritance mutex demonstration, but pi_stress does that much
better now.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: David Sommerseth <davids@redhat.com>
|
|
- Added the '+' back to the arguments (John)
Signed-off-by: David Sommerseth <davids@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Clean-up, Fix the comment part of the #endif protecting include files
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
|
|
Added missing () to get_debugfileprefix in cyclictest.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
renamed the guard macros in rt-get_cpu.h and rt-utils.h to
have leading double underscores which takes them out of the
application namespace. Also changed a '.' in the rt-get_cpu.h
guard macro to an underscore.
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Clean-up: Protect rt-utils.h with #ifndef RT_UTILS_H
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Add a get_cpu() function to the library.
Most platforms will simply use sched_getcpu()
However, if you have a glibc < 2.6 then
64-bits will use vsyscall for getcpu (if available).
32-bits will use getcpu() (if available)
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
- These changes simplify the Makefile. For example, notice that we no
longer need to specify the full path to the source file
- These changes also unify the Makefile, for example, every program
gets VERSION_STRING as an floating point number.
- Due to the above change I had to make a number of changes in the programs
that expected VERSION_STRING as a string.
- By unifying what we CFLAGS, to include -D_GNU_SOURCE, I had to remove
__USE_GNU which is reduncant in a number of files.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Conflicts:
src/backfire/sendme.c
|
|
Somehow the last set of tests added got converted to DOS text
(CRLF line terminators). Change them back
Signed-off-by: Clark Williams <williams@redhat.com>
|
|
Conflicts:
rt-tests.spec-in
|
|
|
|
John,
thanks a lot for taking care of the new tests.
By some reason, the spec file was not included in the patch. This
patch is needed to prevent the rpm build from finding installed
but unpackaged files.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
|
|
Do a better job of explaining that the backfire kernel module may need
building in the sendme program.
Signed-off-by: Carsten Emde <C.Emde@osadl.org>
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Add a .gitignore file in the backfire directory for generated files
that are created when making the kernel module.
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
The kernel module can be made by cding to src/backfire and doing
make modules
sudo make modules_install
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
Change the PHONY target for install to install
Signed-off-by: John Kacur <jkacur@redhat.com>
|
|
from signaltest - because it doesn't have the fix that check_privs in
cyclictest has - to return the sched_priority to 0
This is a good example of why common functions should be put into libraries -
so all programs benefit from fixes.
Signed-off-by: John Kacur <jkacur@redhat.com>
|