All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] writeback: Avoid lockups when switching inodes
@ 2025-09-12 10:38 Jan Kara
  2025-09-12 10:38 ` [PATCH v2 1/4] writeback: Avoid contention on wb->list_lock " Jan Kara
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Jan Kara @ 2025-09-12 10:38 UTC (permalink / raw)
  To: Christian Brauner; +Cc: linux-fsdevel, Tejun Heo, Jan Kara

Hello!

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.

Changes since v1:
* Added Acked-by's from Tejun
* Modified patch 1 to directly insert isw items into a list of switches to
  make instead of queueing rcu_work for that. This actually speeded up
  large scale switching about 2x.

								Honza

Previous versions:
Link: http://lore.kernel.org/r/20250909143734.30801-1-jack@suse.cz # v1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-09-19 11:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-12 10:38 [PATCH v2 0/4] writeback: Avoid lockups when switching inodes Jan Kara
2025-09-12 10:38 ` [PATCH v2 1/4] writeback: Avoid contention on wb->list_lock " Jan Kara
2025-09-12 16:15   ` Tejun Heo
2025-09-12 16:39     ` Jan Kara
2025-09-12 16:52       ` Tejun Heo
2025-09-12 16:20   ` Tejun Heo
2025-09-12 10:38 ` [PATCH v2 2/4] writeback: Avoid softlockup when switching many inodes Jan Kara
2025-09-12 10:38 ` [PATCH v2 3/4] writeback: Avoid excessively long inode switching times Jan Kara
2025-09-12 10:38 ` [PATCH v2 4/4] writeback: Add tracepoint to track pending inode switches Jan Kara
2025-09-15 12:50 ` [PATCH v2 0/4] writeback: Avoid lockups when switching inodes Christian Brauner
2025-09-15 15:13   ` Jan Kara
2025-09-19 11:09     ` Christian Brauner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.