Hasty Briefsbeta

Bilingual

Linux 6.18 Will Fix Lockups When Systemd Units Read Lots of Files

7 months ago
  • #systemd
  • #Linux
  • #kernel
  • Linux 6.18 will fix lockups caused by systemd units reading many files with the 'lazytime' mount option.
  • The issue occurs when dirty inodes accumulate to 'hundreds of thousands or millions' during cgroup exit, causing hours of 100% CPU usage.
  • Microsoft engineer Christian Brauner submitted 12 pull requests, including one addressing this writeback code problem.
  • The 'lazytime' option delays on-disk timestamp updates for performance, but triggers excessive inode switching during cgroup exits.
  • The fix involves optimizing the inode switching logic, which currently has quadratic time complexity.
  • A sample script is provided to reproduce the issue on current Linux kernels.
  • The solution will be included in the Linux 6.18 merge window.