[PATCH] [2.4] show TCE statistics in /proc/ppc64
linas at austin.ibm.com
linas at austin.ibm.com
Wed Nov 26 09:22:01 EST 2003
The attached patch should apply cleanly against the current
ameslab-2.4 tree. It provides TCE usage statistics in /proc
that might be useful to anyone interested in DMA performance
or is debugging DMA usage in device drivers.
I don't have BK access so I can't bk push anything at this time:
Paul, if this patch looks good, can you apply & etc. as needed?
The TCE usage stats are in the /proc/ppc64/tce directory.
Get stats for all PCI devices by 'cat /proc/ppc64/tce/stats'.
One can also get more detailed per-device stats by performing an
'echo "show bb:dd" > /proc/ppc64/tce/stats'
where bb os the hex bus number, dd is the hex device number
(cat /proc/ppc64/pci to figure these out). One can then
'cat /proc/ppc64/tce/detail-bb:dd' to see the detailed stats.
Here's a sample of the 'detail' output:
device 21:01
Fri Nov 21 14:04:07 PST 2003
total_use_cnt=92042 alloc_cnt=1267 max_alloc_cnt=1267
Level use_cnt split merge alloc maxaloc actual stale entries
0 29552 0 0 59 114 59 1 32768
1 1988 60 7 662 675 3 0 16384
2 3882 35 5 11 25 11 0 8192
3 7147 31 5 30 44 30 0 4096
4 12405 44 12 45 69 45 0 2048
5 28815 71 26 285 285 285 0 1024
6 8253 336 171 175 175 175 0 512
7 0 633 463 0 1 0 0 256
8 0 314 229 0 1 0 0 128
9 0 153 110 0 1 0 0 64
[dump of TCE bitmaps cut out]
--linas
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list