Received: by 10.192.165.148 with SMTP id m20csp1178962imm; Fri, 27 Apr 2018 14:14:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrdyU2+zXeg2NnXfEc3TpU2u7CqKzIMXhWYGPufAEySgxM7OCwTirRJopPhEE1Hr04ygTq7 X-Received: by 10.98.133.154 with SMTP id m26mr3480761pfk.247.1524863657097; Fri, 27 Apr 2018 14:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524863657; cv=none; d=google.com; s=arc-20160816; b=koZTMAZqo3+cElnRSVvC7Tz/1ujlXDJiLuwBS9NAPLVBALQ8H0yMeVOzpjDYoBm4VH 9KecZncSx6OtNZMhpIWnFEGjggHG+N1gPCDcILX14Efr15TQ8moyyW0HZgY8nd6msAOS FHaEah7+sp2MSGdXUE5Tb6uGN8mo9N3l+ThV/r1nZqfsy70LCxMH39oqmGjulIzP4vSW /eS1Eo/UzaMwSigMbhjExQCY2gwqYwScL/nmO9eJu/z2vr9TObg0H4MgvOP3k0ydjMEs IyYqNiadss63fPa6N63zuxjVwXpbVknZ6TRL6hc0GgPqyEU0XM/InmSVwMX/BLBe8phP jRaw== 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:dmarc-filter:arc-authentication-results; bh=504CelcMV5bjYEv74400j3u0FIKxw5rc/aNNIyguiDk=; b=wUu3xCIpJcVXHkYa6KyHO5J7FOstSvBigWuf9a0vWlDciXkjJbi8yFUUhnQgwjRnmT 1TIgkYPA6lwwRvO0PxdUaqFocjqsTvrCDLa2jusfYayej8izEDEhvFQoJAYjobnoQunW P/THDTVy7P7/vZJJcGT7vm7CFNIjdB8I1pUBnrLb6gD8iSof+MwcnxDyHLaevGPb+fjv zmXwI9Y9JJK/78OQx+qG9/dK6jlHkNcY9KYH2XBu4D08jmkd18C7+Ur9Wz+rYmedCiBH bLA/iBt/ws7fluBcpvQIGcgqP/kLZM9hYoEytVwfZUKbYclp4NMjvgvmAwHa1oeRiJJL LaqQ== 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 i3si2086626pfc.186.2018.04.27.14.14.02; Fri, 27 Apr 2018 14:14:17 -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 S932700AbeD0VNA (ORCPT + 99 others); Fri, 27 Apr 2018 17:13:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:37992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757592AbeD0VM7 (ORCPT ); Fri, 27 Apr 2018 17:12:59 -0400 Received: from localhost (unknown [69.71.5.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 91BCD21914; Fri, 27 Apr 2018 21:12:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91BCD21914 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Fri, 27 Apr 2018 16:12:55 -0500 From: Bjorn Helgaas To: Sinan Kaya Cc: Paul Menzel , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Wunner , Eric Biederman , Vivek Goyal , kexec@lists.infradead.org Subject: Re: pciehp 0000:00:1c.0:pcie004: Timeout on hotplug command 0x1038 (issued 65284 msec ago) Message-ID: <20180427211255.GI8199@bhelgaas-glaptop.roam.corp.google.com> References: <8770820b-85a0-172b-7230-3a44524e6c9f@molgen.mpg.de> <20180427192207.GG8199@bhelgaas-glaptop.roam.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [+cc Eric, Vivek, kexec list] On Fri, Apr 27, 2018 at 03:34:30PM -0400, Sinan Kaya wrote: > On 4/27/2018 3:22 PM, Bjorn Helgaas wrote: > > Sinan mooted the idea of using a "no-wait" path of sending the "don't > > generate hotplug interrupts" command. I think we should work on this > > idea a little more. If we're shutting down the whole system, I can't > > believe there's much value in *anything* we do in the pciehp_remove() > > path. > > > > Maybe we should just get rid of pciehp_remove() (and probably > > pcie_port_remove_service() and the other service driver remove methods) > > completely. That dates from when the service drivers could be modules that > > could be potentially unloaded, but unloading them hasn't been possible for > > years. > > Shutdown path is also used for kexec. Leaving hotplug interrupts > pending is dangerous for the newly loaded kernel as it leaves > spurious interrupts during the new kernel boot. > > I think we should always disable the hotplug interrupt on shutdown. > We might think of not waiting for command-completion as a > middle-ground or go to polling path instead of interrupts all the > time. Ah, I forgot about the kexec path. The kexec path is used for crashdump, too, so ideally the newly-loaded kernel would defend itself when possible so it doesn't depend on the original kernel doing things correctly. Seems like this question of whether to do things in the original kernel or the kexec-ed kernel comes up periodically, but I can never remember a definitive answer. My initial reaction is that it'd be nice if we didn't have to do *any* shutdown in the original kernel, but I'm sure there are reasons that's not practical. I copied Eric (kexec maintainer) and Vivek (contact listed in Documentation/kdump/kdump.txt) in case they have suggestions or would consider some sort of Documentation/ update. Bjorn