From: Vinod Koul <vkoul@kernel.org>
To: Suraj Gupta <suraj.gupta2@amd.com>
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
pabeni@redhat.com, michal.simek@amd.com,
radhey.shyam.pandey@amd.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,
harini.katakam@amd.com
Subject: Re: [PATCH V2 1/4] dmaengine: Add support to configure and read IRQ coalescing parameters
Date: Wed, 23 Jul 2025 13:00:17 +0530 [thread overview]
Message-ID: <aICPiS1_ITwELrxq@vaman> (raw)
In-Reply-To: <20250710101229.804183-2-suraj.gupta2@amd.com>
On 10-07-25, 15:42, Suraj Gupta wrote:
> Interrupt coalescing is a mechanism to reduce the number of hardware
> interrupts triggered ether until a certain amount of work is pending,
> or a timeout timer triggers. Tuning the interrupt coalesce settings
> involves adjusting the amount of work and timeout delay.
> Many DMA controllers support to configure coalesce count and delay.
> Add support to configure them via dma_slave_config and read
> using dma_slave_caps.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> ---
> include/linux/dmaengine.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index bb146c5ac3e4..c7c1adb8e571 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -431,6 +431,9 @@ enum dma_slave_buswidth {
> * @peripheral_config: peripheral configuration for programming peripheral
> * for dmaengine transfer
> * @peripheral_size: peripheral configuration buffer size
> + * @coalesce_cnt: Maximum number of transfers before receiving an interrupt.
> + * @coalesce_usecs: How many usecs to delay an interrupt after a transfer
> + * is completed.
> *
> * This struct is passed in as configuration data to a DMA engine
> * in order to set up a certain channel for DMA transport at runtime.
> @@ -457,6 +460,8 @@ struct dma_slave_config {
> bool device_fc;
> void *peripheral_config;
> size_t peripheral_size;
> + u32 coalesce_cnt;
> + u32 coalesce_usecs;
> };
>
> /**
> @@ -507,6 +512,9 @@ enum dma_residue_granularity {
> * @residue_granularity: granularity of the reported transfer residue
> * @descriptor_reuse: if a descriptor can be reused by client and
> * resubmitted multiple times
> + * @coalesce_cnt: Maximum number of transfers before receiving an interrupt.
> + * @coalesce_usecs: How many usecs to delay an interrupt after a transfer
> + * is completed.
> */
> struct dma_slave_caps {
> u32 src_addr_widths;
> @@ -520,6 +528,8 @@ struct dma_slave_caps {
> bool cmd_terminate;
> enum dma_residue_granularity residue_granularity;
> bool descriptor_reuse;
> + u32 coalesce_cnt;
> + u32 coalesce_usecs;
Why not selectively set interrupts for the descriptor. The dma
descriptors are in order, so one a descriptor is notified and complete,
you can also complete the descriptors before that. I would suggest to
use that rather than define a new interface for this
--
~Vinod
next prev parent reply other threads:[~2025-07-23 7:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 10:12 [PATCH V2 0/4] Add ethtool support to configure irq coalescing count and delay Suraj Gupta
2025-07-10 10:12 ` [PATCH V2 1/4] dmaengine: Add support to configure and read IRQ coalescing parameters Suraj Gupta
2025-07-23 7:30 ` Vinod Koul [this message]
2025-07-23 11:49 ` Gupta, Suraj
2025-08-25 6:17 ` Gupta, Suraj
2025-08-25 11:30 ` Vinod Koul
2025-07-10 10:12 ` [PATCH V2 2/4] dmaengine: xilinx_dma: Fix irq handler and start transfer path for AXI DMA Suraj Gupta
2025-07-10 11:26 ` Simon Horman
2025-07-11 5:32 ` Folker Schwesinger
2025-07-11 16:26 ` Subbaraya Sundeep
2025-07-11 20:13 ` Gupta, Suraj
2025-07-12 5:36 ` Subbaraya Sundeep
2025-07-15 11:05 ` Pandey, Radhey Shyam
2025-07-10 10:12 ` [PATCH V2 3/4] dmaengine: xilinx_dma: Add support to configure/report coalesce parameters from/to client using " Suraj Gupta
2025-07-10 10:12 ` [PATCH V2 4/4] net: xilinx: axienet: Add ethtool support to configure/report irq coalescing parameters in DMAengine flow Suraj Gupta
2025-07-11 16:33 ` Subbaraya Sundeep
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=aICPiS1_ITwELrxq@vaman \
--to=vkoul@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dmaengine@vger.kernel.org \
--cc=harini.katakam@amd.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.com \
--cc=suraj.gupta2@amd.com \
/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.