lkml.org 
[lkml]   [2013]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 0/2] dma-unmap: allow to only unmap completed DMA buffer
On Tue, 28 May 2013, Ming Lei wrote:

> This patchset tries to loose the check on DMA buffer size in check_unmap()
> of dma-debug first, then only unmap the actual completed DMA buffer in USB
> unmap path.
>
> Considered that DMA unmapping often runs in hard irq context, the patch set
> may save irq handling time. And the improvement can be observed on
> ARMv7(Pandaboard) with the chage, at average ~25us is saved about ehci irq
> handling under usbnet ping test case.

Are you aware that these changes directly contradict the advice in
Documentation/DMA-API.txt? That file says:


void
dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
enum dma_data_direction direction)

Unmaps the region previously mapped. All the parameters passed in
must be identical to those passed in (and returned) by the mapping
API.


If you are going to make a change like this then you have to change the
documentation too. But in fact I doubt that the proposed change will
work correctly in all circumstances. For example, if an IOMMU is
present.

Alan Stern



\
 
 \ /
  Last update: 2013-05-27 22:41    [W:0.096 / U:0.768 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site