Received: by 10.192.165.156 with SMTP id m28csp134450imm; Wed, 18 Apr 2018 18:53:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4903uemIAfA4B3s2hNb2fKpC64PkKHYQazN551PBpdNetOq43RgGVBi0WD8aCAMPcEz3NU2 X-Received: by 10.101.99.16 with SMTP id g16mr3525633pgv.328.1524102788934; Wed, 18 Apr 2018 18:53:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524102788; cv=none; d=google.com; s=arc-20160816; b=NJujafa0vZhNAMkhcYWwJIhwcSQeQlPA2hMB7zRjL5JWWBCg6u3a9ECLMPzrzBubvJ NQG2rKvFo/wGnzCY5kYh1StNIQMq3dctUETGf/wyxrRdgeUAuwafCL1CMVGYuyhLWiAr lJUxvUs0RxLPq0MaHc3bT2pBSoPO9Uem9BwyDulfaiSNLYBbv+YVxSr67bzjoKe8muLm TCe1xtFw0w6rbzv1cjDPPuJmVitjqClaeKhRe7R77aDfho58TB7jT97n+k2yZPLbHSPq 6X6T+DBZwtLaZlql10uw5XJ8XhUIdzeZbEt7itcFWSR3TEXPZpEdX11kNwoByITSbmiY ZOVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Icr+MPBRaiFvFDKjWfUDPlMs4sfaCZ3HjCYSixrnH+g=; b=egoAWvb4JyUnh6tsX2QNGizcJVo0R8O5ZSvd3+nrETUn+9C7gvDuEB42qTVKhnxxgm zoZn8pvnj2yV0Lxr/7QHM6Qz23rFNTf272d929GRe/kAY9h8/ROfAjLBasF8hIVEFKVv za8d48+6ozRrJawtpJBM9cI1ZP7OUKKTxgd/OFof5Ky0uO423E3MZTGAnKgzaxwAem7j 1eBkblHe4+bWTLViwfoA/fixCYOKIT1Z6P7Jaojenm4SeQVAwB2h6K6E5jwZmFMD0MMQ tXallipAJBoqbScO7AxD32h2Fcb9D4xE00MWi/nHoMeg/g1P3w+eSaIL1YSPK/1bPCLa ZIpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=vnm6EwUA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si2125412pgb.422.2018.04.18.18.52.54; Wed, 18 Apr 2018 18:53:08 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=vnm6EwUA; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbeDSBvt (ORCPT + 99 others); Wed, 18 Apr 2018 21:51:49 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:41474 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751878AbeDSBvr (ORCPT ); Wed, 18 Apr 2018 21:51:47 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3J1p9Fo192467; Thu, 19 Apr 2018 01:51:09 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=Icr+MPBRaiFvFDKjWfUDPlMs4sfaCZ3HjCYSixrnH+g=; b=vnm6EwUAAZCB0/h8NLarLBEks2I++83DxNdg6ypi2rjvIURF8ATFrY7GNtuYmd/9oq0t PYlXMB+KKqnP+7e7xQnlDBHAEo+f8MeMyQIa519GQv6746AI5N9C9a+1VJ9hQKyr9Ia4 wzm3dgR7a+zmVM36UkqOdzye7uWK+r4bnGQXUJCoS6lZcvutB9mVp2HnafGzkLDwa1JA ulM3n2BXfUGcusFrCY2CTfIIUDeITfmaDjI6a/AHcALvWw5bxxq+YtONT8VZEmrgUATH BG/kIXCcqk+is7cyGUGLeo8KwHP8tZqe5vZhVjp5ulMCc1Z7SLzCln9pIvZ4N74ywu0L Xg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2hdrxnw7k6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Apr 2018 01:51:09 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3J1p8Qv021201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Apr 2018 01:51:08 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w3J1p63R015164; Thu, 19 Apr 2018 01:51:07 GMT Received: from [10.182.70.180] (/10.182.70.180) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 18 Apr 2018 18:51:06 -0700 Subject: Re: PATCH V4 0/5 nvme-pci: fixes on nvme_timeout and nvme_dev_disable To: Ming Lei Cc: keith.busch@intel.com, sagi@grimberg.me, linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, axboe@fb.com, hch@lst.de References: <1520489971-31174-1-git-send-email-jianchao.w.wang@oracle.com> <20180417151700.GC16286@ming.t460p> <20180418154032.GA22533@ming.t460p> From: "jianchao.wang" Message-ID: <2b985ef5-223f-6a11-45b4-e570c8a93bb3@oracle.com> Date: Thu, 19 Apr 2018 09:51:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180418154032.GA22533@ming.t460p> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8867 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=857 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804190017 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Even if we could fix these kind of issues as nvme_disable_io_queues, it is still a risk I think. Thanks Jianchao