Received: by 10.223.176.5 with SMTP id f5csp2019997wra; Thu, 8 Feb 2018 07:13:26 -0800 (PST) X-Google-Smtp-Source: AH8x226NB/Qu+hCRc84d6Vc6oWAX0B0bsSfx3PR75PILj0vRU9kAZj2qkLc4mtj/5bxlV/1a8xDF X-Received: by 2002:a17:902:6f08:: with SMTP id w8-v6mr924074plk.155.1518102806608; Thu, 08 Feb 2018 07:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518102806; cv=none; d=google.com; s=arc-20160816; b=hPr4aGExAlE6DJIGTQflxe63IMAIllLrIECjJaWwfK9ovfvVhn9zzlh/AN2eHQrorK KcMkxV6mA2DCD4oOB+kmVTgLhKIuswTEdlRTNQmKcwNj0K5GZvuuOlTVr9iPCyk9cBw0 ydY6ZEHZhIxFbPO4TZfGc6i6pVR+W/cvHUAZqXS/F/kqWU+iGGYLA7mNE/KZxDxQL8xV CWuI6FBJJhu36302xtzJDHArs1TwGTc5SpRcuXD0a5IGlfF2iguFB77isvJtK8ikYcPu 4fxtf5eurQqUUCD19eaRdWJN1V8WxwSdVibXYaKpeuHq38FK0CVXmuX/frCHHP4p1cp4 ULQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=qrGEmgj7FHBZAdB/8N6TezzHow6IzUzcQ6W8uRs7Yiw=; b=ghS1vCd9G/+E8QlcxmPOHIdbo6CNECxtHGlIDzfVaAMiWdzdni5dFy6nu2DcTjGfaD smIlpLxSEduXwL2bbhZf3sckUEah7/Jib7wzWuelH2ztEH23VJllEFy0BFkgvG4BjSIN EeqQ/GWi7LF2WN6PHItXvgaBLWQ60+1W8nTkGaNlxw43YxwqPxhT4hSN9zynrD5ueQhh RsqXib4Lnhk4orYJ2lk6+2+1ugtoKquav8pKwzBkPkbLaSUZSw8bsCrERZoOgd4iabIq RIBlxwJ2qWtBRqCcYc/X3YeQ+Y97QVWtxC3rbVafXTiz9B+Xjn+y3qIXl3jnYj/FwS1j DwaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6-v6si45172plg.575.2018.02.08.07.13.11; Thu, 08 Feb 2018 07:13:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752018AbeBHPLK (ORCPT + 99 others); Thu, 8 Feb 2018 10:11:10 -0500 Received: from mga09.intel.com ([134.134.136.24]:15652 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbeBHPLJ (ORCPT ); Thu, 8 Feb 2018 10:11:09 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 07:11:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,479,1511856000"; d="scan'208";a="33143685" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by orsmga002.jf.intel.com with ESMTP; 08 Feb 2018 07:11:08 -0800 Date: Thu, 8 Feb 2018 08:15:08 -0700 From: Keith Busch To: "jianchao.wang" Cc: axboe@fb.com, sagi@grimberg.me, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, hch@lst.de Subject: Re: [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case Message-ID: <20180208151508.GA4797@localhost.localdomain> References: <20180202182413.GH24417@localhost.localdomain> <20180205151314.GP24417@localhost.localdomain> <20180206151335.GE31110@localhost.localdomain> <20180207161345.GB1337@localhost.localdomain> <1826ebc1-d419-23da-12d4-dd7b1b3fe598@oracle.com> <958cae59-1a01-d60f-822b-cf81cfa31b8f@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <958cae59-1a01-d60f-822b-cf81cfa31b8f@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 08, 2018 at 10:17:00PM +0800, jianchao.wang wrote: > There is a dangerous scenario which caused by nvme_wait_freeze in nvme_reset_work. > please consider it. > > nvme_reset_work > -> nvme_start_queues > -> nvme_wait_freeze > > if the controller no response, we have to rely on the timeout path. > there are issues below: > nvme_dev_disable need to be invoked. > nvme_dev_disable will quiesce queues, cancel and requeue and outstanding requests. > nvme_reset_work will hang at nvme_wait_freeze We used to not requeue timed out commands, so that wasn't a problem before. Oh well, I'll take a look.