Commit Graph

997 Commits

Author SHA1 Message Date
Clark Williams 809f870eb8 hackbench: add setjmp/longjmp and rework signal handling logic
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>
2011-05-05 13:44:09 -05:00
Geunsik Lim 02da29f450 cyclictest: Fixed incorrect wakeup reset interface
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>
2011-05-04 15:42:00 -05:00
Wolfram Sang 895dd83946 Simplify Makefile using -D option to install
install can also create directories with -D

Signed-off-by: Clark Williams <williams@redhat.com>
2011-05-04 15:39:16 -05:00
Carsten Emde f833b0949f add histogram summary column option (-H) to cyclictest
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>
2011-05-04 15:33:16 -05:00
Daniel Sangorrin 4681c81deb fix sched_setaffinity type error when building with UCLIBC
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>
2011-05-04 15:04:41 -05:00
Uwe Kleine-König a5693cc785 install backfire's Makefile
Only installing backfire.c hardly makes sense.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-01 06:56:01 +02:00
Uwe Kleine-König 94f60c4138 modernize backfire's Makefile
- 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>
2010-07-01 06:34:05 +02:00
Clark Williams 886d26833d version bump to 0.72
Signed-off-by: Clark Williams <williams@redhat.com>
2010-06-25 16:16:46 -05:00
Clark Williams e4c7a0753c convert convert 'unsigned long long' and 'long long' to uint64_t and int64_t
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>
2010-06-25 16:10:40 -05:00
Clark Williams a3194e71ef added --numa option to cyclictest man page
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>
2010-06-14 14:50:02 -05:00
Clark Williams 9a0525c5b1 version bump to 0.71
Signed-off-by: Clark Williams <williams@redhat.com>
2010-05-18 12:37:56 -05:00
Michal Schmidt 1b3f408a33 cyclictest: fix accumulating overruns in periodic timer mode
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>
2010-05-18 12:28:39 -05:00
Clark Williams 9d503b107d version bump to 0.70 2010-04-09 13:56:15 -05:00
Olaf Hering 691f7a82fb skip python dependency in rt-tests make install
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>
2010-04-09 13:52:13 -05:00
Clark Williams 7142b67d8f version bump to 0.69 2010-04-09 13:30:29 -05:00
Clark Williams d6c4ab8698 default cyclictest to SCHED_OTHER; clean up help message
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>
2010-04-09 13:06:33 -05:00
Clark Williams ba12344ecb added pmqtest to .gitignore 2010-04-09 13:05:37 -05:00
Clark Williams 663bd628f5 fix bus error when in numa mode with more than 16 cores
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>
2010-04-01 15:48:34 -05:00
Clark Williams f37d47179d replace nanosleep with clock_nanosleep in pmqtest
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>
2010-04-01 14:11:33 -05:00
Carsten Emde 5b346bd9e8 Add pmqtest program
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>
2010-04-01 13:39:43 -05:00
Clark Williams c9c0e4e3ad fixed typo in cyclictest.8 man page
Signed-off-by: Clark Williams <williams@redhat.com>
2010-04-01 13:35:42 -05:00
Clark Williams 92f3c57a50 version bump to 0.68
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-19 14:44:33 -05:00
Clark Williams ffebccf9f9 handle ftrace difference between 2.6.24 and 2.6.33
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>
2010-03-19 14:39:44 -05:00
Clark Williams 2ef575b81b version bump to 0.67
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 16:14:11 -05:00
Clark Williams 95c65d4c00 Merge branch 'work' into temp
Conflicts:
	.gitignore
	Makefile
2010-03-16 15:54:01 -05:00
Clark Williams 7f19bd8a31 added hackbench executable to ignore targets in .gitignore
Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 15:41:01 -05:00
Clark Williams ba15a4ab82 reword rpm %description field for clarity (BZ# 572323)
Changed description field to be more descriptive

Signed-off-by: Clark Williams <williams@redhat.com>
2010-03-16 15:38:53 -05:00
Clark Williams d61850a9f0 modifications to ftrace logic for correct operation
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>
2010-03-16 15:36:39 -05:00
Clark Williams 5860be7f4d cyclictest - fixed missing ':' in option processing string for -T option
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>
2010-03-10 10:45:42 -06:00
Carsten Emde afb31fb21d add-smp-option-to-svsematest.patch
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>
2010-03-08 13:40:33 +01:00
Carsten Emde cd34b8b172 add-smp-option-to-ptsematest.patch
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>
2010-03-08 13:40:10 +01:00
Carsten Emde f02c5d5ad0 remove-incorrect-options-from-smp-help-message-in-cyclictest.patch
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>
2010-03-08 13:38:15 +01:00
Carsten Emde 7dd5ce7709 fix-policy-display-for-cyclictest.patch
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>
2010-03-08 13:36:11 +01:00
John Kacur 1263ebde63 cyclictest: Make the default scheduling policy SCHED_FIFO
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>
2010-03-08 02:02:13 +01:00
John Kacur ce8c590232 cyclictest: Fix spelling mistake in the man page.
- In the -mlockall section, change "an" to "and"

Signed-off-by: John Kacur <jkacur@redhat.com>
2010-03-08 01:45:35 +01:00
John Kacur e12de2f062 cyclictest: Use symbolic names for scheduling policy
- 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>
2010-03-08 01:38:49 +01:00
John Kacur 6fb5b9cd90 Revert "simplify equal priority logic for cyclictest"
This reverts commit 582be2a52c.

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>
2010-03-08 01:07:44 +01:00
Uwe Kleine-König 6214410e57 rename pip to pip_stress as pip is too general
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>
2010-03-01 20:43:25 +01:00
Uwe Kleine-König d2b6363c8b Makefile: don't use temporary files in generation of dependency files
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>
2010-03-01 20:43:03 +01:00
Uwe Kleine-König de3d4d2539 install backfire.c to $(srcdir)/backfire/
Acked-by: John Kacur <jkacur@redhat.com>
2010-03-01 20:42:50 +01:00
Uwe Kleine-König 84367c8e07 trivial: s/specifed/specified/
Acked-by: John Kacur <jkacur@redhat.com>
2010-03-01 20:42:26 +01:00
Clark Williams 4dec55015c fix stupid typo in %changelog date 2010-02-24 15:20:34 -06:00
Clark Williams 6fc24e1719 Merge remote branch 'uwe/for-clark' into work 2010-02-24 15:07:50 -06:00
Clark Williams 2afa6340dc added hackbench manpage installation bits
Added hackbench.8 installation to both Makefile and specfile

Signed-off-by: Clark Williams <williams@redhat.com>
2010-02-24 15:07:19 -06:00
Clark Williams 24cc3c0830 Merge remote branch 'davids/master' into work 2010-02-24 10:47:19 -06:00
David Sommerseth bd43983e36 Updated hackbench man page with some examples and some extra details re. fds 2010-02-24 17:29:46 +01:00
Uwe Kleine-König 0fbe09d46c Makefile: don't use temporary files in generation of dependency files
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>
2010-02-24 17:22:15 +01:00
Uwe Kleine-König a893258ef9 install backfire.c to $(srcdir)/backfire/
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-02-24 16:51:11 +01:00
Clark Williams 19b274dbf5 Merge remote branch 'davids/master' into work 2010-02-24 09:36:13 -06:00
David Sommerseth 94d8566d6c hackbench - Taken out the runit.pl script
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.
2010-02-24 16:26:13 +01:00