[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aThD92lA2aiOKZCr@lizhi-Precision-Tower-5810>
Date: Tue, 9 Dec 2025 10:44:55 -0500
From: Frank Li <Frank.li@....com>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: 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>,
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 Tue, Dec 09, 2025 at 03:52:15PM +0900, Damien Le Moal wrote:
> 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 ?
Yes, it should be call at only failure case.
Frank
> 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