From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755277AbeATOIq (ORCPT ); Sat, 20 Jan 2018 09:08:46 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:33372 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751269AbeATOIi (ORCPT ); Sat, 20 Jan 2018 09:08:38 -0500 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:07:02 +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: <20180120021119.GJ12043@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=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-1801200206 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); } Then, nvme_sync_queues could be more universal. Many thanks for your directive. Jianchao From mboxrd@z Thu Jan 1 00:00:00 1970 From: jianchao.w.wang@oracle.com (jianchao.wang) Date: Sat, 20 Jan 2018 22:07:02 +0800 Subject: [PATCH V5 0/2] nvme-pci: fix the timeout case when reset is ongoing In-Reply-To: <20180120021119.GJ12043@localhost.localdomain> 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> Message-ID: Hi Keith Thanks for you kindly response. On 01/20/2018 10:11 AM, Keith Busch wrote: > On Fri, Jan 19, 2018@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); } Then, nvme_sync_queues could be more universal. Many thanks for your directive. Jianchao