Received: by 10.192.165.156 with SMTP id m28csp161989imm; Wed, 18 Apr 2018 19:29:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4849p6ZvOELigOyBSfC4JeESgriOx2zBC0DB2cfSecTzLAvX01vdEHPaxZRI6srqdS5b95P X-Received: by 2002:a17:902:1aa:: with SMTP id b39-v6mr1015920plb.120.1524104969079; Wed, 18 Apr 2018 19:29:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524104969; cv=none; d=google.com; s=arc-20160816; b=o8vPEve5p56PUytGmvUX7KhewtcgyTsGf2siBdqG9bbNeXdvV7W2E0xx1MGZJ5O0o0 ImVIbSRrH7aqzrFd8ciOHxLa3RH+V9Pt0wwk32rYxGqmxcT9Oap9hJgrn3XJwCKKdhXu t4NF88/uHVdHM8W4WGSL8n8j2U/McjyVzj1VxH2qO3jrlbHir0O/gqu6gBtsQCqcUQ4R 20PppLN/PjH3Wf/SR0FKRrN1IyAbfsewqWW5gG5+XCsOuBxWv3JTUDlYXpdiI60WnwjC c9oQcsUtisMbJRyBZfKyf6p/bKhzoGaw8sn9tQdq4/9SqXY9/uhqbSqp3lUPAjYze8bQ a1cg== 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=9XuzQMUQTnkmWsv58/Zh+Nya5nfYJdz+0hW+DvkWhHo=; b=hZ+dP+lrfdY3hvlKJOvErtnF78AsKI0O379HXdAWmFVmxf2t5iVNXKVJ4vOlZD0K1/ DPFLPF4NaZVDxlVBB/tjABwZ/u5mYSwAOXBQrDDeBcPDtRNw7tIU6Dkn4XqYqd/qS1wG SLh0prd8pWb1waKxV4oYvUsZjptZBv4PHSeyqA1R8AolsKXMSJqO3b49QhF0yZyAq1GS MxHE739yEZaUzalhWW7UaQwM8BkZ2wqwW2W7ynFAanQE4ImlXNHdC/564BBtz2BXJ3T0 64jykxHawe3+pM38Iimt0vg/iY40eL8//wLzx5+oNbIuHAXvXWTyTNrMa4fdgKhLySpl yHFg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r63-v6si2314902plb.366.2018.04.18.19.29.15; Wed, 18 Apr 2018 19:29:29 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbeDSC2C (ORCPT + 99 others); Wed, 18 Apr 2018 22:28:02 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54374 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752245AbeDSC2B (ORCPT ); Wed, 18 Apr 2018 22:28:01 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2EB6EB703; Thu, 19 Apr 2018 02:28:00 +0000 (UTC) Received: from ming.t460p (ovpn-12-26.pek2.redhat.com [10.72.12.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 88D6263535; Thu, 19 Apr 2018 02:27:45 +0000 (UTC) Date: Thu, 19 Apr 2018 10:27:41 +0800 From: Ming Lei To: "jianchao.wang" Cc: keith.busch@intel.com, sagi@grimberg.me, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, axboe@fb.com, hch@lst.de Subject: Re: PATCH V4 0/5 nvme-pci: fixes on nvme_timeout and nvme_dev_disable Message-ID: <20180419022735.GC5495@ming.t460p> References: <1520489971-31174-1-git-send-email-jianchao.w.wang@oracle.com> <20180417151700.GC16286@ming.t460p> <20180418154032.GA22533@ming.t460p> <2b985ef5-223f-6a11-45b4-e570c8a93bb3@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2b985ef5-223f-6a11-45b4-e570c8a93bb3@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 19 Apr 2018 02:28:01 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Thu, 19 Apr 2018 02:28:01 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 19, 2018 at 09:51:16AM +0800, jianchao.wang wrote: > Hi Ming > > Thanks for your kindly response. > > On 04/18/2018 11:40 PM, Ming Lei wrote: > >> Regarding to this patchset, it is mainly to fix the dependency between > >> nvme_timeout and nvme_dev_disable, as your can see: > >> nvme_timeout will invoke nvme_dev_disable, and nvme_dev_disable have to > >> depend on nvme_timeout when controller no response. > > Do you mean nvme_disable_io_queues()? If yes, this one has been handled > > by wait_for_completion_io_timeout() already, and looks the block timeout > > can be disabled simply. Or are there others? > > > Here is one possible scenario currently > > nvme_dev_disable // hold shutdown_lock nvme_timeout > -> nvme_set_host_mem -> nvme_dev_disable > -> nvme_submit_sync_cmd -> try to require shutdown_lock > -> __nvme_submit_sync_cmd > -> blk_execute_rq > //if sysctl_hung_task_timeout_secs == 0 > -> wait_for_completion_io > And maybe nvme_dev_disable need to issue other commands in the future. OK, thanks for sharing this one, for now I think it might need to be handled by wait_for_completion_io_timeout() for working around this issue. > > Even if we could fix these kind of issues as nvme_disable_io_queues, > it is still a risk I think. Yeah, I can't agree more, that is why I think the nvme time/eh code should be refactored, and solve the current issues in a more clean/maintainable way. Thanks, Ming