Received: by 10.192.165.156 with SMTP id m28csp2067346imm; Thu, 12 Apr 2018 08:05:42 -0700 (PDT) X-Google-Smtp-Source: AIpwx49B4Z6K76jQcJlglY+ADl9qeOTL3ZnZ7ICLjjnu9lVTxEfbWIhZCYuBEygNeW3XrXJm8sE8 X-Received: by 2002:a17:902:4001:: with SMTP id b1-v6mr1411030pld.273.1523545542130; Thu, 12 Apr 2018 08:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523545542; cv=none; d=google.com; s=arc-20160816; b=xeFnfCO2xEhKUKNmgzYN5kL+ZcAleVx7Xz0ouoUcAZcHXQ+QvGhL0lEXJ3XulG2xya CWz/yOXuh4G84B+YpYwM5rX9l9OPg9LCOT04A2fYQQKfeM+hb1ahzbfjpGesiJcHjnRi ldD0DAOmacp+aMiTYDpC9rF9U7ILQla2UXKEi1EyMozeAQJAdknrJKshli4wY3tErAvC zWwtSDYENHLF4uJvJXH2Q7FzR6RCrIRMPiznExXwy8pL+oZhkAgZ51D5PdpAS14tbs6Q /U545V9dtH1405J5/hwXyAuKrqNjq8k7gpSZSlvhLcPqiQNBjmEGSZG4d2whclXxEkmU G9Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=5XixfCIOSLkLdq/I1HY0XyEStHYil+f4lO2Epmmr4us=; b=fbeacMZFL4uCVDWnr46mu0tu7ZIYBWYLcxA/ZLvmON7HqF5uaCSniIkWepG/+EoWBA AmdhaK+/RoaWD4GEEn8VDHFXW8Jo0BECU0cyPph/xwa6lctFV4sAieYi4KI4m697P0wr 4CS81FimSJ2QJC+LRqcAyCl0d0qvtCw369657NGAMC9/zbVstp/0MPz3DNdGlX5IrxkP q1mQyMGZ4F5IRzLqRrWqfOF1s2w6O1+mgbuOHF3o6/DUwJvrZ4ukcbgdfuwgm0A4ULDX 5MRzcLXXaZvZixCyG2dAVE4CLKkpZKu5fHEuPb9Tqzb4OQaZirW+wQVDpmU857VfXby+ uSgg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g6-v6si3510801plp.544.2018.04.12.08.05.05; Thu, 12 Apr 2018 08:05:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbeDLPBj (ORCPT + 99 others); Thu, 12 Apr 2018 11:01:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:63691 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752824AbeDLPBh (ORCPT ); Thu, 12 Apr 2018 11:01:37 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 08:01:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,442,1517904000"; d="scan'208";a="36741649" Received: from unknown (HELO localhost.localdomain) ([10.232.112.44]) by fmsmga002.fm.intel.com with ESMTP; 12 Apr 2018 08:01:34 -0700 Date: Thu, 12 Apr 2018 09:02:31 -0600 From: Keith Busch To: Sinan Kaya Cc: Bjorn Helgaas , Oza Pawandeep , Bjorn Helgaas , Philippe Ombredanne , Thomas Gleixner , Greg Kroah-Hartman , Kate Stewart , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Dongdong Liu , Wei Zhang , Timur Tabi , Alex Williamson Subject: Re: [PATCH v13 6/6] PCI/DPC: Do not do recovery for hotplug enabled system Message-ID: <20180412150231.GD4810@localhost.localdomain> References: <1523284914-2037-1-git-send-email-poza@codeaurora.org> <1523284914-2037-7-git-send-email-poza@codeaurora.org> <20180410210349.GG54986@bhelgaas-glaptop.roam.corp.google.com> <13efe2e8-74c8-acb4-ec58-f79b14a1f182@codeaurora.org> <20180412140648.GD145698@bhelgaas-glaptop.roam.corp.google.com> <20180412143954.GB4810@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180412143954.GB4810@localhost.localdomain> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 12, 2018 at 08:39:54AM -0600, Keith Busch wrote: > On Thu, Apr 12, 2018 at 10:34:37AM -0400, Sinan Kaya wrote: > > On 4/12/2018 10:06 AM, Bjorn Helgaas wrote: > > > > > > I think the scenario you are describing is two systems that are > > > identical except that in the first, the endpoint is below a hotplug > > > bridge, while in the second, it's below a non-hotplug bridge. There's > > > no physical hotplug (no drive removed or inserted), and DPC is > > > triggered in both systems. > > > > > > I suggest that DPC should be handled identically in both systems: > > > > > > - The PCI core should have the same view of the endpoint: it should > > > be removed and re-added in both cases (or in neither case). > > > > > > - The endpoint itself should not be able to tell the difference: it > > > should see a link down event, followed by a link retrain, followed > > > by the same sequence of config accesses, etc. > > > > > > - The endpoint driver should not be able to tell the difference, > > > i.e., we should be calling the same pci_error_handlers callbacks > > > in both cases. > > > > > > It's true that in the non-hotplug system, pciehp probably won't start > > > re-enumeration, so we might need an alternate path to trigger that. > > > > > > But that's not what we're doing in this patch. In this patch we're > > > adding a much bigger difference: for hotplug bridges, we stop and > > > remove the hierarchy below the bridge; for non-hotplug bridges, we do > > > the AER-style flow of calling pci_error_handlers callbacks. > > > > Our approach on V12 was to go to AER style recovery for all DPC events > > regardless of hotplug support or not. > > > > Keith was not comfortable with this approach. That's why, we special cased > > hotplug. > > > > If we drop 6/6 on this patch on v13, we achieve this. We still have to > > take care of Keith's inputs on individual patches. > > > > we have been struggling with the direction for a while. > > > > Keith, what do you think? > > My only concern was for existing production environments that use DPC > for handling surprise removal, and I don't wish to break the existing > uses. Also, I thought the plan was to keep hotplug and non-hotplug the same, except for the very end: if not a hotplug bridge, initiate the rescan automatically after releasing from containment, otherwise let pciehp handle it when the link reactivates.