dmaengine: rcar-dmac: Cache hardware descriptors memory
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 18 Jul 2014 22:05:14 +0000 (00:05 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 23 Dec 2014 09:13:03 +0000 (11:13 +0200)
commit1ed1315f9b63c45f57f607e7ad2dac066b101f16
tree19e4fddc2cefedec5b3711ec23651d595aabaf91
parentccadee9b1e90dc6d3d97a20ac96cb1a82e0d5a1d
dmaengine: rcar-dmac: Cache hardware descriptors memory

Unlike DMA transfers descriptors that are preallocated and cached,
memory used to store hardware descriptors is allocated and freed with
the DMA coherent allocation API for every transfer. Besides degrading
performances, this creates a CMA stress test that seems to cause issues.
Running dmatest with the noverify option produces

[   50.066539] alloc_contig_range test_pages_isolated(6b845, 6b846) failed
[   50.235180] alloc_contig_range test_pages_isolated(6b848, 6b84e) failed
[   52.964584] alloc_contig_range test_pages_isolated(6b847, 6b848) failed
[   54.127113] alloc_contig_range test_pages_isolated(6b843, 6b844) failed
[   56.270253] alloc_contig_range test_pages_isolated(6b84c, 6b850) failed

The root cause needs to be fixed, but in the meantime, as a workaround
and a performance improvement, cache hardware descriptors.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
drivers/dma/sh/rcar-dmac.c