]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge patch series "writeback: Avoid lockups when switching inodes"
authorChristian Brauner <brauner@kernel.org>
Mon, 15 Sep 2025 12:50:03 +0000 (14:50 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 11:11:06 +0000 (13:11 +0200)
Jan Kara <jack@suse.cz> says:

This patch series addresses lockups reported by users when systemd unit reading
lots of files from a filesystem mounted with lazytime mount option exits. See
patch 3 for more details about the reproducer.

There are two main issues why switching many inodes between wbs:

1) Multiple workers will be spawned to do the switching but they all contend
on the same wb->list_lock making all the parallelism pointless and just
wasting time.

2) Sorting of wb->b_dirty list by dirtied_time_when is inherently slow.

Patches 1-3 address these problems, patch 4 adds a tracepoint for better
observability of inode writeback switching.

* patches from https://lore.kernel.org/20250912103522.2935-1-jack@suse.cz:
  writeback: Add tracepoint to track pending inode switches
  writeback: Avoid excessively long inode switching times
  writeback: Avoid softlockup when switching many inodes
  writeback: Avoid contention on wb->list_lock when switching inodes

Signed-off-by: Christian Brauner <brauner@kernel.org>

Trivial merge