From: Junxiao Bi <junxiao.bi@oracle.com>
To: linux-block@vger.kernel.org
Cc: junxiao.bi@oracle.com
Subject: [PATCH] block-mq: ratelimit the warning log
Date: Thu, 14 Nov 2019 15:02:33 -0800 [thread overview]
Message-ID: <20191114230233.3582-1-junxiao.bi@oracle.com> (raw)
When doing cpu online/offlile, sometimes this warning will be triggered,
it's harmless, io will be dispatched. But sometimes it warns too much and
even stall the whole system, so ratelimit it.
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
---
block/blk-mq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index ec791156e9cc..846f5d26c523 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1384,7 +1384,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
* handle dispatched requests to this hctx
*/
if (!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) &&
- cpu_online(hctx->next_cpu)) {
+ cpu_online(hctx->next_cpu) && printk_ratelimit()) {
printk(KERN_WARNING "run queue from wrong CPU %d, hctx %s\n",
raw_smp_processor_id(),
cpumask_empty(hctx->cpumask) ? "inactive": "active");
--
2.17.1
reply other threads:[~2019-11-14 23:04 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=20191114230233.3582-1-junxiao.bi@oracle.com \
--to=junxiao.bi@oracle.com \
--cc=linux-block@vger.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;
as well as URLs for NNTP newsgroup(s).