mmio latency measurements

Harald Welte laforge at gnumonks.org
Thu Jun 30 18:04:39 EST 2005


Hi!

Im involved in a group of people (mostly linux networking developers is
currently working on a tool to measure the MMIO latency of PCI devices
such as network boards) on various hardware.  The preliminary tool is
available from http://svn.gnumonks.org/trunk/mmio_test

This tool works fine on a number of architectures (x86, x86_64, ia64),
but fails on ppc64.

So what is it trying to do?  It wants to measure the number of cpu
cycles spent for a MMIO read from a device-specific address:

1. It mmap()'s a pci device's MMIO registers from /dev/mem.
2. It reads the cpu cycle counter (includs/asm/timex.h:get_cycles())
3. It reads eight times the requested mmio register 
4. It reads the cpu cycle counter via get_cycles() again.

However, the number of cycles we get by doing this is at least at a
factor of thousand smaller than on other comparable hardware.

So here's my question:

1. Is this a valid use of get_cycles()
2. Are there any special caveats ?
3. Please propose an alternative mechanism, in case get_cycles() won't
   work

Any patches and/or comments welcome.

Thanks!

-- 
- Harald Welte <laforge at gnumonks.org>          	        http://gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20050630/72010f8a/attachment.pgp 


More information about the Linuxppc64-dev mailing list