Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp474184pxu; Thu, 26 Nov 2020 03:37:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwb/KrYpbwwkW6u7wdao5wIbdI25pHkYAHfb3CGWc2ZDL9Na86xHMRVcD9f5hffD7e2XX+a X-Received: by 2002:a17:906:3c11:: with SMTP id h17mr2218722ejg.20.1606390673487; Thu, 26 Nov 2020 03:37:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606390673; cv=none; d=google.com; s=arc-20160816; b=nzFDkO19cgtahWgT5mjZHkcm9w63HiQEZxP5CtEtTjlehcUw26PBe2p74JaoVXH4jZ GIIBPLRw1Upe1ezLB3M1MzvjWgvpsM6jiAhYOyzbYqnWI4eObOv83+HscjuMo8noc6eh Sy8lxEOAEeUXdJ3NC0iLVsbvCSczFrKhWdkxKY9kd7QPGVgMxXVlsdQ724QmXTdWHHIA DsP6CVCnKoJkrjeVIfS1GIynOIyHw++ed5NCrhOazNRKb5BRM/c1yjT0janZa+ylyy4M OqG3Duuu5jLugf8OiDEkQWMwmYgtQzdaDqtYdClmED+GEinwa5mzTLBEfKQUquEF3egF x0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=QuERRYjvkfW+DX3m+pR9Il4gw7gG8bJHRtDmE9IjX6s=; b=BHutHbBsS0bLTQ+14y2SUwNiCuA0PTmy1NzcdGmISPjG1Wctj8EElmduhwugbgJSSX UP5DXdOp8M8HF2ZpKYtS4gpc5yNwOBWOplmCmsASZ/8eieH6ma0XhSAvnXz++OMDeePS c29Y+lJYu2GzTxMzECu26twqrDrdms1RPxMNXKBgeJho/WNUMJcK/RXGVhbPITASINgS uoBGXde7IISIWp9XHxibUc7e80B7zJFyufYWVbdD2+YZlNs25aoGzvJurDGSMnyadFQP 2B0Ji5nZ/RD1egqdQQ43FQJ3PmuTEv+zYju3rk+mZvG54jjKFvHPinp1fR12y5HYCZ0G QPvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s3si2906543ejc.65.2020.11.26.03.37.30; Thu, 26 Nov 2020 03:37:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387429AbgKZJv7 (ORCPT + 99 others); Thu, 26 Nov 2020 04:51:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:46630 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387418AbgKZJv6 (ORCPT ); Thu, 26 Nov 2020 04:51:58 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id DDFF1ACA3; Thu, 26 Nov 2020 09:51:56 +0000 (UTC) From: Daniel Wagner To: linux-block@vger.kernel.org Cc: Jens Axboe , linux-kernel@vger.kernel.org, Ming Lei , Daniel Wagner Subject: [PATCH] blk-mq: Make running from the wrong CPU less scary Date: Thu, 26 Nov 2020 10:51:52 +0100 Message-Id: <20201126095152.19151-1-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current warning looks aweful like a proper crash. This is confusing. There is not much information to gained from the stack trace anyway, let's drop it. While at it print the cpumask as there might be additial helpful information when debugging the sitation. Signed-off-by: Daniel Wagner --- Hi, We got a report from a customer because he was concerned about the log entries. As it turns out, it fooled me too to be honest. What do you think about making it a bit less look-a-like a kernel oops? smpboot: Booting Node 0 Processor 12 APIC 0x26 WARNING, didn't collect load info for all cpus, balancing is broken run queue from wrong CPU 0, hctx active CPU: 0 PID: 42300 Comm: kworker/13:2H Kdump: loaded Tainted: G OE X 5.3.18-109.$ Hardware name: IBM System x3650 M5 -[5462AC1]-/00KG915, BIOS -[TCE144J-3.11]- 12/03/2019 Workqueue: kblockd blk_mq_run_work_fn Call Trace: dump_stack+0x66/0x8b __blk_mq_run_hw_queue+0xee/0x100 process_one_work+0x1f4/0x3e0 worker_thread+0x2d/0x3e0 ? process_one_work+0x3e0/0x3e0 kthread+0x10d/0x130 ? kthread_park+0xa0/0xa0 ret_from_fork+0x35/0x40 run queue from wrong CPU 0, hctx active CPU: 0 PID: 42300 Comm: kworker/13:2H Kdump: loaded Tainted: G OE X 5.3.18-109.$ Hardware name: IBM System x3650 M5 -[5462AC1]-/00KG915, BIOS -[TCE144J-3.11]- 12/03/2019 Workqueue: kblockd blk_mq_run_work_fn Thanks, Daniel block/blk-mq.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 55bcee5dc032..0427b719d9c4 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1514,10 +1514,8 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) */ if (!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) && cpu_online(hctx->next_cpu)) { - printk(KERN_WARNING "run queue from wrong CPU %d, hctx %s\n", - raw_smp_processor_id(), - cpumask_empty(hctx->cpumask) ? "inactive": "active"); - dump_stack(); + printk(KERN_WARNING "run queue from wrong CPU %d, hctx %*pbl\n", + raw_smp_processor_id(), cpumask_pr_args(hctx->cpumask)); } /* -- 2.16.4