diff options
author | Dafna Hirschfeld <dafna.hirschfeld@collabora.com> | 2022-01-25 09:02:13 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-03-07 11:01:22 +0100 |
commit | 68d0c3311ec10c14a908e96c1e0b95550fa02999 (patch) | |
tree | debe29f63c6df17fd662120838f1db73226eac75 /net/ipv4/udplite.c | |
parent | 69fd04d06adb2cc67ce491df14fe3125bac6f7a7 (diff) | |
download | linux-68d0c3311ec10c14a908e96c1e0b95550fa02999.tar.bz2 |
media: stk1160: use dma_alloc_noncontiguous API
Replace the urb buffers allocation to use the noncontiguous API.
This improves performance on ARM platforms where DMA coherent allocations
produce uncached mappings. Note that the noncontiguous API
requires the driver to handle synchronization.
This commit is similar to this one for the uvc driver:
https://lkml.org/lkml/2021/3/12/1506
Performance tests on rock-pi4 (Arm64) shows about 15x
improvements:
== DMA NONCONTIGUOUS ==
total durations: 20.63678480 sec
urb processing durations: 0.286864889 sec
uS/qty: 286864/2508 avg: 114.379 min: 0.583 max: 155.461 (uS)
FPS: 24.92
lost: 0 done: 500
raw decode speed: 11.603 Gbits/s
bytes 414831228.000
bytes/urb: 165403
== DMA COHERENT ==
total durations: 20.73551767 sec
urb processing durations: 4.541559160 sec
uS/qty: 4541559/2509 avg: 1810.107 min: 0.583 max: 2113.163 (uS)
FPS: 24.90
lost: 0 done: 500
raw decode speed: 730.738 Mbits/s
bytes 414785444.000
bytes/urb: 165319
Performance tests on x86 laptop show no significant
difference:
== DMA NONCONTIGUOUS ==
total durations: 20.220590102 sec
urb processing durations: 0.63021818 sec
uS/qty: 63021/2512 avg: 25.088 min: 0.138 max: 146.750 (uS)
FPS: 24.72
lost: 0 done: 500
raw decode speed: 52.751 Gbits/s
bytes 415421032.000
bytes/urb: 165374
== DMA COHERENT ==
total durations: 20.220475614 sec
urb processing durations: 0.64751972 sec
uS/qty: 64751/2512 avg: 25.777 min: 0.168 max: 132.250 (uS)
FPS: 24.72
lost: 0 done: 500
raw decode speed: 51.927 Gbits/s
bytes 415422794.000
bytes/urb: 165375
[hverkuil: incorporated Ezequiel's suggestions from his review]
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'net/ipv4/udplite.c')
0 files changed, 0 insertions, 0 deletions