Skip to content

Conversation

@ikatson
Copy link
Owner

@ikatson ikatson commented Jan 2, 2026

mmap was causing random stalls on my slow disk.
this happens when a piece is completed and bitv is updated to indicate that. The OS may decide
to flush bitv at this time (not at the time we ask), which blocks the hot path.

As this happens during TorrentStateLive is locked, other tasks are also blocked by the lock and thus the whole
runtime is stalled.

mmap was causing random stalls on my slow disk.
this happens when a piece is completed and bitv is updated to indicate that. The OS may decide
to flush bitv at this time (not at the time we ask), which blocks the hot path.

As this happens during TorrentStateLive is locked, other tasks are also blocked by the lock and thus the whole
runtime is stalled.
@ikatson ikatson merged commit bda60da into main Jan 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants