From: Dave Jiang <dave.jiang@intel.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
Vinod Koul <vkoul@kernel.org>,
Dan Williams <dan.j.williams@intel.com>,
Fenghua Yu <fenghuay@nvidia.com>
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 06/10] dmaengine: idxd: Wait for submitted operations on .device_synchronize()
Date: Thu, 21 Aug 2025 16:14:55 -0700 [thread overview]
Message-ID: <2b772882-5797-4fa0-aed1-02ea45b43a75@intel.com> (raw)
In-Reply-To: <20250821-idxd-fix-flr-on-kernel-queues-v3-v2-6-595d48fa065c@intel.com>
On 8/21/25 3:59 PM, Vinicius Costa Gomes wrote:
> When the dmaengine "core" asks the driver to synchronize, send a Drain
> operation to the device workqueue, which will wait for the already
> submitted operations to finish.
>
> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/dma/idxd/dma.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c
> index e4f9788aa635..9937b671f637 100644
> --- a/drivers/dma/idxd/dma.c
> +++ b/drivers/dma/idxd/dma.c
> @@ -203,6 +203,13 @@ static int idxd_dma_terminate_all(struct dma_chan *c)
> return 0;
> }
>
> +static void idxd_dma_synchronize(struct dma_chan *c)
> +{
> + struct idxd_wq *wq = to_idxd_wq(c);
> +
> + idxd_wq_drain(wq);
> +}
> +
> int idxd_register_dma_device(struct idxd_device *idxd)
> {
> struct idxd_dma_dev *idxd_dma;
> @@ -234,6 +241,7 @@ int idxd_register_dma_device(struct idxd_device *idxd)
> dma->device_alloc_chan_resources = idxd_dma_alloc_chan_resources;
> dma->device_free_chan_resources = idxd_dma_free_chan_resources;
> dma->device_terminate_all = idxd_dma_terminate_all;
> + dma->device_synchronize = idxd_dma_synchronize;
>
> rc = dma_async_device_register(dma);
> if (rc < 0) {
>
next prev parent reply other threads:[~2025-08-21 23:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 22:59 [PATCH v2 00/10] dmaengine: idxd: Memory leak and FLR fixes Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 01/10] dmaengine: idxd: Fix lockdep warnings when calling idxd_device_config() Vinicius Costa Gomes
2025-08-21 23:05 ` Dave Jiang
2025-10-21 23:03 ` Dave Hansen
2025-10-21 23:33 ` Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 02/10] dmaengine: idxd: Fix crash when the event log is disabled Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 03/10] dmaengine: idxd: Fix possible invalid memory access after FLR Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 04/10] dmaengine: idxd: Flush kernel workqueues on Function Level Reset Vinicius Costa Gomes
2025-08-21 23:12 ` Dave Jiang
2025-08-21 22:59 ` [PATCH v2 05/10] dmaengine: idxd: Flush all pending descriptors Vinicius Costa Gomes
2025-08-21 23:14 ` Dave Jiang
2025-08-21 22:59 ` [PATCH v2 06/10] dmaengine: idxd: Wait for submitted operations on .device_synchronize() Vinicius Costa Gomes
2025-08-21 23:14 ` Dave Jiang [this message]
2025-08-21 22:59 ` [PATCH v2 07/10] dmaengine: idxd: Fix not releasing workqueue on .release() Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 08/10] dmaengine: idxd: Fix memory leak when a wq is reset Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 09/10] dmaengine: idxd: Fix freeing the allocated ida too late Vinicius Costa Gomes
2025-08-21 22:59 ` [PATCH v2 10/10] dmaengine: idxd: Fix leaking event log memory Vinicius Costa Gomes
2025-10-21 1:06 ` [PATCH v2 00/10] dmaengine: idxd: Memory leak and FLR fixes Vinicius Costa Gomes
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=2b772882-5797-4fa0-aed1-02ea45b43a75@intel.com \
--to=dave.jiang@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=fenghuay@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vinicius.gomes@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox