mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #334] [MERGED] perf(setup): default ublk block devices to the none I/O scheduler #356
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/334
Author: @odysseusy
Created: 10/1/2026
Status: ✅ Merged
Merged: 10/1/2026
Merged by: @yingdi-shan
Base:
main← Head:perf/ublk-scheduler-none📝 Commits (1)
ad135f9perf(setup): default ublk block devices to the none I/O scheduler📊 Changes
3 files changed (+4 additions, -2 deletions)
View changed files
📝
docs/src/internals/sandbox-testing.md(+1 -1)📝
scripts/tests/setup-ublk-access.sh(+1 -0)📝
src/setup/ublk.rs(+2 -1)📄 Description
What
Set
queue/schedulertononefor every new/dev/ublkb*device. The change adds one line to the udev rule thatserver --setup-hostinstalls (/etc/udev/rules.d/99-agentenv-ublk.rules), mirrors it inscripts/tests/setup-ublk-access.sh, and documents it indocs/src/internals/sandbox-testing.md.Why
Single-queue ublk devices get
mq-deadlineby default. For a userspace target, the elevator only adds locking and dispatch cost. On Linux 7.2 and later it also sends every direct I/O through kblockd. Measurements and background are in the issue.Related issue
Closes #333
Scope and non-goals
Only the scheduler of ublk block devices changes. Other queue attributes and non-ublk devices are untouched.
Design and behavior changes
The daemon runs as an unprivileged user and can't write sysfs, so the setting lives in the udev rule that already grants device access. udev applies the attribute in the same event that sets the node's group. A daemon without CAP_DAC_OVERRIDE can't open the node before that event, so
wait_for_ublk_dev()returns after the scheduler is alreadynone.Compatibility and operations
mq-deadlinetonone. Operators can override it with a later-ordered udev rule.server --setup-hostreinstalls the rule. Rolling back is removing the line.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
Skipped checks and reasons: the
maketargets cover the whole workspace including Go services; I ran the cargo equivalents scoped to the changed crate above.make test-unitand integration tests need a full host setup with Firecracker and KVM, and the change has no Rust logic beyond a string constant.Risks and reviewer notes
If the daemon runs as root, it can open the node before udev has processed it, and the switch to
nonelands a few milliseconds later. That's harmless, because the kernel freezes the queue during the switch.Checklist
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.