• Laurent Pinchart's avatar
    dmaengine: rcar-dmac: Cache hardware descriptors memory · 1ed1315f
    Laurent Pinchart authored
    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: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Tested-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
    1ed1315f
rcar-dmac.c 46 KB