ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
A. No Async +
usb_alloc_coherent
(with my patch
caching header data)
B. No Async memcpy
+ kmalloc
C. Async +
usb_alloc_coherent
(with Keiichi's patch caching
header data)
D. Async memcpy
+ kmalloc
E. Async + kmalloc +
manually dma_unmap/map
for each packet
F. Async + kmalloc +
manually dma_sync
for each packet
2
frames1121949874870928927
3
packets233471243665232786231152247476246994
4
empty447294780445594453903406033997Tomasz Figa 29th August 2018:
Note that B and D are not directly comparable with E-F, because the former don't include the dma_map/unmap() done by the USB HCD framework. E should be equivalent to D, with USB HCD mapping bypassed and done directly in the UVC driver. F maps once and then does just a unidirectional sync before reading from the buffer.
5
errors3480124064617116226
6
invalid80171058481603265
7
bytes135668717145563878137989497137406842103315132103017167
8
duration329073093929139290363094930938
9
URB-avg140.25243.817250.91271.22290.55191.344
10
URB-min2.6253.79124.20815.7543.7543.167
11
URB-max660.625212.0421009.459985.542289.9171142.167
12
header-avg144.64178.67921.87417.87847.42146.237
13
header-min000000
14
header-max674.625471.62577.58356.292113.75163.917Tomasz Figa: 29th August 2018
F: Header Max:
I wonder if we didn't just observe some random anomaly here, as we saw in Matwey's measurements earlier, because dma_unmap() is exactly a superset of dma_sync_single_for_cpu(). The difference in average close to measurement error might indeed confirm that.
15
latency-avg10.07310.15533.72332.06858.38958.43
16
latency-min0.8751.7515.45810.79237.04235.292
17
latency-max26.54128172.375946.459253.4591106.583
18
decode-avg130.17933.662217.18839.15432.16132.913
19
decode-min0.8751.754.0841.4582.0412.334
20
decode-max634.375186.084978.542246.167124.542215.833
21
raw-decode2.740 Gbits/s14.201 Gbits/s2.212 Gbits/s12.491 Gbits/s13.775 Gbits/s13.510 Gbits/s
22
raw-URB2.541 Gbits/s10.883 Gbits/s1.913 Gbits/s6.870 Gbits/s4.890 Gbits/s4.847 Gbits/sKieran Bingham 28th June 2019:
Re: F: Header Max - I've just seen the URB max is
also large along with the latency-max. It was probably
some delay in the USB layer that caused this spike
23
throughput32.982 Mbits/s37.638 Mbits/s37.884 Mbits/s37.858 Mbits/s26.705 Mbits/s26.638 Mbits/s
24
CPU usage1.205779 %0.266349 %1.715060 %0.304485 %0.194948 %0.198726 %
25
26
Tomasz Figa 7th June 2019:
Doesn't the difference in throughput between the 6 tests suggest that the camera might have been capturing different contents (i.e. different compression ratio) or at different frame rates (i.e. different lighting conditions)?
EDIT: Given the values of "frames" being similar, similar differences between the "duration" values and the big differences between "bytes" values, I'd say this is about the compression ratio (=== contents of the frames)?
27
28
Patch adding statistics
29
30
31
32
33
Kieran Bingham: 7th June 2019
I'm afraid we'd have to check the test process with Matwey/ Keiichi, I simply analysed the results he posted into this table.
On that note, If these tests are using JPEG formats that could certainly cause content to affect data throughput - so it should be a fixed bitrate format used in the tests.
Perhaps throwing some test code to control the number of frames captured, and then process the results might help too.
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100