Skip to contentSkip to conversation

ext4: fsync waits for journal credits behind throttled writeback

DISCUSSION Tianyi Chen 1 participant 1 message Dec 1

lore
Share & tools
lore
#0 lore raw

Hi Ted, Jan,

An uncapped writer's fsync slowed down when it shared an ext4 filesystem with a write-limited group (io.max wbps=16 MiB/s). On unmodified f47d223627f8 in one KVM boot, the uncapped writer's fsync p95 was 222 ms on the shared filesystem and 3.8 ms with separate filesystems on the same disk. The other group's cap was unchanged.

With the default dioread_nolock, I saw 28 add_transaction_credits() waits of at least 10 ms on the shared filesystem (12.2 s total), and none with separate filesystems. In all 28, the task that woke the writer was a kworker just seen entering jbd2_journal_start_reserved(). This test did not identify the particular reservation or bio.

In a separate run on a modified kernel I could follow the flusher's reservation until the conversion worker returned the credits. Is it expected that a group's pending writeback can tie up journal credits long enough to delay an unrelated writer on the same filesystem?

Thanks,
Tianyi