Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4126103pxu; Mon, 30 Nov 2020 18:44:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJzUDhrdmSSuaEkNBIHcX7YrWKhNShZiRamKSMHBopl62AWW/UB1rB8+CSO0Nd5EY5bw+Itv X-Received: by 2002:a17:906:f6c4:: with SMTP id jo4mr929429ejb.145.1606790683858; Mon, 30 Nov 2020 18:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606790683; cv=none; d=google.com; s=arc-20160816; b=aSuZUgZEMZjl3YeFXc+qRkA1XGu6E4IQX9TQifKZOoyFzN1EtKYfw5Eziz6VWblicv N4PuDSQ2AKEzEiWBQmEupBEZfYDHjvOg6C3HVLBQw4GidAr2fhBaW+TtLK+cdAKcuzsa Hqvia47UVmcs8js3IUyJzsL6bEJjpTr3/OYImbFqj4QoWijwcI9lgnu85/rmQ5zvZx7z vh2y7owTdEMFfdmGK337aotKCrWp5ggx2PFYI2scWol0w101eBUVQphLXnY8Mn11GcNC 3ChBj7Uhry5+zR7W4FAYtgnEVD69asl8d7oXmFKQG5PQr2g3IszYZPN6YOw2KpaUUhio qysw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X9yqkeagiwWUX6i1ZL2g3fEa1Nr+b6dYnQRiS0J8QY4=; b=CjKNeRXUjGw6601cpEibthFQkOwzvRz4uACneOI4UbXcoTsqC0Zk7bj805FBHIose9 5ETHss1r4PGkSjGWmvVVJuWEosVibjuFyNYmVREAHK4HG/rVax11GeUPDJ8DQ8H4GaFL gxaANlfJUT00ul5mp2QQdB1mhRntSeoETB8yLJb6K1uadcQfEYWR6FDxnmUlMIMXJa+8 nx+L9TPtqxwNlmNXG2Hl0Xt1/nZANoA++oR+ziNEyO9hwbRWh1a6unyLvjkjFKGjVHYx iqH1tSBqPSwzkFmrbF1xxexO2AiWOYrokKcK4YsEpduMqKK9WsOEUXgBBwtH88KcjuB/ Fmog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D2ljJRJd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si337886edf.129.2020.11.30.18.44.21; Mon, 30 Nov 2020 18:44:43 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=D2ljJRJd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726858AbgLACLa (ORCPT + 99 others); Mon, 30 Nov 2020 21:11:30 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32635 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbgLACL3 (ORCPT ); Mon, 30 Nov 2020 21:11:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606788603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X9yqkeagiwWUX6i1ZL2g3fEa1Nr+b6dYnQRiS0J8QY4=; b=D2ljJRJdhEiu2sb0eJSD+Mr+5vAX3fQxHhWMejVCQ3LB9vZML/skq59edPIJcWxcFQtqK5 3/KGZN2XgI/ZwY8upJZOzuon+PA6PGyJ2ovcp9P4wdhsn3fowrJePrR4wBCWQ8TG4jtGsR OzxeKzWmHZu+qVEDQftKmr6V50/OHSI= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-mHdQwyL4OICAMBU4Q-OgNg-1; Mon, 30 Nov 2020 21:09:59 -0500 X-MC-Unique: mHdQwyL4OICAMBU4Q-OgNg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0194A1823E41; Tue, 1 Dec 2020 02:09:58 +0000 (UTC) Received: from T590 (ovpn-13-175.pek2.redhat.com [10.72.13.175]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BE4260873; Tue, 1 Dec 2020 02:09:48 +0000 (UTC) Date: Tue, 1 Dec 2020 10:09:44 +0800 From: Ming Lei To: Daniel Wagner Cc: linux-block@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] blk-mq: Remove 'running from the wrong CPU' warning Message-ID: <20201201020944.GA257374@T590> References: <20201130101921.52754-1-dwagner@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201130101921.52754-1-dwagner@suse.de> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 30, 2020 at 11:19:21AM +0100, Daniel Wagner wrote: > 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 > Reviewed-by: Ming Lei Thanks, Ming