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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>