From: Pushpendra Singh <pushpendra.singh@oss.qualcomm.com>
To: sudeep.holla@kernel.org
Cc: cristian.marussi@arm.com, arm-scmi@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Pushpendra Singh <pushpendra.singh@oss.qualcomm.com>
Subject: [PATCH] firmware: arm_scmi: rate-limit queue-full warnings in IRQ context
Date: Wed, 8 Jul 2026 12:53:39 +0530 [thread overview]
Message-ID: <20260708072339.3021140-1-pushpendra.singh@oss.qualcomm.com> (raw)
The scmi_notify() function is called from interrupt context
to queue received notification events onto a per-protocol
kfifo. When the kfifo is full, it logs a warning via dev_warn()
for every dropped event.
Under conditions where the platform sends a burst of SCMI
notifications faster than the deferred worker can drain the
queue, this results in a flood of dev_warn() calls from
IRQ context. Each call acquires the console lock and may
execute blocking console writes, causing the CPU to be held
in interrupt context for an extended period and leading to
observable system stalls.
Fix this by switching to dev_warn_ratelimited() to limit the
frequency of log messages when the notification queue is full.
This reduces console overhead in interrupt context and prevents
CPU stalls caused by excessive logging, while still preserving
diagnostic visibility.
Signed-off-by: Pushpendra Singh <pushpendra.singh@oss.qualcomm.com>
---
drivers/firmware/arm_scmi/notify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
index 40ec184eedae..574f368033ae 100644
--- a/drivers/firmware/arm_scmi/notify.c
+++ b/drivers/firmware/arm_scmi/notify.c
@@ -600,7 +600,7 @@ int scmi_notify(const struct scmi_handle *handle, u8 proto_id, u8 evt_id,
return -EINVAL;
}
if (kfifo_avail(&r_evt->proto->equeue.kfifo) < sizeof(eh) + len) {
- dev_warn(handle->dev,
+ dev_warn_ratelimited(handle->dev,
"queue full, dropping proto_id:%d evt_id:%d ts:%lld\n",
proto_id, evt_id, ktime_to_ns(ts));
return -ENOMEM;
--
2.34.1
reply other threads:[~2026-07-08 7:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20260708072339.3021140-1-pushpendra.singh@oss.qualcomm.com \
--to=pushpendra.singh@oss.qualcomm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@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