[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9107db3-491e-4224-a337-821a89f99132@kernel.org>
Date: Tue, 9 Dec 2025 15:52:15 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Frank Li <Frank.Li@....com>, Vinod Koul <vkoul@...nel.org>,
Manivannan Sadhasivam <mani@...nel.org>,
Krzysztof WilczyĆski <kwilczynski@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Christoph Hellwig <hch@....de>,
Sagi Grimberg <sagi@...mberg.me>, Chaitanya Kulkarni <kch@...dia.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>, Koichiro Den <den@...inux.co.jp>,
Niklas Cassel <cassel@...nel.org>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-pci@...r.kernel.org, linux-nvme@...ts.infradead.org,
mhi@...ts.linux.dev, linux-arm-msm@...r.kernel.org,
linux-crypto@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
imx@...ts.linux.dev
Subject: Re: [PATCH 5/8] nvmet: pci-epf: Remove unnecessary
dmaengine_terminate_sync() on each DMA transfer
On 12/9/25 2:09 AM, Frank Li wrote:
> dmaengine_terminate_sync() cancels all pending requests. Calling it for
> every DMA transfer is unnecessary and counterproductive. This function is
> generally intended for cleanup paths such as module removal, device close,
> or unbind operations.
>
> Remove the redundant calls.
>
> Signed-off-by: Frank Li <Frank.Li@....com>
> ---
> This one also fix stress test failure after remove mutex and use new API
> dmaengine_prep_slave_sg_config().
> ---
> drivers/nvme/target/pci-epf.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
> index 2e78397a7373a7d8ba67150f301f392123db88d1..85225a4f75b5bd7abb6897d064123766af021542 100644
> --- a/drivers/nvme/target/pci-epf.c
> +++ b/drivers/nvme/target/pci-epf.c
> @@ -420,8 +420,6 @@ static int nvmet_pci_epf_dma_transfer(struct nvmet_pci_epf *nvme_epf,
> ret = -EIO;
> }
>
> - dmaengine_terminate_sync(chan);
If the above dma_sync_wait failed, we better call this here as we have no idea
why we got the failure, no ?
For success case, we indeed may want to remove it.
> -
> unmap:
> dma_unmap_single(dma_dev, dma_addr, seg->length, dir);
>
>
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists