diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-18 16:52:54 +0100 |
---|---|---|
committer | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2011-02-18 16:52:54 +0100 |
commit | ea00cb53cc8ab0bd158dca4fa5f7c8968b34f244 (patch) | |
tree | 8acaddaa0ec71ccaa1dc0aa2c57b13e376915ac8 | |
parent | 66683887d15b0846ef4fa37f0d95306194bd64f3 (diff) | |
parent | 886d26833d637ab778023626a158061e4eb9c5d0 (diff) | |
download | rt-tests-ea00cb53cc8ab0bd158dca4fa5f7c8968b34f244.tar.gz |
Merge tag 'v0.72' of git://git.us.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests
Notice: this object is not reachable from any branch.
Notice: this object is not reachable from any branch.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | rt-tests.spec-in | 6 | ||||
-rw-r--r-- | src/cyclictest/cyclictest.8 | 10 | ||||
-rw-r--r-- | src/cyclictest/cyclictest.c | 17 |
4 files changed, 25 insertions, 10 deletions
@@ -1,4 +1,4 @@ -VERSION_STRING = 0.71 +VERSION_STRING = 0.72 sources = cyclictest.c signaltest.c pi_stress.c rt-migrate-test.c \ ptsematest.c sigwaittest.c svsematest.c pmqtest.c sendme.c \ diff --git a/rt-tests.spec-in b/rt-tests.spec-in index 5ce9966..e9afb1e 100644 --- a/rt-tests.spec-in +++ b/rt-tests.spec-in @@ -61,6 +61,12 @@ rm -rf $RPM_BUILD_ROOT /usr/share/man/man8/hackbench.8.gz %changelog +* Fri Jun 25 2010 Clark Williams <williams@redhat.com> - 0.72-1 +- changed 'diff' variable in timerthread() routine to be unsigned + 64-bit to avoid overflow issues in debugging +- included <stdint.h> and changed all 'long long' declarations to + use uint64_t and int64_t + * Tue May 18 2010 Clark Williams <williams@redhat.com> - 0.71-1 - from Michal Schmit <mschmidt@redhat.com>: - fix accumulating overruns in periodic timer mode diff --git a/src/cyclictest/cyclictest.8 b/src/cyclictest/cyclictest.8 index 77f57c5..914075f 100644 --- a/src/cyclictest/cyclictest.8 +++ b/src/cyclictest/cyclictest.8 @@ -18,7 +18,7 @@ cyclictest \- High resolution test program .B cyclictest .RI "[ \-hfmnqrsvMS ] [\-a " proc " ] [\-b " usec " ] [\-c " clock " ] [\-d " dist " ] \ [\-h " histogram " ] [\-i " intv " ] [\-l " loop " ] [\-o " red " ] [\-p " prio " ] \ -[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy "]" +[\-t " num " ] [\-D " time "] [\-w] [\-W] [\-y " policy " ] [ \-S | \-U ]" .\" .SH DESCRIPTION .\" This manual page documents briefly the @@ -164,6 +164,14 @@ running cyclictest on low-bandwidth connections) Set options for standard testing on SMP systems. Equivalent to using the options: "\-t \-a \-n" as well keeping any specified priority equal across all threads +.TP +.B \\-U, \-\-numa +Similar to the above \-\-smp option, this implies the "\-t \-a \-n" +options, as well as a constant measurement interval, but also forces +memory allocations using the numa(3) policy library. Thread stacks and +data structures are allocated from the NUMA node local to the core to +which the thread is bound. Requires the underlying kernel to have NUMA +support compiled in. .\" .SH SEE ALSO .\" .BR bar (1), .\" .BR baz (1). diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index 6829d34..0847aed 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -12,6 +12,7 @@ #include <stdio.h> #include <stdlib.h> +#include <stdint.h> #include <unistd.h> #include <fcntl.h> #include <getopt.h> @@ -270,18 +271,18 @@ static inline void tsnorm(struct timespec *ts) } } -static inline long long calcdiff(struct timespec t1, struct timespec t2) +static inline int64_t calcdiff(struct timespec t1, struct timespec t2) { - long long diff; + int64_t diff; diff = USEC_PER_SEC * (long long)((int) t1.tv_sec - (int) t2.tv_sec); diff += ((int) t1.tv_nsec - (int) t2.tv_nsec) / 1000; return diff; } -static inline long long calcdiff_ns(struct timespec t1, struct timespec t2) +static inline int64_t calcdiff_ns(struct timespec t1, struct timespec t2) { - long long diff; - diff = NSEC_PER_SEC * (long long)((int) t1.tv_sec - (int) t2.tv_sec); + int64_t diff; + diff = NSEC_PER_SEC * (int64_t)((int) t1.tv_sec - (int) t2.tv_sec); diff += ((int) t1.tv_nsec - (int) t2.tv_nsec); return diff; } @@ -630,7 +631,7 @@ void *timerthread(void *param) while (!shutdown) { - long diff; + uint64_t diff; int sigs, ret; /* Wait for next period */ @@ -1139,7 +1140,7 @@ static void print_tids(struct thread_param *par[], int nthreads) static void print_hist(struct thread_param *par[], int nthreads) { int i, j; - unsigned long long log_entries[nthreads]; + uint64_t log_entries[nthreads]; bzero(log_entries, sizeof(log_entries)); @@ -1355,7 +1356,7 @@ int main(int argc, char **argv) case AFFINITY_USEALL: par->cpu = i % max_cpus; break; } stat->min = 1000000; - stat->max = -1000000; + stat->max = 0; stat->avg = 0.0; stat->threadstarted = 1; status = pthread_create(&stat->thread, &attr, timerthread, par); |