qos: process-classified I/O priority and rate limiting

Adds a QoS engine that attributes each read/write to the calling
process, matches it against a ruleset, and applies that class's ioprio
and nice value to the worker thread for the duration of the request.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Grioghar 2026-09-09 16:34:55 -05:00
parent 515b0549ef
commit 34e57dbb8a
13 changed files with 1537 additions and 0 deletions

View file

@ -117,6 +117,7 @@ Config::Config()
process_thread_count(fuse_cfg.process_thread_count),
process_thread_queue_depth(fuse_cfg.process_thread_queue_depth),
proxy_ioprio(false),
qos(false),
read_thread_count(fuse_cfg.read_thread_count),
readahead(0),
readdir("seq"),
@ -281,6 +282,12 @@ Config::Config()
_map["readahead"] = &readahead;
_map["remember"] = &_remember;
_map["remember-nodes"] = &_remember_nodes;
_map["qos"] = &qos;
_map["qos.max-sleep-ms"] = &qos_max_sleep_ms;
_map["qos.max-sleepers"] = &qos_max_sleepers;
_map["qos.rules"] = &qos_rules;
_map["qos.ruleset"] = &qos_ruleset;
_map["qos.stats"] = &qos_stats;
_map["rename-exdev"] = &rename_exdev;
_map["scheduling-priority"] = &scheduling_priority;
_map["security-capability"] = &security_capability;