-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-130090 / add backpressure mechanism io_uring (#406)
In some edge cases where storage backend can't keep up with client writes, io_uring / samba will allow queueing up writes beyond what is reasonable leading to OOM errors in some extreme edge cases. This commit keeps a counter of outstanding write requests per-TCON and switches to pwrite(2) once the queue depth limit is reached. This effectively applies backpressure to client and prevents excessive memory consumption. A total count of synchronous writes performed is logged when TCON is disconnected if log level for the VFS module is sufficiently high (3 or higher). To facilate easier inspection of io_uring behavior, a custom debug class for the module has been added.
- Loading branch information
Showing
1 changed file
with
109 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters