Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3369246pxb; Fri, 5 Nov 2021 14:35:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6wns4Gj5n3QJzJFspbquQ6HXOBMoYWxw/kjYOxUQ36+5dKMJi7PYd2usSL+PmVcwU9cGN X-Received: by 2002:a05:6e02:1a03:: with SMTP id s3mr17132264ild.80.1636148133626; Fri, 05 Nov 2021 14:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636148133; cv=none; d=google.com; s=arc-20160816; b=nsrOwbKGTMUhAt8vqiypaZuWFdpOuGEljk5SRA88sf4uBwTAZIb4wSvtVWDE3lTtZc istmDxvaFwIvWe9QaNJ8oNYK4aOGQp8nuqnF1OlmjjJbDR6b4UksRi+N5TtZpRdAoGvS i0op1ZkUwQFE/Dt35IU4OL7LsfNIa9LNO/SnyXDKa5szyyRJXl63penCzCtMP32H+Ogl 7KzCt1a5lWV1ahYzUroeNhXd7cx8w5r/FpmW6yiPPnSkHfbhhk1dqism8YIDQYP/IOO4 9PwhKp8N/yC2ZXk+6OnhsLKP7Za4hN6NYSM0qaY9/LI9ShKhK3Tqy9fZcSNeYd28P+03 Ku/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=qEqaGNhHv+XkeffgsNdgnlPtXz8JtNutzQRnhr22aFY=; b=HDB0tty9YCBYlMduTyYufAUBeC0KxSSKhlc44ejU0Bd4opmtQDWdShFOaIp1uIm7aE a0LHBjnpK4akeWsRtuPdPUSlIG+zR2veogxH19t3/jNIEx7PQ71lFntjc7Goil+mWKEz 8/PRmv7ZusVSfrfG+MKF/Hf3sLEEbRrCSVagjYVsTsbC9DsZZYZeTxdqIHEMc+Uu05It eia8b2uT2u2qzM44AwlAn/b9AjjxunMyNU5CGYqVK+eXxvYnm99caWxsHd6Ye92e3+gt 68uGW+nRrUFh3UqPufjoZL9jQAL917M4kqviIiPc7+zR3U8P3joyW85Otbzqo74QPPqo sULA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CWKwmniU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si18321264ila.32.2021.11.05.14.35.21; Fri, 05 Nov 2021 14:35:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CWKwmniU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233094AbhKESzt (ORCPT + 99 others); Fri, 5 Nov 2021 14:55:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:57176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229926AbhKESzq (ORCPT ); Fri, 5 Nov 2021 14:55:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DA4861215; Fri, 5 Nov 2021 18:53:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636138386; bh=hV76Xvv6i74dZtaHM89S+SSEowZvftfggWJ/QqvgC9A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=CWKwmniUzpPJBNFQqPVW84z1S1LeA9Ybf8lyPWOKfKteIJ/hJduQzc7aPDHTO9Xtu VgmaFnsGK2q0Q3NyhjpyjzImoy8AcZ67iCozwO35kfCVlJzxuNeCFMiBWhm+N1kFu7 j9eNWuvKukTYliq0SGSdpe/IRRdHckZEPy7Foj7w9CsIM9dcy5b7N0Mh8ce77qauqr jh0EqjsyEPtUSqvckX2itIJXG6i/bKH2ygC2X6g/8qdvQzK0dXPyg1gslA0FFuh+RW lqzNKfqEJJ6/Bw/jcPokr12IGlU/85FUCO1zzDSxBxLyjq+QpH8x3xYaAZULuE2S+M 433SIGs6Xb1uA== Date: Fri, 5 Nov 2021 13:53:04 -0500 From: Bjorn Helgaas To: Paul Menzel Cc: =?iso-8859-1?Q?J=F6rg_R=F6del?= , Suravee Suthikulpanit , Bjorn Helgaas , iommu@lists.linux-foundation.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, LKML , linux-pci@vger.kernel.org Subject: Re: How to reduce PCI initialization from 5 s (1.5 s adding them to IOMMU groups) Message-ID: <20211105185304.GA936068@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 05, 2021 at 12:56:09PM +0100, Paul Menzel wrote: > Dear Linux folks, > > > On a PowerEdge T440/021KCD, BIOS 2.11.2 04/22/2021, Linux 5.10.70 takes > almost five seconds to initialize PCI. According to the timestamps, 1.5 s > are from assigning the PCI devices to the 142 IOMMU groups. > > ``` > $ lspci | wc -l > 281 > $ dmesg > […] > [ 2.918411] PCI: Using host bridge windows from ACPI; if necessary, use > "pci=nocrs" and report a bug > [ 2.933841] ACPI: Enabled 5 GPEs in block 00 to 7F > [ 2.973739] ACPI: PCI Root Bridge [PC00] (domain 0000 [bus 00-16]) > [ 2.980398] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM > ClockPM Segments MSI HPX-Type3] > [ 2.989457] acpi PNP0A08:00: _OSC: platform does not support [LTR] > [ 2.995451] acpi PNP0A08:00: _OSC: OS now controls [PME PCIeCapability] > [ 3.001394] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using > BIOS configuration > [ 3.010511] PCI host bridge to bus 0000:00 > […] > [ 6.233508] system 00:05: [io 0x1000-0x10fe] has been reserved > [ 6.239420] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active) > [ 6.239906] pnp: PnP ACPI: found 6 devices For ~280 PCI devices, (6.24-2.92)/280 = 0.012 s/dev. On my laptop I have about (.66-.37)/36 = 0.008 s/dev (on v5.4), so about the same ballpark. Faster would always be better, of course. I assume this is not really a regression? > [ 6.989016] pci 0000:d7:05.0: disabled boot interrupts on device > [8086:2034] > [ 6.996063] PCI: CLS 0 bytes, default 64 > [ 7.000008] Trying to unpack rootfs image as initramfs... > [ 7.065281] Freeing initrd memory: 5136K > […] > [ 7.079098] DMAR: dmar7: Using Queued invalidation > [ 7.083983] pci 0000:00:00.0: Adding to iommu group 0 > […] > [ 8.537808] pci 0000:d7:17.1: Adding to iommu group 141 I don't have this iommu stuff turned on and don't know what's happening here. > Is there anything that could be done to reduce the time? > > > Kind regards, > > Paul