Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3307755pxj; Mon, 14 Jun 2021 20:39:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7aWEKdwgdIDO1TV/QR6WbSpQmqRHuzdkdDVGuSJNsYFuTh+6lbbPrpnyybtA3B7YpO+l8 X-Received: by 2002:a17:906:914f:: with SMTP id y15mr19131538ejw.354.1623728353537; Mon, 14 Jun 2021 20:39:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623728353; cv=none; d=google.com; s=arc-20160816; b=FUxm+gq1ZfZvjGgv0jH5L71ILbvbGTCV413ZKLjKF+XQhFdLn5ao8KctI9uVANrxn3 M4albJyYkOfaWxsMitZQ6KoQRFddMOaSNpY2eqvJAzFwuy1da5REypb+z3gmOfEbTOlb CPppzAksOuGRG4DqsUEbLVvMDniCg1VCZ7so7rlmv6TGrURda67bNGY6M/e72N3VR7eW PU88on6/jnGDsSePdpMFmzBhMylfI+yXCAVdVATXVQNXMmjpgoVVNZ6XqVgY3rWQurVx 2iVB9+kpxZz+cGTxlisKMIbIqC0KKVFS5R3fxP7eweroabZodnw70oHmk1nKGg55dZmZ T61w== 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=XDHNc5Tyf/BE3LnU7xQVP8PWodTzMsA3/eBC7eGEh90=; b=tpAyrTlV4Pg63eafQc7JkdEcM+iPqcds1iY/CMG/+ji0fMOO4lge7GLMewM7F6RyBn Zlj5SAEa+jYq387IuH9X0iU/z2atw0Tfs68WZf/oEJvlb65r+lqHb8vKK35tMevAm8gY qx1w/sG05xBrYiUaYaWKFW5uhkE06b3V4NB1y8SCiV2m83ubV1miqKYLqHFwq3iCr5ad tZA3n/WXJHjsYJ8OHUBBG0heqpCtZqav+naqiiw+/vzjze5WtmRALvMXTkJdt4U5J78k cvkFrL4LlF6BMuyzdFxCr1C6ZAUkfB2TjM6U7YnSHPkOAj8R0ssQEfYUo4QlAklrtkbq kGew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=drOpg6wS; 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 cf15si7919691edb.548.2021.06.14.20.38.50; Mon, 14 Jun 2021 20:39:13 -0700 (PDT) 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=drOpg6wS; 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 S230179AbhFODj5 (ORCPT + 99 others); Mon, 14 Jun 2021 23:39:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:33499 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbhFODj4 (ORCPT ); Mon, 14 Jun 2021 23:39:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623728273; 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=XDHNc5Tyf/BE3LnU7xQVP8PWodTzMsA3/eBC7eGEh90=; b=drOpg6wSZXJ9P9XiXtgS5mvPv5N+N7U7yAFSqy2aXixS+5si5VbPSzK/SM6aDr0lnbH98Z rORMTJTdRzyxPm8L+MZ5kZyWdkUI06rqJ+t3K4ZpypO4NJVfQhXRfiBY9vCrEQVAZ+/S+C 7KsiscWUbQgQuMO3JYFRHw99p0PPPi4= 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-114-5sCKDPAAPk6I8Nedw6j_Og-1; Mon, 14 Jun 2021 23:37:51 -0400 X-MC-Unique: 5sCKDPAAPk6I8Nedw6j_Og-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CB34801B21; Tue, 15 Jun 2021 03:37:50 +0000 (UTC) Received: from T590 (ovpn-12-39.pek2.redhat.com [10.72.12.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D6CA18F0A; Tue, 15 Jun 2021 03:37:43 +0000 (UTC) Date: Tue, 15 Jun 2021 11:37:39 +0800 From: Ming Lei To: Daniel Wagner Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe Subject: Re: [PATCH] blk-mq: Do not lookup ctx with invalid index Message-ID: References: <20210608183339.70609-1-dwagner@suse.de> <20210614113706.astexefgfo4tuejr@beryllium.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210614113706.astexefgfo4tuejr@beryllium.lan> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 01:37:06PM +0200, Daniel Wagner wrote: > On Tue, Jun 08, 2021 at 08:33:39PM +0200, Daniel Wagner wrote: > > cpumask_first_and() returns >= nr_cpu_ids if the two provided masks do > > not share a common bit. Verify we get a valid value back from > > cpumask_first_and(). > > So I got feedback on this issue (but not on the patch itself yet). The > system starts with 16 virtual CPU cores and during the test 4 cores are > removed[1] and as soon there is an error on the storage side, the reset > code on the host ends up in this path and crashes. I still don't > understand why the CPU removal is not updating the CPU mask correctly > before we hit the reset path. I'll continue to investigate. We don't update hctx->cpumask when CPU is added/removed, and that is assigned against cpu_possible_mask from beginning. It is one long-term issue, which can be triggered when all cpus in hctx->cpumask become offline. The thing is that only nvmf_connect_io_queue() allocates request via specified hctx. thanks, Ming