Test module : benchmarking read-side locking speed
Quoted 31 lines · * Steve Langstaff ([email protected]) wrote:
Quoted 31 lines
From: Mathieu Desnoyers [mailto:[email protected]]
Sent: 22 May 2009 16:02
To: Steve Langstaff
Cc: 'David Miller'; [email protected]; [email protected]; [email protected]; [email protected]; ltt- [email protected]; 'Subrata Modak'; 'Alan D. Brunelle'; 'Andika Triwidada'
Subject: Re: [ltt-dev] Test module : benchmarking read-side locking speedQuoted 5 lines · * Steve Langstaff ([email protected]) wrote:
Quoted 5 lines
From: Mathieu Desnoyers [mailto:[email protected]]
Sent: 21 May 2009 20:12I am trying to complete my numbers for performance impact of read-
side
Quoted 3 lines
Quoted 3 lines
locking primitives (on the fast path) for various architectures.
Help with testing on a larger set of architectures would be more
than
Quoted 9 lines
Quoted 5 lines
welcome. Note that this module requires the kernel to be configured with
CONFIG_PREEMPT=y. Some config option sanity checking is done at compile-time. Other requirement : disable invasive lockdep-style instrumentation.Another requirement is that
get_cycles()needs to return something meaningful :)
Quoted 9 lines
Quoted 4 lines
For ARMv7 Omap3, I have the following version (I've been able to get benchmarks with it yesterday). It requires LTTng to be started for the trace clock infrastructure to be in place and running to provide a full 64-bits emulated TSC.
Using your updated test source, I get slightly different results on my PXA255 (total time = 1 rather than 0), but I'm not convinced that the measurements are correct...
The LTTng trace clock only uses the cycle counter on ARM OMAP3, AFAIK. Therefore, the implementation you use is probably using a jiffy-based method+logical clock (see asm-generic/trace-clock.h). Therefore those numbers do not represent cycles.
Thanks,
Mathieu
Quoted 32 lines
/lib/modules/2.6.29.2# insmod ./ltt_test.ko[ 81.372318] test init [ 81.374647] Number of active CPUs : 1 [ 81.378806] test results: time for baseline [ 81.383010] number of loops: 20000 [ 81.386510] total time: 1 [ 81.389147] -> baseline takes 0 cycles [ 81.392910] test end [ 81.396017] test results: time for spinlock [ 81.400292] number of loops: 20000 [ 81.403711] total time: 1 [ 81.406417] -> spinlock takes 0 cycles [ 81.410184] test end [ 81.413293] test results: time for read rwlock [ 81.417825] number of loops: 20000 [ 81.421248] total time: 1 [ 81.423887] -> read rwlock takes 0 cycles [ 81.427990] test end [ 81.430844] test results: time for seqlock [ 81.434962] number of loops: 20000 [ 81.438439] total time: 1 [ 81.441075] -> seqlock takes 0 cycles [ 81.444751] test end [ 81.447871] test results: time for preempt disable/enable pairs [ 81.453818] number of loops: 20000 [ 81.457300] total time: 1 [ 81.459940] -> preempt disable/enable pair takes 0 cycles [ 81.465359] test endinsmod: cannot insert './ltt_test.ko': Resource temporarily unavailable (-1): Resource temporarily unavailable
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68