Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4380113pxv; Tue, 29 Jun 2021 05:51:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTHJ6+VnxPf8/fhgSYPryA/X4eOdmdbJp4TVRe5FsZOuWef71XyC7JHfyD96yGYoVJ+ipP X-Received: by 2002:a17:906:8988:: with SMTP id gg8mr29869372ejc.104.1624971116234; Tue, 29 Jun 2021 05:51:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624971116; cv=none; d=google.com; s=arc-20160816; b=ep6sv/mLlbTlPf2mU9QG5RjgjNCC47clNwyisKw81/plt09Qeh+1OiGi0jKdC1Cx81 LudCwUPrCzesOSZojmZpobUrRLjP5ELci/rZFAxVw9cHyZGpHTo1J/kZReFGNWGzbQSV XFjOvARopB0tuj26o8qkyb7ckzKgxuW1Jvj+m50Qdnns73fGhHO42JJsifVOermLLMcu CVhTp5cRr0F29DgdMHS1bLR76dCEclGxaVpNsilLEjJst1Hv4Z3NPNLeHenAFau6XZav gHw0QyKltt+OOxgBvGzEwpm/BymtfflfC0SamTzE1d8yJ1oySAuiilcBwXspMB+DX+yQ 3geg== 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 :dkim-signature:dkim-signature:dkim-signature; bh=+2Jaf+knojwZG6YGLyThipmM8ejC5N7nj1/HB5+P0gY=; b=Bptn8io6jJSYk+FXSg7FBoKirO6BXRKcc7NYgU8/m+pJNvAy0Z0OLhWTie6+kYELhG hp4wLUAZdA1ZkMVnPrVI9t5naYsK4A50t8rJi/byTt6mnQihu5BcTICmIxaz8hLoZLva rjEukjfV6Wf+d1QCjuAyqBXrJ4MiUYdWO9phfwJkaFxY2BQ8Hwmlap7OZffgmHCxACit 4dShPkBVg7Is/oSEnzRgEC1mZ+FHnhUIpBtDVzyfUV+XSx4AJSFnfpkDX/4mv7ujFt6O 7720HW9JexhI6qUyUeIKUDrypS3AepzHv19BSdvrXpfVgOuhKqv7kSPv+u//EPsPHBtw kIKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=XYyYF7D3; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=XYyYF7D3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=3kY8NFo+; 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 j8si15266040edr.136.2021.06.29.05.51.32; Tue, 29 Jun 2021 05:51:56 -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=@suse.de header.s=susede2_rsa header.b=XYyYF7D3; dkim=neutral (no key) header.i=@suse.de; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=XYyYF7D3; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=3kY8NFo+; 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 S232498AbhF2Lw5 (ORCPT + 99 others); Tue, 29 Jun 2021 07:52:57 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:35958 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232614AbhF2Lwz (ORCPT ); Tue, 29 Jun 2021 07:52:55 -0400 Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id EE9BA226B2; Tue, 29 Jun 2021 11:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624967427; h=from:from:reply-to: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=+2Jaf+knojwZG6YGLyThipmM8ejC5N7nj1/HB5+P0gY=; b=XYyYF7D37OzXkQOPyit0IEbShy6JrWRlL2rHoG51n2HyXMnIuJjHqczilDXxZ4oNbrcfFZ 9aihhiz8eJwkoXza3CAkwzDvA8qsANpxwCw6Edp22LlKZB/T/APvr9FGyNFwSdqk4Qrycr TgURpcPVHo8GbiL68ijUXLl5BOiKdLE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624967427; h=from:from:reply-to: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=+2Jaf+knojwZG6YGLyThipmM8ejC5N7nj1/HB5+P0gY=; b=3kY8NFo+93qLZ9udZg+9iXyB7U+LV+y72OyUUFjPIqLx7y2JcxVY1LWwlnMAlOhYERhXCr hSqEt2szQsUYXZAg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id D5AA911906; Tue, 29 Jun 2021 11:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624967427; h=from:from:reply-to: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=+2Jaf+knojwZG6YGLyThipmM8ejC5N7nj1/HB5+P0gY=; b=XYyYF7D37OzXkQOPyit0IEbShy6JrWRlL2rHoG51n2HyXMnIuJjHqczilDXxZ4oNbrcfFZ 9aihhiz8eJwkoXza3CAkwzDvA8qsANpxwCw6Edp22LlKZB/T/APvr9FGyNFwSdqk4Qrycr TgURpcPVHo8GbiL68ijUXLl5BOiKdLE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624967427; h=from:from:reply-to: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=+2Jaf+knojwZG6YGLyThipmM8ejC5N7nj1/HB5+P0gY=; b=3kY8NFo+93qLZ9udZg+9iXyB7U+LV+y72OyUUFjPIqLx7y2JcxVY1LWwlnMAlOhYERhXCr hSqEt2szQsUYXZAg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id fYEpMwMJ22AzNgAALh3uQQ (envelope-from ); Tue, 29 Jun 2021 11:50:27 +0000 Date: Tue, 29 Jun 2021 13:50:27 +0200 From: Daniel Wagner To: Ming Lei Cc: Wen Xiong , james.smart@broadcom.com, linux-kernel@vger.kernel.org, sagi@grimberg.me, wenxiong@linux.vnet.ibm.com Subject: Re: [PATCH 1/1] block: System crashes when cpu hotplug + bouncing port Message-ID: <20210629115027.rtohoxtl7cmycdqr@beryllium.lan> References: <20210629082542.vm3yh6k36d2zh3k5@beryllium.lan> <20210629083549.unco3f7atybqypw3@beryllium.lan> <20210629092719.n33t2pnjiwwe6qun@beryllium.lan> <20210629094938.r3h5cb7wwu2v3r3m@beryllium.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 29, 2021 at 06:06:21PM +0800, Ming Lei wrote: > > No, I don't see any errors. I am still trying to reproduce it on real > > hardware. The setup with blktests running in Qemu did work with all > > patches applied (the once from me and your patches). > > > > About the error argument: Later in the code path, e.g. in > > __nvme_submit_sync_cmd() transport errors (incl. canceled request) are > > handled as well, hence the upper layer will see errors during connection > > attempts. My point is, there is nothing special about the connection > > attempt failing. We have error handling code in place and the above > > state machine has to deal with it. > > My two patches not only avoids the kernel panic, but also allow > request to be allocated successfully, then connect io queue request can > be submitted to driver even though all CPUs in hctx->cpumask is offline, > then nvmef can be setup well. > > That is the difference with yours to fail the request allocation, then > connect io queues can't be done, and the whole host can't be setup > successfully, then become a brick. The point is that cpu offline shouldn't > fail to setup nvme fc/rdma/tcp/loop. Right, I think I see your point now. > > Anyway, avoiding the if in the hotpath is a good thing. I just don't > > think your argument about no error can happen is correct. > > Again, it isn't related with avoiding the if, and it isn't in hotpath > at all. I mixed up blk_mq_alloc_request() with blk_mq_alloc_request_hctx(). Thanks for the explanation. I'll keep trying to replicated the problem on real hardware and see if these patches mitigate it. Thanks, Daniel