Received: by 10.223.176.5 with SMTP id f5csp109472wra; Mon, 5 Feb 2018 17:48:17 -0800 (PST) X-Google-Smtp-Source: AH8x227OyjZATj361wLOEDqPjL2ZSnhcF8/G0R3hX59K8pu8ICzJeGi+vUjYCo/Aaj4ebjCbxqS5 X-Received: by 10.98.22.65 with SMTP id 62mr718288pfw.211.1517881697157; Mon, 05 Feb 2018 17:48:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517881697; cv=none; d=google.com; s=arc-20160816; b=MXrdcYwzYSqp1E7DM0JwMEkFIQjmmsqNheabEa0GMDnGNIVqH4rp2DMwH2v3H6JdI/ dRhq/xMABz9OgPaweoGomUGdpFJKCP4nC8RPZwepJ6Y0V3D9Qe/vJLBJ0IUQbntLLHaO +V+EGXuBvi7aWlsr4u4ZDrrR8l9zW0Nl4DB0X4JNft6wkWbP6o2CjqZHLkSwBTteC39+ h5ex6OlB0yS9c3V//qmyJYgVbnjV7ZzErf1Gh/Zruo5XsJzmdtby2u6+e1dnvq1Hl/4D ++U4QzL8Y11f2ooV8uUpBm3slKVEldgNvAcqZrLGhfE1WiRlw0B0cNFwRRNqweG8QmM/ dHWA== 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=vK8QZ6f7z/pNikrfplgqRVVS4MRNyS4dWTBTjwjuXmw=; b=xVxl2bKJnQGjFSOhZ8vcCx34wnfCk7DqTcHRPazwnA01M2fHxWNlQWh3E8oXI76qrA 7hmIWn+Qx44HcwYQd3mTOGby4xSULSGcPD46GTp2FnG0eDjY3FjlUoGEzObG2yjGQgq+ wA/9XtbLX/RuhRRLEw2XByWdEiOCyWFVGV/OndaW3xmB5pkIlofK/ojhFsn8XKJMiZYI ZkdSCf0gpo8WjY/dAl3QOp2R/dY7oIF1K1PIVwJNoawE1fS4sVpaVqF6k/JMete+YSJ2 ddjbaubySZErNjmSfSAIwz0MCQ6BujFu9QaxkdfCl8Zd9FTEX8KbRDEvTy0JaaI9iVXx nFmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=EuV39srW; 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 s186si5762074pgc.691.2018.02.05.17.47.59; Mon, 05 Feb 2018 17:48:17 -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=EuV39srW; 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 S1752378AbeBFBrD (ORCPT + 99 others); Mon, 5 Feb 2018 20:47:03 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:58080 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069AbeBFBq6 (ORCPT ); Mon, 5 Feb 2018 20:46:58 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w161gLGp196276; Tue, 6 Feb 2018 01:46:20 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=vK8QZ6f7z/pNikrfplgqRVVS4MRNyS4dWTBTjwjuXmw=; b=EuV39srWCgsQi0jJ/v9JP8O05wYamHsQduVq1R6o//weaYLQv0NHczFEKQ4nwDgMY4Uo Ts4mgsKzTHhBWrYHyKb1F8VIzbljegKyjLsa/UnVS+kuyarYenh8zrucxYdBvvWJ1Xu1 qwhDNc+ll/OUVArhNZbGFeYxsMGJ9NCivDuVrJi9g4uWWICkItwO3qXyfPWCkUWP5cPC AEbfKw4Zts74aNP3v18KfyIfHHrF/zCSkc95WmHZc86zcwDUSVqOCz2A3TcY2KAId7Z4 gzwRG+nyr0T1/Ntnx9VteCoEEvKafE31Eyw8DsGuTTAfAfxWHjw+5WqzRo6GFBp/dQkN 1g== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2fy1ekr78b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 06 Feb 2018 01:46:20 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w161kJb6003663 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Feb 2018 01:46:20 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w161kIrW013333; Tue, 6 Feb 2018 01:46:19 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 05 Feb 2018 17:46:18 -0800 Subject: Re: [PATCH 2/6] nvme-pci: fix the freeze and quiesce for shutdown and reset case To: Keith Busch Cc: axboe@fb.com, linux-kernel@vger.kernel.org, hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me References: <1517554849-7802-1-git-send-email-jianchao.w.wang@oracle.com> <1517554849-7802-3-git-send-email-jianchao.w.wang@oracle.com> <20180202182413.GH24417@localhost.localdomain> <20180205151314.GP24417@localhost.localdomain> From: "jianchao.wang" Message-ID: Date: Tue, 6 Feb 2018 09:46:36 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180205151314.GP24417@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=8796 signatures=668662 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-1802060018 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 02/05/2018 11:13 PM, Keith Busch wrote: > but how many requests are you letting enter to their demise by > freezing on the wrong side of the reset? There are only two difference with this patch from the original one. 1. Don't freeze the queue for the reset case. At the moment, the outstanding requests will be requeued back to blk-mq queues. The new entered requests during reset will also stay in blk-mq queues. All this requests will not enter into nvme driver layer due to quiescent request_queues. And they will be issued after the reset is completed successfully. 2. Drain the request queue before nvme_dev_disable. This is nearly same with the previous rule which will also unquiesce the queue and let the requests be able to be drained. The only difference is this patch will invoke wait_freeze in nvme_dev_disable instead of nvme_reset_work. We don't sacrifice any request. This patch do the same thing with the previous one and make things clearer. :) Thanks Jianchao