Received: by 10.192.165.148 with SMTP id m20csp1813125imm; Sat, 28 Apr 2018 06:05:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp1594enLYcamsCsfXmCRxj8ioANLx3UDOnQyZUjoeHyBeBB9vi5enDbtkHFYu+ugco6oN6 X-Received: by 2002:a63:31cd:: with SMTP id x196-v6mr4971723pgx.397.1524920733363; Sat, 28 Apr 2018 06:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524920733; cv=none; d=google.com; s=arc-20160816; b=v5yDsV+f2kNpj4mdsYA+difmBCVan1JK6/ZHYxOUeq8gmYJG+yRLGxQoeZ+/qtMLiB 0UnFgcn2DAMLJ7AanX8Vo2XWaIgJkhUnGvt4X/K5L9hz5Hc8W3tfV+Zw77hxb3jSUZ1p ms5qze8w9wzlUcHEXREmOguIT8hO8B56/exuHjOYpwh1MBFf5rQzW/bxdAbDmX1yDplL KpeGW81ip/NSQqlJA9Ekg8+ABto9mj/GU9PSlzE31Y/8OJ3gChtSSnzO0GMN5/p6EMkq /D6miRFemGisVkt0xrtLKoiEaHcRuJilp7VjMyQx6+pNfoXtdczI0xbLfOoNkBMVG2ZW /gAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=Y98JVSdme49kP80PPgDh/gOeTbI85E4Q+yIhEDWxsQU=; b=CpQXPj3Azk+4oei9T6D7tueFROUa/QIOldwG9ke4Cry+2ZcKQ04VdPdZwNwM64SxV9 TyuOKjqrGTswE4/yiuN53oOan9I1R843Z1jEfv6tb3f3YOux+4Hnv/h3eovLgKwF0kY2 e3tW898PS2oM9cOsBTv9otHIfq2oPI8UJjuEkSqoIC/VONBF5UUoXAwkkgLzOWbtGnsL KSBc0nyWYs46oR/VYISS09LK+p6gGzK00Qo2/2W8H2CZYIOQcdpKJTxCOWuQ4Epr0hmL p2nowkMnICwUoXrxPPaIFI0on7/r8mP/daUK6O1wQzZY1uPUKmTVF96W4ZKcKUZ4fliY XeWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=VZ4Ba3hI; dkim=pass header.i=@codeaurora.org header.s=default header.b=ai+r9Qlt; 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 y1-v6si3133963pge.198.2018.04.28.06.05.04; Sat, 28 Apr 2018 06:05:33 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=VZ4Ba3hI; dkim=pass header.i=@codeaurora.org header.s=default header.b=ai+r9Qlt; 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 S933514AbeD1NDM (ORCPT + 99 others); Sat, 28 Apr 2018 09:03:12 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41158 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933450AbeD1NDK (ORCPT ); Sat, 28 Apr 2018 09:03:10 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3EE9F60594; Sat, 28 Apr 2018 13:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524920590; bh=PRjPPeG/WOk/PNFZ8NvcAdL4ZeeL9QtcEf2dLRX0SXk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VZ4Ba3hIY3WaaFOcv9zoe014Z36zD8eJbg1FsLTV8ZC25xTTjKbnp905ZdCmG7cpB qn4trA0/ZX8f5vzBPib/rXRxJP1UeegH63NOF1Qpub0n50wpFS2/mvY/c2jofakun3 uY7u5LsHfwBXUBARhFDIut+Hd5o5BTMl6d0q0mxw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 485336019F; Sat, 28 Apr 2018 13:03:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1524920589; bh=PRjPPeG/WOk/PNFZ8NvcAdL4ZeeL9QtcEf2dLRX0SXk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ai+r9QltIrr9k0KBYKzjPERBgIoQm7YMy8WbSiRt+iOdWYjHIkY9vbvVV3xy5kilw ksetqT0GBbQJKswNC7LdSv0rVuj39P8e9XG4jD9Mwojm/fDCViBUEsA40Lc3u31jIZ 8gHl/vs9SN18y07SWsgzLVgQE9rRF7SpzxaYn000= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 28 Apr 2018 09:03:09 -0400 From: okaya@codeaurora.org To: Dave Young Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, Paul Menzel , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Lukas Wunner , Eric Biederman , Bjorn Helgaas , Vivek Goyal Subject: Re: pciehp 0000:00:1c.0:pcie004: Timeout on hotplug command 0x1038 (issued 65284 msec ago) In-Reply-To: <20180428011845.GC1675@dhcp-128-65.nay.redhat.com> References: <8770820b-85a0-172b-7230-3a44524e6c9f@molgen.mpg.de> <20180427192207.GG8199@bhelgaas-glaptop.roam.corp.google.com> <20180427211255.GI8199@bhelgaas-glaptop.roam.corp.google.com> <20180428005620.GB1675@dhcp-128-65.nay.redhat.com> <20180428011845.GC1675@dhcp-128-65.nay.redhat.com> Message-ID: <3ebc908fb196168bf0373875ffc5679e@codeaurora.org> X-Sender: okaya@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-04-27 21:18, Dave Young wrote: > On 04/28/18 at 08:56am, Dave Young wrote: >> On 04/27/18 at 04:12pm, Bjorn Helgaas wrote: >> > [+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 > > Hmm, if it is the remove() method then kexec does not use it. kexec > use > the shutdown() method instead. I missed this details when I replied. Portdrv hooks up remove handler to shutdown. That's why remove is getting called. > >> > > > 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. >> >> It is true for kdump. But kexec needs device shutdown. >> >> > >> > 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. >> >> Devices sometimes assume it is in a good state initialized in firmware >> boot >> phase, so we need a shutdown in 1st kernel so that kexec kernel can >> boot >> correctly for those devices. For kdump since kernel already panicked >> and it is not reliable so we do as less as we can in the 1st kernel >> crash path, but there are some special handling for kdump in various >> drivers >> to reset the devices in 2nd kernel, eg. when it see "reset_devices" >> kernel parameter. >> >> > >> > 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 >> > >> > _______________________________________________ >> > kexec mailing list >> > kexec@lists.infradead.org >> > http://lists.infradead.org/mailman/listinfo/kexec >> >> Thanks >> Dave >> >> _______________________________________________ >> kexec mailing list >> kexec@lists.infradead.org >> http://lists.infradead.org/mailman/listinfo/kexec