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>
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:
4c39eff2130a72fcaadefbd80c495bbd588c92b8
Signed-off-by: David Sommerseth <davids@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 4c39eff213 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>
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>
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>
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>