Linux Fixes Issue Where Applying AMD Zen1/Zen2 Microcode Updates Could Slow Boot Times
([AMD] 6 Hours Ago
Microcode Patch Issue)
- Reference: 0001509364
- News link: https://www.phoronix.com/news/Linux-Zen1-Zen2-Slow-Boot-ucode
- Source link:
Submitted today for the Linux kernel ahead of the Linux 6.13-rc1 release as part of the "x86/urgent" material is a fix for aging Zen 1 and Zen 2 processors where for the past year and a half they could potentially find very slow boot times.
Last month a Nokia engineer [1]reported varying delays in the Linux boot process on more than ten older AMD EPYC servers. On affected systems, the initramfs would take unexpectedly long to unpack. The impact could be quite extreme:
"Most boots see no impact, on some boots the time is increased by a few to tens of seconds, and in extreme cases even by several minutes (!)."
This slowdown of boot times by tens of seconds or several minutes was bisected to a Linux kernel change made in June 2023 around the CPU microcode update handling.
The issue was ultimately tracked down to a problem with aging AMD Zen 1 and Zen 2 processors. Those processors require that the patch buffer mapping be flushed from the TLB after applying the CPU microcode update at boot time. So the Linux kernel behavior on AMD CPU microcode updating has been updated for those aging Ryzen/EPYC systems to flush the patch buffer in order to avoid these "unncesessary and unnatural delays happen in the boot process."
That AMD CPU microcode updating fix was submitted this morning as part of the [2]x86/urgent pull ahead of the Linux 6.13-rc1 kernel expected later today. In turn this fix should also get back-ported to existing stable kernel series too.
[1] https://lore.kernel.org/all/ZyulbYuvrkshfsd2@antipodes/
[2] https://lore.kernel.org/lkml/20241201104921.GAZ0w_Mev3hhUdkHHr@fat_crate.local/
Last month a Nokia engineer [1]reported varying delays in the Linux boot process on more than ten older AMD EPYC servers. On affected systems, the initramfs would take unexpectedly long to unpack. The impact could be quite extreme:
"Most boots see no impact, on some boots the time is increased by a few to tens of seconds, and in extreme cases even by several minutes (!)."
This slowdown of boot times by tens of seconds or several minutes was bisected to a Linux kernel change made in June 2023 around the CPU microcode update handling.
The issue was ultimately tracked down to a problem with aging AMD Zen 1 and Zen 2 processors. Those processors require that the patch buffer mapping be flushed from the TLB after applying the CPU microcode update at boot time. So the Linux kernel behavior on AMD CPU microcode updating has been updated for those aging Ryzen/EPYC systems to flush the patch buffer in order to avoid these "unncesessary and unnatural delays happen in the boot process."
That AMD CPU microcode updating fix was submitted this morning as part of the [2]x86/urgent pull ahead of the Linux 6.13-rc1 kernel expected later today. In turn this fix should also get back-ported to existing stable kernel series too.
[1] https://lore.kernel.org/all/ZyulbYuvrkshfsd2@antipodes/
[2] https://lore.kernel.org/lkml/20241201104921.GAZ0w_Mev3hhUdkHHr@fat_crate.local/
Kjell