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

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to