All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.li@nxp.com>,
	Sashiko <sashiko-bot@kernel.org>
Subject: Re: [PATCH v3 6/6] dmaengine: plx_dma: don't invoke client callbacks with ring_lock held
Date: Wed, 18 Nov 2026 10:55:20 -0600	[thread overview]
Message-ID: <av3YeAbHSUdVowUJ@SMW015318> (raw)
In-Reply-To: <c2df58c9-6ddb-4125-aa1f-897e90b33e9d@deltatee.com>

On Tue, Nov 17, 2026 at 04:46:36PM -0600, Logan Gunthorpe wrote:
>
>
> On 2026-11-17 13:31, Frank Li wrote:
> > On Tue, Nov 17, 2026 at 10:51:35AM -0600, Logan Gunthorpe wrote:
> >> @@ -166,22 +171,35 @@ static void plx_dma_process_desc(struct plx_dma_dev *plxdev)
> >>
> >>  		dma_cookie_complete(&desc->txd);
> >>  		dma_descriptor_unmap(&desc->txd);
> >> -		dmaengine_desc_get_callback_invoke(&desc->txd, &res);
> >> +		dmaengine_desc_get_callback(&desc->txd, &cb);
> >>  		desc->txd.callback = NULL;
> >>  		desc->txd.callback_result = NULL;
> >> -
> >>  		plxdev->tail++;
> >> +
> >> +		spin_unlock_bh(&plxdev->ring_lock);
> >> +		dmaengine_desc_callback_invoke(&cb, &res);
> >
> > Common method is slice to local complete queue in ring_lock. Then unlock
> > ring_lock after while loop. Then invoke cb in complete queue.
> The PLX driver has no software queue. The hardware queue is large enough
> that having a software queue would have been wasted overhead. So the
> virt-dma pattern doesn't apply here. I'd really rather avoid adding a
> whole other software queue just to fix this issue that isn't that complex.

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
> Logan

      reply	other threads:[~2026-11-18 16:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 16:51 [PATCH v3 0/6] plx_dma fixes Logan Gunthorpe
2026-11-17 16:51 ` [PATCH v3 1/6] dmaengine: plx_dma: don't call pci_irq_vector() under rcu_read_lock() Logan Gunthorpe
2026-11-17 16:51 ` [PATCH v3 2/6] dmaengine: plx_dma: fix descriptor ring leak in alloc_chan_resources() Logan Gunthorpe
2026-11-17 16:51 ` [PATCH v3 3/6] dmaengine: plx_dma: use writel() for the 32-bit PLX_REG_CTRL register Logan Gunthorpe
2026-11-17 16:51 ` [PATCH v3 4/6] dmaengine: plx_dma: add dma_rmb() after observing write-back status Logan Gunthorpe
2026-11-17 19:25   ` Frank Li
2026-11-17 16:51 ` [PATCH v3 5/6] dmaengine: plx_dma: use spin_lock_bh() in plx_dma_process_desc() Logan Gunthorpe
2026-11-17 16:51 ` [PATCH v3 6/6] dmaengine: plx_dma: don't invoke client callbacks with ring_lock held Logan Gunthorpe
2026-11-17 19:31   ` Frank Li
2026-11-17 22:46     ` Logan Gunthorpe
2026-11-18 16:55       ` Frank Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=av3YeAbHSUdVowUJ@SMW015318 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.li@nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=sashiko-bot@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.