From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbbJXPfn (ORCPT ); Sat, 24 Oct 2015 11:35:43 -0400 Received: from smtp12.smtpout.orange.fr ([80.12.242.134]:31075 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751470AbbJXPfe (ORCPT ); Sat, 24 Oct 2015 11:35:34 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Sat, 24 Oct 2015 17:35:33 +0200 X-ME-IP: 109.220.216.95 From: Robert Jarzmik To: Vinod Koul Cc: Daniel Mack , Haojian Zhuang , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/3] dmaengine: virt-dma: don't always free descriptor upon completion Date: Sat, 24 Oct 2015 11:57:53 +0200 References: <1444766070-26915-1-git-send-email-robert.jarzmik@free.fr> X-URL: http://belgarath.falguerolles.org/ Message-ID: <87oafowahl.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Robert Jarzmik writes: > This patch attempts to enhance the case of a transfer submitted multiple > times, and where the cost of creating the descriptors chain is not > negligible. > > This happens with big video buffers (several megabytes, ie. several > thousands of linked descriptors in one scatter-gather list). In these > cases, a video driver would want to do : > - tx = dmaengine_prep_slave_sg() > - dma_engine_submit(tx); > - dma_async_issue_pending() > - wait for video completion > - read video data (or not, skipping a frame is also possible) > - dma_engine_submit(tx) > => here, the descriptors chain recalculation will take time > => the dma coherent allocation over and over might create holes in > the dma pool, which is counter-productive. > - dma_async_issue_pending() > - etc ... > > In order to cope with this case, virt-dma is modified to prevent freeing > the descriptors upon completion if DMA_CTRL_REUSE flag is set in the > transfer. > > This patch is a respin of the former DMA_CTRL_ACK approach, which was > reverted due to a regression in audio drivers. > > Signed-off-by: Robert Jarzmik > --- > Since v1: added doxygen commit to vchan_tx_desc_free Hi Vinod, Is this serie good for you or do you have remaining comments to be addressed ? Cheers. -- Robert