Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3408230pxu; Mon, 30 Nov 2020 02:24:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxquH7VMl52HhyRlmQFiGrn4ltdD4vbCE7FhxojC2JnyCRuOSP9RPF5VM6py7hHm8I8NMAH X-Received: by 2002:a17:906:134f:: with SMTP id x15mr13065068ejb.278.1606731863468; Mon, 30 Nov 2020 02:24:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606731863; cv=none; d=google.com; s=arc-20160816; b=JcSijy9aEuukgNLpcAIieCZrm5atNGMY61XzVSfdEID3OmRdB8YcYSEiPsApEru6jj LB/egRpby/VG0WMlhSmmhGg9dvKnUQ9R55QzcKozm7/cwPliYTwR7gdUeoWvv/zQLq9p /+Ieif2xEbkzorsv1KKiw7dMenRscEuKuu810ht5+73S3jYAz5PV4gUQlrtHCvP5i5bu Y1u6IlFRk8KQFiBUHVblL+HeSLUltVpIKUbTgoKL1TIoTDzsO5VZJRWmamEJmDv07CVx EDdkdeNuhAWB0fnwGonsdSTh13jCCyrGB/7BKMVcKRhmKZgPftvlCfx3Ik4n9gmA5tuc XgQg== 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=IfLVj+02KtINsFPJOh9YTVDoAWG28y/Ai6/m5TlKBzY=; b=k75cIhVZC05OM5J22fDti8YU3Co2C+oWSaklzw68PYNlr/XI+kYwJQk0dnjkGcsU+Y vgcO1BmieC35/WNDw9WO7+zbLmOybF51xMDBCMA4fxp6IqOTkKUY9lf4C9t7eSJlk0Hk bu2F6NMXFOe95vlS33KnWMjMI6kjdgx7hd651v1lm1ywIH/pBchQpIAdQYnPLN6rKtgo NXDdNVPFX1kVOOQP8i1URDch4ZDU8AYk6/VLBeIZd3cFTbC0GIDOSs0emtAj3PiNMEVj whTF22NJL4x4jxp8qX7BS2uruCSv28W6RyckCwxhG/TvD3aAZCwino2YhSBXo9rgRGxm S+iw== 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 m17si9937544ejb.268.2020.11.30.02.24.01; Mon, 30 Nov 2020 02:24:23 -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 S1728574AbgK3KUF (ORCPT + 99 others); Mon, 30 Nov 2020 05:20:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:60720 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728546AbgK3KUE (ORCPT ); Mon, 30 Nov 2020 05:20:04 -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 1489EAC6A; Mon, 30 Nov 2020 10:19:23 +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 v2] blk-mq: Remove 'running from the wrong CPU' warning Date: Mon, 30 Nov 2020 11:19:21 +0100 Message-Id: <20201130101921.52754-1-dwagner@suse.de> X-Mailer: git-send-email 2.16.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's guaranteed that no request is in flight when a hctx is going offline. This warning is only triggered when the wq's CPU is hot plugged and the blk-mq is not synced up yet. As this state is temporary and the request is still processed correctly, better remove the warning as this is the fast path. Suggested-by: Ming Lei Signed-off-by: Daniel Wagner --- v2: - remove the warning as suggested by Ming v1: - initial version https://lore.kernel.org/linux-block/20201126095152.19151-1-dwagner@suse.de/ block/blk-mq.c | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 55bcee5dc032..7e6761804f86 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1495,31 +1495,6 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) { int srcu_idx; - /* - * We should be running this queue from one of the CPUs that - * are mapped to it. - * - * There are at least two related races now between setting - * hctx->next_cpu from blk_mq_hctx_next_cpu() and running - * __blk_mq_run_hw_queue(): - * - * - hctx->next_cpu is found offline in blk_mq_hctx_next_cpu(), - * but later it becomes online, then this warning is harmless - * at all - * - * - hctx->next_cpu is found online in blk_mq_hctx_next_cpu(), - * but later it becomes offline, then the warning can't be - * triggered, and we depend on blk-mq timeout handler to - * handle dispatched requests to this 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(); - } - /* * We can't run the queue inline with ints disabled. Ensure that * we catch bad users of this early. -- 2.16.4