Received: by 10.223.148.5 with SMTP id 5csp6803099wrq; Wed, 17 Jan 2018 19:26:19 -0800 (PST) X-Google-Smtp-Source: ACJfBoueKJ0J/d7vIF6+XNHMoXbOS2Ym0WuSnYBhXFoD9iWPuRxjOt9m8zmVOzKl6eB4p/+T1aD4 X-Received: by 10.98.245.214 with SMTP id b83mr30540804pfm.85.1516245978983; Wed, 17 Jan 2018 19:26:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516245978; cv=none; d=google.com; s=arc-20160816; b=HoEuX4rYL3PXR3IKd6idUEfoMlS8aCLtAouYZmhfK+nRiFLzESwwSA6EDrP5A0KHAL PYkM4mIUnPqvhp3+9xrGV7QuNZlDP5PN/vkKGC+ZpuQyYMgygSYyfrEWefC4edcdFDg0 jMs33bghHQYFhZZ6TAt9p3BOVRgwIFwP6A5V0Nc+JBonJ2Zk6vG+52sxrXbXCgPfnZgq mc9WLo3Ytc9Eua4iK0jsFxnZ3AYC7CaHjJosHx1H2OPyagJTiDItgFfT7slP54yfBn3l zgbc7hvm+Gky7scEJE35Ge4hHBfbNDqzaMIQ04vrinVJr808b7JnUV18OZTGF49YYKuR fN0g== 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=+1RyIhD8wbQxWXXOmXbHRuYRyeumNFlaCvWQYHsAy0k=; b=ZqjWnVQhL3JEr+s+PLq/OK0vgah5KdJQuss9bXPkIxDjnu+ibjkTk/P2F4UX8bCmXh kkhZarSxALu0HkL+ZoYd8gNuEEHezdE8FxFpWK+woeA+bxI+V/pteRUM497D/lj6qElO +fIia1tw9BglZIS0C/BYXvsMRjql1jSGMT9a9OKOcYB5Rb1nOt2KSCLB2H0PJCK6Qdjk XUjcB2QepJMNZmjqq8785m1xqliukISi0xZesf9IvtVcGpLOoCCh7Y8/oAO02f6V3dc2 g7NCNJZHzwf9y3ZLAEdxrRpNH3cRZi8OBhRq+uhmDRwHeDyP3kWBH1CeU9N9uStOlR3O UfFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=DKUwNPue; 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 b14si4952563pge.297.2018.01.17.19.26.05; Wed, 17 Jan 2018 19:26:18 -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=DKUwNPue; 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 S1753762AbeARDZi (ORCPT + 99 others); Wed, 17 Jan 2018 22:25:38 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:39986 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752689AbeARDZf (ORCPT ); Wed, 17 Jan 2018 22:25:35 -0500 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 w0I3MOPv155546; Thu, 18 Jan 2018 03:24:53 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=+1RyIhD8wbQxWXXOmXbHRuYRyeumNFlaCvWQYHsAy0k=; b=DKUwNPueAzj8kQ1sPTz9Fdo5+/dr07d4oUJQJTSXN6CIgbqNvKjEdEUrqUBTdDq2VvxE 8HX55qWy1LO2qp3/BVbJdX2vRB/7NfyDlCeIZF/kGY83EK813opsLEUNtOGPTMDhcymN SnpnZwPIgjAfNZpAXs+T58XFhEB0yIZHo8EvRuVMblVTBdHJ/f5PPpQCE4BXsFZGrgcF Rm4eNsT9ghyQlqUQJ+fzHzEOENbeF0zucKU3URDtVLK0jGMplGaFW+24zhcsT3WRc7aI +Gq+w6DJdofHMfd2YWMhCpuRNWQCZ3zNIjdt51nt30PyG4CE0osE5kgAuoqVV+yGSxUS zg== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2130.oracle.com with ESMTP id 2fjjx0g3xf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 18 Jan 2018 03:24:53 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w0I3OqCE018387 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 18 Jan 2018 03:24:52 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w0I3Op0S029582; Thu, 18 Jan 2018 03:24:51 GMT Received: from [10.182.69.179] (/10.182.69.179) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Jan 2018 19:24:51 -0800 Subject: Re: [Suspected-Phishing]Re: [PATCH V3 1/2] nvme: split resetting state into reset_prepate and resetting To: James Smart , Sagi Grimberg , Max Gurtovoy , keith.busch@intel.com, axboe@fb.com, hch@lst.de Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org References: <1515647268-1717-1-git-send-email-jianchao.w.wang@oracle.com> <1515647268-1717-2-git-send-email-jianchao.w.wang@oracle.com> <1c001532-234f-bc56-7fb4-bcd08142842e@mellanox.com> <2d198b6a-47f4-8d2b-024d-76161f4b0f90@oracle.com> <538cb758-a343-a823-3a50-993a541414b3@grimberg.me> <29941689-77ea-5c97-641a-fd5b8d1a6c82@broadcom.com> From: "jianchao.wang" Message-ID: <4a95c310-589c-2e10-6dbb-e07fa05301ad@oracle.com> Date: Thu, 18 Jan 2018 11:24:47 +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: <29941689-77ea-5c97-641a-fd5b8d1a6c82@broadcom.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8777 signatures=668653 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-1801180047 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James and Sagi Thanks for your kindly response and directive. On 01/18/2018 05:08 AM, James Smart wrote: > On 1/17/2018 2:37 AM, Sagi Grimberg wrote: >> >>> After Sagi's nvme-rdma: fix concurrent reset and reconnect, the rdma ctrl state is changed to RECONNECTING state >>> after some clearing and shutdown work, then some initializing procedure,  no matter reset work path or error recovery path. >>> The fc reset work also does the same thing. >>> So if we define the range that RESET_PREPARE includes scheduling gap and disable and clear work, RESETTING includes initializing >>> procedure,  RECONNECTING is very similar with RESETTING. >>> >>> Maybe we could do like this; >>> In nvme fc/rdma >>> - set state to RESET_PREPARE, queue reset_work/err_work >>> - clear/shutdown works, set state to RECONNECTING >> >> Should be fine. >> >>> In nvme pci >>> - set state to RESET_PREPARE, queue reset_work >>> - clear/shutdown works, set state to RESETTING >>> - initialization, set state to LIVE >> >> Given that we split reset state and we have a clear symmetry between >> the transports, do we want to maybe come up with a unique state that is >> coherent across all transports? >> >> Maybe we rename them to NVME_CTRL_SHUTTING_DOWN and >> NVME_CTRL_ESTABLISHING? I'm open for better names.. > > I'm leaning toward this latter suggestion - we need to define the states and the actions they take. It seems to me, that RESETTING became the "init controller" part in Jainchao's model. So maybe it's not the shutting down that needs a new state, but rather the REINIT part. In fact, it is the nvme-pci need a new state. The "shutdown" part and "reinit" part in nvme-pci are both in RESETTING state. But in nvme-fc/rdma, they have a RECONNECTING state to mark the "reinit" part. So we have a SHUTTING_DOWN state to mark the "shutdown" part in nvme-pci and nvme-fc/rdma, but as James pointed out, there is a big difference in "reinit" part between nvme-pci and nvme-fc/rdma, we use a coherent name ESTABLISHING ? or separate names REINIT and RECONNECTING, for the "reinit" part. Thanks Jianchao