Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4260795pxv; Tue, 29 Jun 2021 02:51:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZuqqa3TFGOpQHwpU07DybIsHMgXCDgRNo4XynKWD92NL9iCbZ5cofqWatGnRzUhxKuWGP X-Received: by 2002:a17:907:da4:: with SMTP id go36mr28432267ejc.21.1624960271691; Tue, 29 Jun 2021 02:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624960271; cv=none; d=google.com; s=arc-20160816; b=SeGcG9IPjlmuoorPIAoFkcTgPf15tICEXAtrs2tuB2stfMeGUPUp1zE6TGFQ2AfaL/ ECeNDIGfQ89ZOfjWdf6GQsHIKKhDL+1kJo6qM6ul0YEQxojlftRQ6j1zusRRaYgIsP5c VbcwXzowB5IInRzETU8+az+OMRRh4kL9oVECem+6Pz/53HWbytAsOwgeL+8OMnego+wm YrajJNPrPv5VqPWKoqXaQCwwx9YcE17C3P7XHq4c/8sTMmsi70S7/H7DmLz9ljPiDUTF ZoKuQ3q61TCMsMOHFZm0XI4bQDyzZ28EoRZJmaZHk6FoqNvPM783WZTS6XghHVS2bHRw lQDg== 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=SF0LHB5o9wZqoVi72ldF9j6uXPwn1FRh7Y6gGVVC+Ks=; b=DTqrHs194mJLBKNo7b3VEeRcef8hOQNatsi14QZjrthJ3Lomrc1+EgvhBWK2UwV1/z MCGobgSTXsORLXfYJWwoxZ//yPPe1OXB/NKnCOwX8Qsds49WLlyUINZHyxfbdvmOhQ0+ Q6828cK+FMpujQ3BvD+Sj2FgEQyQliTm1Qe+v2hWCbezlGVayQ5UUe9OT77O/Wnr1fZ/ KsY9ffABfTZaVPVREv3pT9dD+HNeAWBT9msDHxEkgjvlIdQgnSHKV5Pwt5ntvo4tTKqS rpC4DzG7tgb04nx6QtsETt7d/E/P9VffL1m8WIf8WxHPd3Ian9PifaluO2sesc4EMW+V 5aWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vrSPJkcb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=fErPY05C; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vrSPJkcb; dkim=neutral (no key) header.i=@suse.de; 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 s17si17002272edu.428.2021.06.29.02.50.48; Tue, 29 Jun 2021 02:51:11 -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=vrSPJkcb; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=fErPY05C; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=vrSPJkcb; dkim=neutral (no key) header.i=@suse.de; 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 S232954AbhF2JwH (ORCPT + 99 others); Tue, 29 Jun 2021 05:52:07 -0400 Received: from smtp-out1.suse.de ([195.135.220.28]:47200 "EHLO smtp-out1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232673AbhF2JwH (ORCPT ); Tue, 29 Jun 2021 05:52:07 -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 499712266C; Tue, 29 Jun 2021 09:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624960179; 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=SF0LHB5o9wZqoVi72ldF9j6uXPwn1FRh7Y6gGVVC+Ks=; b=vrSPJkcby5A+XnJDIJhzzP+odgK0LyzEhhz3EHjj6lOn5ML2AJsGVPOB+zuoKR/iRihoeD A/yAoMyzos8EGTnhzQQQdD0rdk0K/MDZy9ZNP6c5mfFt3TZkvc1UheYD+meZrStMuryI74 +GgIlKXrFnD4pjyWQ86Py528zHTKirA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624960179; 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=SF0LHB5o9wZqoVi72ldF9j6uXPwn1FRh7Y6gGVVC+Ks=; b=fErPY05CcmEkmHctSmVdmoKdmLjXz0ENDedhU/WLa9xaEz5WeVk0dAm8NATpYyIAJupwFk 2H1YpUT35jMmZMCg== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 30AE111906; Tue, 29 Jun 2021 09:49:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624960179; 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=SF0LHB5o9wZqoVi72ldF9j6uXPwn1FRh7Y6gGVVC+Ks=; b=vrSPJkcby5A+XnJDIJhzzP+odgK0LyzEhhz3EHjj6lOn5ML2AJsGVPOB+zuoKR/iRihoeD A/yAoMyzos8EGTnhzQQQdD0rdk0K/MDZy9ZNP6c5mfFt3TZkvc1UheYD+meZrStMuryI74 +GgIlKXrFnD4pjyWQ86Py528zHTKirA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624960179; 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=SF0LHB5o9wZqoVi72ldF9j6uXPwn1FRh7Y6gGVVC+Ks=; b=fErPY05CcmEkmHctSmVdmoKdmLjXz0ENDedhU/WLa9xaEz5WeVk0dAm8NATpYyIAJupwFk 2H1YpUT35jMmZMCg== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id 1u7gCrPs2mBubAAALh3uQQ (envelope-from ); Tue, 29 Jun 2021 09:49:39 +0000 Date: Tue, 29 Jun 2021 11:49:38 +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: <20210629094938.r3h5cb7wwu2v3r3m@beryllium.lan> References: <71d1ce491ed5056bfa921f0e14fa646d@imap.linux.ibm.com> <20210629082542.vm3yh6k36d2zh3k5@beryllium.lan> <20210629083549.unco3f7atybqypw3@beryllium.lan> <20210629092719.n33t2pnjiwwe6qun@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 05:35:51PM +0800, Ming Lei wrote: > With the two patches I posted, __nvme_submit_sync_cmd() shouldn't return > error, can you observe the error? There are still ways the allocation can fail: ret = blk_queue_enter(q, flags); if (ret) return ERR_PTR(ret); ret = -EXDEV; data.hctx = q->queue_hw_ctx[hctx_idx]; if (!blk_mq_hw_queue_mapped(data.hctx)) goto out_queue_exit; 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. 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.