Received: by 10.223.176.46 with SMTP id f43csp1032768wra; Fri, 19 Jan 2018 06:01:32 -0800 (PST) X-Google-Smtp-Source: ACJfBotXT+ZOaSX+uu7pIhuOhJH30dZM3DpHJGmLJ1kQeEcAC1Jb8+K/ykXo7N39c01jEWPH5BDg X-Received: by 10.101.81.5 with SMTP id f5mr38257302pgq.22.1516370492149; Fri, 19 Jan 2018 06:01:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516370492; cv=none; d=google.com; s=arc-20160816; b=oNBkiWCD/azFa7w9EOwPnixANvBWOL2tQzrM8fuskuvm2HvoViQUr7uA/5IBqxaBlf qhs64zvkgLWqWpge1CccFqgOjg4wQyv2CZz0/fXbytBzm/cIVTHiyMkC9kccG/e4rC9t 7N/nu+BkSxKepVir4rQzw+YyqRI3X8j6hPeYdxlqjpzBygExkE8Fjp+OCfvmeHdCn7YY ff+uX2DVCu/3NkSNCyDI67JWLV3EP9S0SB5n8aEzsuazIDNqednl+WnSIqLlihzmO2Ub A/srJ4yw3YQE7cEM1NbjBr+rXHATiGQB0+vDl3Rxik7zwlYlGi8wRmEQNjEdVXPQ9d0g oHeg== 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=DlVKR0Updff6RsdJ/0jf5CBz2j8CmGQEgk5TjXFtdlw=; b=YD/Td1c5mqXOufpTaFQNDLmS+OpN/XnlKVCS60V4n49afvfJStJNid9sGwlKIP1B/F A7rINPSu+VWaQDkPTfeZTVh3q0F1IjWbGEJS1eTgeZKSYRR2TsxjWGJq7rEEjH9z81Ij iuvWkLcJIvo/EBOlPab/i9ypCGVMIEzrZtgC1PrA+FcYlwm5srawlVCMSUCjOZqq+/Qe zVBu2BtJW/b8HHcBgj3QkuvDy88AWXYCR0rlLgL7JcbeyQw18RTd3KzEp9ib4tw5Fup+ 0N7jSUSHL9QIWe9k4hTF6TiKxSa/0WtHtU5z+idPb09LxazK0fU3ndWOawi7WofEkYtb S1Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qkPgUvCg; 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 o33-v6si844079plb.354.2018.01.19.06.01.02; Fri, 19 Jan 2018 06:01:32 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qkPgUvCg; 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 S1754951AbeASN5h (ORCPT + 99 others); Fri, 19 Jan 2018 08:57:37 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:47852 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754104AbeASN5a (ORCPT ); Fri, 19 Jan 2018 08:57:30 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0JDsp4U147423; Fri, 19 Jan 2018 13:56:58 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=DlVKR0Updff6RsdJ/0jf5CBz2j8CmGQEgk5TjXFtdlw=; b=qkPgUvCgbW07Ee6b2EGPD0nyOoQCma23GYymz1iyrTCPBaxV/GRRpccBg1NiXSv8o13O l9cyxCJhH/vDUo5HgHSnFaTdcJnYzuPOpIVoylHO62OiFk+qf0Ez6d461Wo1Mt8MUj0f f88O/I81Frs634t2wsG8kF8fSLz6EAsV64NCdv0n+dqyIrpvj44LcUz1mwcZXVzptmrV EfOo/85lkLm0ynQ1cE12GtlkBJNkFS1OjjrklaO+7+5U7zMaQX+BNPb2pXrZZ52r4Yh3 Vu5ZtRZ+aKkhkaDU32uTJK2vM45bhaBWPBzc3+tmCmCiAT11a409ucEbMX2u8H6PVKzU NQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by aserp2120.oracle.com with ESMTP id 2fkhyrr09v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 19 Jan 2018 13:56:58 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0JDuvgb011261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 19 Jan 2018 13:56:57 GMT Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0JDuuK0025039; Fri, 19 Jan 2018 13:56:56 GMT Received: from [10.191.5.26] (/10.191.5.26) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 19 Jan 2018 05:56:56 -0800 Subject: Re: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing To: Keith Busch Cc: axboe@fb.com, hch@lst.de, sagi@grimberg.me, maxg@mellanox.com, james.smart@broadcom.com, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org References: <1516270202-8051-1-git-send-email-jianchao.w.wang@oracle.com> <20180119080130.GE12043@localhost.localdomain> <0639aa2f-d153-5aac-ce08-df0d4b45f9a0@oracle.com> <20180119084218.GF12043@localhost.localdomain> <84b4e3bc-fe23-607e-9d5e-bb5644eedb54@oracle.com> <20180119115255.GH12043@localhost.localdomain> From: "jianchao.wang" Message-ID: <3cc0d180-0b7e-e71f-66ce-43f4dfffb701@oracle.com> Date: Fri, 19 Jan 2018 21:56:48 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180119115255.GH12043@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8778 signatures=668654 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1801190182 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Keith Thanks for your kindly response. On 01/19/2018 07:52 PM, Keith Busch wrote: > On Fri, Jan 19, 2018 at 05:02:06PM +0800, jianchao.wang wrote: >> We should not use blk_sync_queue here, the requeue_work and run_work will be canceled. >> Just flush_work(&q->timeout_work) should be ok. > > I agree flushing timeout_work is sufficient. All the other work had > already better not be running either, so it doesn't hurt to call the > sync API. In nvme_dev_disable, the outstanding requests will be requeued finally. I'm afraid the requests requeued on the q->requeue_list will be blocked until another requeue occurs, if we cancel the requeue work before it get scheduled. > >> In addition, we could check NVME_CC_ENABLE in nvme_dev_disable to avoid redundant invoking. >> :) > > That should already be inferred through reading back the CSTS register. > Yes, the "dead" in nvme_dev_disable looks enough for these uncommon cases. Thanks Jianchao