Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2845082pxb; Fri, 5 Nov 2021 05:46:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4pDgtCW05rfe+KMXwxhFmMohBnngIMw2GL6fYE4u0x2/hu3LYsTesFRIc6m+YlMx3fFHS X-Received: by 2002:a50:d4cd:: with SMTP id e13mr77492452edj.29.1636116363945; Fri, 05 Nov 2021 05:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636116363; cv=none; d=google.com; s=arc-20160816; b=f5fdSe5FRMejdOB8W1EFM/nKMw3qLz8W2kaU40V6CzVY+2QwtnVxexoHn8OjOaMO/x 2MAjjdSXQr8kQw7klzwAb1Xp6GIL2yVgT0L/NaCdGrYSgrT/VzMqHfo0GJ8Vl78B4vr2 nS5UsQVkz6ym9qi5IVgdEFgpmMYHdsQGC4s/N3MqgMP4YtxUgK8sWFlqEO3S1z0577u4 kqyNMWnZOej663DRHdDc6Yp4kloYsH3fDd+wPbx+EjBMrQSgMu0LlmKoCkCHYoLp1vYb brW7sBY/IT/gLK7jazbFKBRSaiN3V4zhXUl/D5INngr0D7CKunMTT8660Jn3AMIp+QRl TaDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language:cc:to :subject:from:user-agent:mime-version:date:message-id; bh=4V8LwnM+NSuBf1ZZmU/G5Nud0ntbZ+WDMy9+pYPa+BQ=; b=OerqtU5I4gF4Gv3uSzMfilvaZpqyryjLh+D0+KxVeemyPfPz8yMRXnr5LfgXSs/Jmm 8zXTCQfOtvyq1kU8YqmCrLXugJfcw3KjbM79/2R4XErHCL6985GyWn9d1s602Vi9+rr2 HtoTKd2eIqvCUWZtsApX7LqqtMla4zNTJJvperv+bbtohrJb6Tiq67NJDMzvGRBy8QzW Gjvu7TsohXtIP7qXhYXZZ826OJs6QZj1tZq5a3PZa6aW18t6//vhcSFiYawEcVmhye7z Tiqnho37+X4Ycgzw6BLJ7H5ox7iS8vRZQVEX/jgL+fqUz1ndaxKo795efpkIb8AtXrkH +iNA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x99si10507690ede.151.2021.11.05.05.45.39; Fri, 05 Nov 2021 05:46:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232778AbhKEL6w (ORCPT + 99 others); Fri, 5 Nov 2021 07:58:52 -0400 Received: from mx3.molgen.mpg.de ([141.14.17.11]:56015 "EHLO mx1.molgen.mpg.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231852AbhKEL6v (ORCPT ); Fri, 5 Nov 2021 07:58:51 -0400 Received: from [192.168.0.2] (ip5f5ae8e7.dynamic.kabel-deutschland.de [95.90.232.231]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 8229861EA191E; Fri, 5 Nov 2021 12:56:09 +0100 (CET) Message-ID: Date: Fri, 5 Nov 2021 12:56:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 From: Paul Menzel Subject: How to reduce PCI initialization from 5 s (1.5 s adding them to IOMMU groups) To: =?UTF-8?B?SsO2cmcgUsO2ZGVs?= , Suravee Suthikulpanit , Bjorn Helgaas Cc: iommu@lists.linux-foundation.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, LKML , linux-pci@vger.kernel.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 […] [ 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 [ 8.571191] DMAR: Intel(R) Virtualization Technology for Directed I/O [ 8.577618] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) […] ``` Is there anything that could be done to reduce the time? Kind regards, Paul