• Xiang Chen's avatar
    dma-mapping: benchmark: Add support for multi-pages map/unmap · ca947482
    Xiang Chen authored
    Currently it only support one page map/unmap once a time for dma-map
    benchmark, but there are some other scenaries which need to support for
    multi-page map/unmap: for those multi-pages interfaces such as
    dma_alloc_coherent() and dma_map_sg(), the time spent on multi-pages
    map/unmap is not the time of a single page * npages (not linear) as it
    may use block description instead of page description when it is satified
    with the size such as 2M/1G, and also it can send a single TLB invalidation
    command to invalidate multi-pages instead of multi-times when RIL is
    enabled (which will short the time of unmap). So it is necessary to add
    support for multi-pages map/unmap.
    
    Add a parameter "-g" to support multi-pages map/unmap.
    Signed-off-by: default avatarXiang Chen <chenxiang66@hisilicon.com>
    Acked-by: default avatarBarry Song <song.bao.hua@hisilicon.com>
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    ca947482
map_benchmark.c 9.49 KB