dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread
@ 2022-04-29 17:36 Dave Jiang
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Jiang @ 2022-04-29 17:36 UTC (permalink / raw)
  To: vkoul; +Cc: Sanjay Kumar, dmaengine

Add rate limit to the dev_warn() call in the misc interrupt thread. This
limits dmesg getting spammed if a descriptor submitter is spamming bad
descriptors with invalid completion records and resulting the errors being
continuously reported by the misc interrupt handling thread.

Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 drivers/dma/idxd/irq.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index 98aad8a9ed2c..0d43ba228f0d 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -272,8 +272,8 @@ irqreturn_t idxd_misc_thread(int vec, void *data)
 		val |= IDXD_INTC_ERR;
 
 		for (i = 0; i < 4; i++)
-			dev_warn(dev, "err[%d]: %#16.16llx\n",
-				 i, idxd->sw_err.bits[i]);
+			dev_warn_ratelimited(dev, "err[%d]: %#16.16llx\n",
+					     i, idxd->sw_err.bits[i]);
 		err = true;
 	}
 



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread
@ 2023-09-24  0:23 Fenghua Yu
  2023-09-26 16:30 ` Lijun Pan
  2023-09-28 11:56 ` Vinod Koul
  0 siblings, 2 replies; 4+ messages in thread
From: Fenghua Yu @ 2023-09-24  0:23 UTC (permalink / raw)
  To: Vinod Koul, dmaengine, linux-kernel; +Cc: Dave Jiang, Sanjay Kumar, Fenghua Yu

From: Dave Jiang <dave.jiang@intel.com>

Add rate limit to the dev_warn() call in the misc interrupt thread. This
limits dmesg getting spammed if a descriptor submitter is spamming bad
descriptors with invalid completion records and resulting the errors being
continuously reported by the misc interrupt handling thread.

Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
---

This patch was sent to dmaengine mailing list before:
https://lore.kernel.org/all/165125377735.312075.15715853788802098990.stgit@djiang5-desk3.ch.intel.com/
But it hasn't be merged into upstream yet. Add my Reviewed-by tag
and re-send it. No code or commit message change.

 drivers/dma/idxd/irq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index 041be6a4dec4..8e895a1e1881 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -430,8 +430,8 @@ irqreturn_t idxd_misc_thread(int vec, void *data)
 		val |= IDXD_INTC_ERR;
 
 		for (i = 0; i < 4; i++)
-			dev_warn(dev, "err[%d]: %#16.16llx\n",
-				 i, idxd->sw_err.bits[i]);
+			dev_warn_ratelimited(dev, "err[%d]: %#16.16llx\n",
+					     i, idxd->sw_err.bits[i]);
 		err = true;
 	}
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread
  2023-09-24  0:23 [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread Fenghua Yu
@ 2023-09-26 16:30 ` Lijun Pan
  2023-09-28 11:56 ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Lijun Pan @ 2023-09-26 16:30 UTC (permalink / raw)
  To: Fenghua Yu, Vinod Koul, dmaengine, linux-kernel; +Cc: Dave Jiang, Sanjay Kumar



On 9/23/2023 7:23 PM, Fenghua Yu wrote:
> From: Dave Jiang <dave.jiang@intel.com>
> 
> Add rate limit to the dev_warn() call in the misc interrupt thread. This
> limits dmesg getting spammed if a descriptor submitter is spamming bad
> descriptors with invalid completion records and resulting the errors being
> continuously reported by the misc interrupt handling thread.
> 
> Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
> Signed-off-by: Dave Jiang <dave.jiang@intel.com>
> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
> ---

Acked-by: Lijun Pan <lijun.pan@intel.com>

> 
> This patch was sent to dmaengine mailing list before:
> https://lore.kernel.org/all/165125377735.312075.15715853788802098990.stgit@djiang5-desk3.ch.intel.com/
> But it hasn't be merged into upstream yet. Add my Reviewed-by tag
> and re-send it. No code or commit message change.
> 
>   drivers/dma/idxd/irq.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
> index 041be6a4dec4..8e895a1e1881 100644
> --- a/drivers/dma/idxd/irq.c
> +++ b/drivers/dma/idxd/irq.c
> @@ -430,8 +430,8 @@ irqreturn_t idxd_misc_thread(int vec, void *data)
>   		val |= IDXD_INTC_ERR;
>   
>   		for (i = 0; i < 4; i++)
> -			dev_warn(dev, "err[%d]: %#16.16llx\n",
> -				 i, idxd->sw_err.bits[i]);
> +			dev_warn_ratelimited(dev, "err[%d]: %#16.16llx\n",
> +					     i, idxd->sw_err.bits[i]);
>   		err = true;
>   	}
>   

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread
  2023-09-24  0:23 [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread Fenghua Yu
  2023-09-26 16:30 ` Lijun Pan
@ 2023-09-28 11:56 ` Vinod Koul
  1 sibling, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2023-09-28 11:56 UTC (permalink / raw)
  To: dmaengine, linux-kernel, Fenghua Yu; +Cc: Dave Jiang, Sanjay Kumar


On Sat, 23 Sep 2023 17:23:47 -0700, Fenghua Yu wrote:
> Add rate limit to the dev_warn() call in the misc interrupt thread. This
> limits dmesg getting spammed if a descriptor submitter is spamming bad
> descriptors with invalid completion records and resulting the errors being
> continuously reported by the misc interrupt handling thread.
> 
> 

Applied, thanks!

[1/1] dmaengine: idxd: rate limit printk in misc interrupt thread
      commit: 555921feb2ac03d88647ccc62015e68f157c30a2

Best regards,
-- 
~Vinod



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-28 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-24  0:23 [PATCH] dmaengine: idxd: rate limit printk in misc interrupt thread Fenghua Yu
2023-09-26 16:30 ` Lijun Pan
2023-09-28 11:56 ` Vinod Koul
  -- strict thread matches above, loose matches on Subject: below --
2022-04-29 17:36 Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).