[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f7edc791-7e30-6fce-02ff-a5d2b52d2a69@molgen.mpg.de>
Date: Tue, 17 Jul 2018 18:07:07 +0200
From: Paul Menzel <pmenzel+linux-iommu@...gen.mpg.de>
To: Jörg Rödel <joro@...tes.org>
Cc: iommu@...ts.linux-foundation.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: AMD-Vi: Decrease time of enabling lazy IO/TLB flushing
Dear Linux folks,
On a MSI B350M MORTAR with AMD Ryzen 3 2200g (Raven) with Linux 4.18-rc5+
and Debian Sid/unstable `pci_iommu_init` takes 40 ms according to
`initcall_debug`.
```
$ git log --oneline -1
30b06abfb92b (HEAD -> master, origin/master, origin/HEAD) Merge tag 'pinctrl-v4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
$ git describe --dirty
v4.18-rc5-36-g30b06abfb92b
$ dmesg
[…]
[ 0.145696] calling pci_iommu_init+0x0/0x3f @ 1
[ 0.145719] AMD-Vi: Unable to write to IOMMU perf counter.
[ 0.145799] pci 0000:00:00.2: can't derive routing for PCI INT A
[ 0.145800] pci 0000:00:00.2: PCI INT A: not connected
[ 0.146241] iommu: Adding device 0000:00:01.0 to group 0
[ 0.146449] iommu: Adding device 0000:00:01.2 to group 1
[ 0.146646] iommu: Adding device 0000:00:08.0 to group 2
[ 0.146855] iommu: Adding device 0000:00:08.1 to group 3
[ 0.146881] iommu: Adding device 0000:00:08.2 to group 2
[ 0.147075] iommu: Adding device 0000:00:14.0 to group 4
[ 0.147096] iommu: Adding device 0000:00:14.3 to group 4
[ 0.147304] iommu: Adding device 0000:00:18.0 to group 5
[ 0.147325] iommu: Adding device 0000:00:18.1 to group 5
[ 0.147345] iommu: Adding device 0000:00:18.2 to group 5
[ 0.147366] iommu: Adding device 0000:00:18.3 to group 5
[ 0.147394] iommu: Adding device 0000:00:18.4 to group 5
[ 0.147414] iommu: Adding device 0000:00:18.5 to group 5
[ 0.147435] iommu: Adding device 0000:00:18.6 to group 5
[ 0.147455] iommu: Adding device 0000:00:18.7 to group 5
[ 0.147658] iommu: Adding device 0000:15:00.0 to group 6
[ 0.147692] iommu: Adding device 0000:15:00.1 to group 6
[ 0.147734] iommu: Adding device 0000:15:00.2 to group 6
[ 0.147775] iommu: Adding device 0000:16:00.0 to group 6
[ 0.147833] iommu: Adding device 0000:16:01.0 to group 6
[ 0.147855] iommu: Adding device 0000:16:04.0 to group 6
[ 0.147887] iommu: Adding device 0000:18:00.0 to group 6
[ 0.148157] iommu: Adding device 0000:38:00.0 to group 7
[ 0.148234] iommu: Using direct mapping for device 0000:38:00.0
[ 0.148332] iommu: Adding device 0000:38:00.1 to group 8
[ 0.148373] iommu: Adding device 0000:38:00.2 to group 8
[ 0.148412] iommu: Adding device 0000:38:00.3 to group 8
[ 0.148452] iommu: Adding device 0000:38:00.4 to group 8
[ 0.148491] iommu: Adding device 0000:38:00.6 to group 8
[ 0.148514] iommu: Adding device 0000:39:00.0 to group 2
[ 0.148759] AMD-Vi: Found IOMMU at 0000:00:00.2 cap 0x40
[ 0.148759] AMD-Vi: Extended features (0x4f77ef22294ada):
[ 0.148760] PPR NX GT IA GA PC GA_vAPIC
[ 0.148762] AMD-Vi: Interrupt remapping enabled
[ 0.148762] AMD-Vi: virtual APIC enabled
[ 0.186463] AMD-Vi: Lazy IO/TLB flushing enabled
[ 0.187307] initcall pci_iommu_init+0x0/0x3f returned 0 after 40631 usecs
[…]
```
It’d be great if the time could be decreased to a few milliseconds, so
that the system can start almost instantly (LUKS passphrase for example).
Kind regards,
Paul
PS: Output of `lspci -nn`.
```
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15d0]
00:00.2 IOMMU [0806]: Advanced Micro Devices, Inc. [AMD] Device [1022:15d1]
00:01.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]
00:01.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:15d3]
00:08.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) PCIe Dummy Host Bridge [1022:1452]
00:08.1 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:15db]
00:08.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:15dc]
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:790b] (rev 61)
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:790e] (rev 51)
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15e8]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15e9]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15ea]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15eb]
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15ec]
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15ed]
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15ee]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:15ef]
15:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset USB 3.1 xHCI Controller [1022:43bb] (rev 02)
15:00.1 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset SATA Controller [1022:43b7] (rev 02)
15:00.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Device [1022:43b2] (rev 02)
16:00.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)
16:01.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)
16:04.0 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port [1022:43b4] (rev 02)
18:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)
38:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15dd] (rev c8)
38:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Device [1002:15de]
38:00.2 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:15df]
38:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15e0]
38:00.4 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Device [1022:15e1]
38:00.6 Audio device [0403]: Advanced Micro Devices, Inc. [AMD] Device [1022:15e3]
39:00.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] [1022:7901] (rev 61)
```
View attachment "20180717–linux_4.18-rc5+–dmesg.txt" of type "text/plain" (148156 bytes)
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5174 bytes)
Powered by blists - more mailing lists