summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClark Williams <williams@redhat.com>2010-02-24 09:36:13 -0600
committerClark Williams <williams@redhat.com>2010-02-24 09:36:13 -0600
commit19b274dbf59f3b02d86044ce833105685df08e4c (patch)
treeaaa8bf7da53541d0efe2594b996fb6f348c5996c
parent61482066d5261c1ce76f8e504544b03c2544b6cd (diff)
parent94d8566d6ccaf090ad44611a6f99a3b540798029 (diff)
downloadrt-tests-19b274dbf59f3b02d86044ce833105685df08e4c.tar.gz
rt-tests-19b274dbf59f3b02d86044ce833105685df08e4c.tar.xz
Merge remote branch 'davids/master' into work
-rw-r--r--src/hackbench/hackbench.8101
-rw-r--r--src/hackbench/runit.pl123
2 files changed, 50 insertions, 174 deletions
diff --git a/src/hackbench/hackbench.8 b/src/hackbench/hackbench.8
index 438db26..bedb2fc 100644
--- a/src/hackbench/hackbench.8
+++ b/src/hackbench/hackbench.8
@@ -1,70 +1,69 @@
-.\" Hey, EMACS: -*- nroff -*-
-.TH HACKBENCH 8 "febrary 23, 2010"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nh disable hyphenation
-.\" .hy enable hyphenation
-.\" .ad l left justify
-.\" .ad b justify to both left and right margins
-.\" .nf disable filling
-.\" .fi enable filling
-.\" .br insert line break
-.\" .sp <n> insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
+.TH "hackbench" "8" "February 23, 2010" "" ""
+.SH "NAME"
hackbench \- scheduler benchmark/stress test
-.SH SYNOPSIS
+.SH "SYNOPSIS"
.B hackbench
-.RI "[ -p|--pipe ] [ -s|--datasize " <bytes> " ] [ -l|--loops " <num loops> " ] " \
-" [ -g|--groups " <num groups " ] [ -f|--fds " <num fds> " ] " \
-" [ -T|--threads ] [ -P|--process ] [ --help "]
+.RI "[\-p|\-\-pipe] [\-s|\-\-datasize " <bytes> "] "
+.RI "[\-l|\-\-loops " <num\-loops> "] "
+.RI "[\-g|\-\-groups "<num\-groups> "] "
+.RI "[\-f|\-\-fds <num\-fds>] "
+.RI "[\-T|\-\-threads] [\-P|\-\-process] [\-\-help]"
-.\" .SH DESCRIPTION
-.\" This manual page documents briefly the
-.\" .B hackbench commands.
-.\" .PP
-.\" \fI<whatever>\fP escape sequences to invode bold face and italics, respectively.
-.\" \fBhackbench\fP is a program that...
-.SH DESCRIPTION
+.SH "DESCRIPTION"
Hackbench is both a benchmark and a stress test for the Linux kernel
scheduler. It's main job is to create a specified number of pairs of
schedulable entities (either threads or traditional processes) which
communicate via either sockets or pipes and time how long it takes for
each pair to send data back and forth.
-.SH OPTIONS
+.SH "OPTIONS"
These programs follow the usual GNU command line syntax, with long
-options starting with two dashes ('\-\-').
-.br
+options starting with two dashes ("\-\-").
+.br
A summary of options is included below.
-.TP
-.B \-p, \-\-pipe
-.TP
+.TP
+.B \-p, \-\-pipe
+Sends the data via a pipe instead of the socket (default)
+.TP
.B \-s, \-\-datasize=<size in bytes>
-.TP
+Sets the amount of data to send in each message
+.TP
.B \-l, \-\-loops=<number of loops>
-.TP
+How many messages each sender/receiver pair should send
+.TP
.B \-g, \-\-groups=<number of groups>
-.TP
+Defines how many groups of senders and receivers should be started
+.TP
.B \-f, \-\-fds=<number of file descriptors>
-.TP
+Defines how many file descriptors each group of senders and receivers should use
+.TP
.B \-T, \-\-threads
-.TP
+Each sender/receiver child will be a POSIX thread of the parent.
+.TP
.B \-P, \-\-process
-.TP
+Hackbench will use fork() on all children (default behaviour)
+.TP
.B \-\-help
-.TP
+.br
+Shows a simple help screen
+.SH "AUTHORS"
+.LP
+hackbench was written by Rusty Russell <rusty@rustcorp.com.au>
+with contributions from Yanmin Zhang <yanmin_zhang@linux.intel.com>,
+Ingo Molnar <mingo@elte.hu> and David Sommerseth <davids@redhat.com>
-.\" .SH SEE ALSO
-.\" .BR bar (1),
-.\" .BR baz (1).
-.\" .br
-.\" The programs are documented fully by
-.\" .IR "The Rise and Fall of a Fooish Bar" ,
-.\" available via the Info system.
-.SH AUTHOR
-hackbench was written by Thomas Gleixner <tglx@linuxtronix.de>.
-.PP
-This manual page was written by Alessio Igor Bogani <abogani@texware.it>,
-for the Debian project (but may be used by others).
+This manual page was written by Clark Williams <williams@redhat.com>
+and David Sommerseth <davids@redhat.com>
+.SH "HISTORY"
+This version of hackbench is based on the code downloaded from http://people.redhat.com/mingo/cfs\-scheduler/tools/hackbench.c.
+Yanmin Zhang merged the original hackbench code from
+.br
+http://devresources.linuxfoundation.org/craiger/hackbench/src/hackbench.c
+which uses fork() and a modified version from
+.br
+http://www.bullopensource.org/posix/pi\-futex/hackbench_pth.c
+which uses pthread only and gave the possibility to change
+behaviour at run time. Hackbench have since then gone through some
+more rewriting to improve error handling and proper tracking of fork()ed
+children, to avoid leaving zombies on the system if hackbench stops
+unexpectedly.
diff --git a/src/hackbench/runit.pl b/src/hackbench/runit.pl
deleted file mode 100644
index 6e46b7b..0000000
--- a/src/hackbench/runit.pl
+++ /dev/null
@@ -1,123 +0,0 @@
-#!/usr/bin/perl -w
-
-use Env;
-
-if ( ! $STP_CLIENT_API )
-{
- print "No STP environment. Exiting.\n";
- exit -1;
-}
-
-# This will take two optional arguments:
-# STEP: Min value and The step to use
-# MAX: The maximum # of groups to reach in testing
-
-if ($#ARGV == 1)
-{
- $STEP = $ARGV[0];
- $MAX = $ARGV[1];
-} else {
- $STEP = 20;
- $MAX = 100;
-}
-
-# We suggest that unless you want to build in package listings for each possible
-# target OS, you should have a script ready to automate the build process.
-
-print "\nWelcome to the hackbench test\n\n";
-print "---Making the binaries (via make clean all)---\n";
-print `rm -rf bin`;
-print `tar -zxf hackbench_bin.tar.gz`;
-chdir "bin";
-print `make clean all 1> /dev/null`;
-print "---Done---\n\n";
-
-# Create final index.html
-open FHI, ">$WRAP_HOME/index.html";
-open FHO, "<$RESULTS_HEADER";
-while(<FHO>){
- print FHI;
-}
-close FHO;
-open FHO, "<$WRAP_HOME/index.body";
-while(<FHO>){
- print FHI;
-}
-close FHO;
-open FHO, "<$RESULTS_FOOTER";
-while(<FHO>){
- print FHI;
-}
-close FHI;
-close FHO;
-
-open (FILE, ">>$RESULTS/data") || die "cannot append to results file";
-print FILE "# Hackbench Results\n";
-print FILE "# -------------------------------\n";
-print FILE "# Processes | Ave Time(sec)\n";
-print FILE "# -------------------------------\n";
-
-# REMEMBER, any output form this file is sent as an email to the user, make sure it's
-# short, informative and not filled with binary error spews.
-
-print "========================\n";
-print "Executing hackbench runs\n";
-print "========================\n\n";
-
-# This is a basic run with simple values
-
-# The system makes this directory now
-#system "rm -rf $RESULTS";
-#mkdir "$RESULTS";
-
-@times = ();
-
-print "Running with $STEP to $MAX groups, with step $STEP\n";
-
-system ("/usr/bin/stp_timeout.sh 2h hackbench &");
-
-system ("stp_profile 'Test set-up complete.'");
-
-for ($numgr = $STEP; $numgr <= $MAX; $numgr += $STEP )
-{
- print "Running with $numgr groups";
-
- for ($run = 0; $run < 5; $run++)
- {
-
- if ( `./hackbench $numgr` =~ m/Time: ([0-9.]+)/ ) {
- $time = $1;
- }
- push(@times, $time);
- print ".";
- }
-
- $ave = 0;
- foreach $time (@times)
- {
- $ave += $time;
- }
- $ave = $ave / scalar(@times);
- print " Average $ave s\n";
-
- print FILE "$numgr $ave\n";
-}
-close FILE;
-
-system ("stp_profile 'Run test.'");
-
-open FHO, "<$RESULTS/data";
-open FHI, ">>$RESULTS_EMAIL";
-while (<FHO>){
- print FHI;
-}
-close FHO;
-close FHI;
-
-# Make the plot
-system "cp -a $WRAP_HOME/graph.cfg $RESULTS/";
-chdir $RESULTS;
-chmod 0755, 'graph.cfg';
-system ("$RESULTS/graph.cfg");
-
-exit;