Received: by 10.223.176.46 with SMTP id f43csp861259wra; Sat, 20 Jan 2018 06:17:50 -0800 (PST) X-Google-Smtp-Source: AH8x227VweoJ/fWMvURpU7mTmKQavX2pHCIxjP+kOJ5iK/Waa4soLDexc4U1hMDJU7HSFIOeDGW8 X-Received: by 10.99.111.11 with SMTP id k11mr2091351pgc.414.1516457870295; Sat, 20 Jan 2018 06:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516457870; cv=none; d=google.com; s=arc-20160816; b=nnRtxj9MhYSAok9wXkef67rdl56d2KbqWIDKQIKwnopDYcsYiTpo/Wjz5waG1cTiqd o3H8Gi2BUbQ8Viorx56YXCN8a2FuMbXWZkYQClEA9L1KlQpeg9VjRcOmMZaLxxjJWm/h Q+0U6jaqL/wBd/UmmriGhSoT71oNtRKv6eDAeWn1Cr9AxzwPeXFoGD0tFYoSupqj6DBi 9Qk3BOF2lTcdaIVanIOkW3Lx2cmYLQwA1PXG+jCCME+ZTdhHRhV+MwjH9eB8uIpbQ9qO 52vSs49QPHN9k1xEkiKyStSONxi2DlMg1YL7FmepjNQ4rt/iC0B8Jh3SrSQM0Ca261xm GDZQ== 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=bMq7jQW3qZbHpmwMluug0SlaWUmKYW49rGZzl76XbfQ=; b=MQzALi3wXBkWcAu86mAzJ6xdQLpfKXmWzLlMVpf9pLxm65eYWYft1sVHuRxKFVMj6e Oh51UkdNL9SFkHdkZvYFYc9N7q+aOLKAMOqF/n2erkOxMLPQ3THtFyVQXQh17wkvaIy9 VG8eNtBMaAJTt8mZapE4gmoJvN0mQZK2scH39wJ/CmlSzCik8EAJqooOkaUkw732FDR/ Fb9JNxgs/TvUHghvXg2NFA1p/moZc2cXshIo2jfRtoykVWhl9WwYuuEuKbYw4UqRXE2Y pKRcueGm09TwHQerplB/RxwlYxu1+nkcU4FrPqhbwzM1ZgVZcbOoNoKpOaRJPL6tweZC p4Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=VhZBrdMO; 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 bc9-v6si1737240plb.12.2018.01.20.06.17.35; Sat, 20 Jan 2018 06:17:50 -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=VhZBrdMO; 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 S1754913AbeATOP7 (ORCPT + 99 others); Sat, 20 Jan 2018 09:15:59 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:38780 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751343AbeATOPy (ORCPT ); Sat, 20 Jan 2018 09:15:54 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w0KEDiqu165079; Sat, 20 Jan 2018 14:14:59 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=bMq7jQW3qZbHpmwMluug0SlaWUmKYW49rGZzl76XbfQ=; b=VhZBrdMOfDOupE74eJIlQJ78GvDssq64mKYXg4XHvuzOGk6JXCt18vmakK4GeRiXvv6j Q92QZ0TsVOatO7LDLHqpe7fauNrtdvZ+6dQfSOaBkixZHVNODvlWaQV+uVMMzOusrjte mUAigPAiRMkcLkd69WBMdg6McleGqLa8phiwNWhLYA5LsJfKvaqh+yRbxfs5J2DRRgG9 ie6+zeSmgv1Vb0IgMB60LhlIXx8RlQR/9B+VuMdkEUuJIBwwahjWgmGTgjEmmrvvbqGa FvDZzx+GfeW5Rr5e/zH59cf5acnCjuCBL/76k4W3atn/jwQS9M6fVYVvPgiepdTjhw+1 5Q== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2fm5rf0450-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 20 Jan 2018 14:14:59 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0KEEw7v013790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 20 Jan 2018 14:14:58 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0KEEvj1015454; Sat, 20 Jan 2018 14:14:57 GMT Received: from [10.191.8.227] (/10.191.8.227) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 20 Jan 2018 06:14:57 -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> <3cc0d180-0b7e-e71f-66ce-43f4dfffb701@oracle.com> <20180120021119.GJ12043@localhost.localdomain> From: "jianchao.wang" Message-ID: Date: Sat, 20 Jan 2018 22:14:51 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8779 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-1801200208 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/20/2018 10:07 PM, jianchao.wang wrote: > Hi Keith > > Thanks for you kindly response. > > On 01/20/2018 10:11 AM, Keith Busch wrote: >> On Fri, Jan 19, 2018 at 09:56:48PM +0800, jianchao.wang wrote: >>> 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. >> >> We should kick the request list in nvme_start_queues. >> > Yes > > @@ -3513,8 +3513,10 @@ void nvme_start_queues(struct nvme_ctrl *ctrl) > struct nvme_ns *ns; > > mutex_lock(&ctrl->namespaces_mutex); > - list_for_each_entry(ns, &ctrl->namespaces, list) > + list_for_each_entry(ns, &ctrl->namespaces, list) { > blk_mq_unquiesce_queue(ns->queue); > + blk_mq_kick_requeue_list(ns->queue); > + } > mutex_unlock(&ctrl->namespaces_mutex); > } We have to also add blk_mq_kick_requeue_list in nvme_kill_queues in case of queue_count < 2. > > Then, nvme_sync_queues could be more universal. > > Many thanks for your directive. > > Jianchao >