[codex] raise Treeland service resource priority#976
Closed
deepin-wm wants to merge 2 commits into
Closed
Conversation
Raise Treeland DDM-mode systemd service to highest normal CPU, I/O, and OOM-protection priorities. Move dde-seatd socket environment ownership to treeland.service.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the Treeland systemd unit to run with maximum normal CPU, I/O, and OOM protection priorities, and moves ownership of the dde-seatd socket environment into treeland.service itself. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider whether using realtime CPU and I/O scheduling (CPUSchedulingPolicy=rr, CPUSchedulingPriority=20, IOSchedulingClass=realtime) is strictly necessary, as this can starve other system services; if it is, it may be safer to gate these settings behind a separate unit or drop-in so distributions can opt-in.
- Hardcoding SEATD_SOCK to /run/dde-seatd.sock in the main service unit may make it harder for downstreams with different seatd setups; consider making this path configurable via a drop-in or using a more generic environment reference.
- With both Nice=-20 and CPUWeight=10000 set, the intent for CPU prioritization may not be obvious to future maintainers; adding a brief comment in the unit file explaining why both mechanisms are used and how they’re expected to interact could clarify the design.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider whether using realtime CPU and I/O scheduling (CPUSchedulingPolicy=rr, CPUSchedulingPriority=20, IOSchedulingClass=realtime) is strictly necessary, as this can starve other system services; if it is, it may be safer to gate these settings behind a separate unit or drop-in so distributions can opt-in.
- Hardcoding SEATD_SOCK to /run/dde-seatd.sock in the main service unit may make it harder for downstreams with different seatd setups; consider making this path configurable via a drop-in or using a more generic environment reference.
- With both Nice=-20 and CPUWeight=10000 set, the intent for CPU prioritization may not be obvious to future maintainers; adding a brief comment in the unit file explaining why both mechanisms are used and how they’re expected to interact could clarify the design.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA. |
Raise Treeland DDM-mode systemd service to highest normal CPU, I/O, and OOM-protection priorities. Move dde-seatd socket environment ownership to treeland.service. Log: 提升 Treeland 服务资源优先级到最高普通优先级 Influence: 提升 Treeland 服务的性能表现,确保系统流畅运行
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raise Treeland DDM-mode systemd service to highest normal CPU, I/O, and OOM-protection priorities. Move dde-seatd socket environment ownership to treeland.service.
Changes:
Environment=SEATD_SOCK=/run/dde-seatd.sockto own the seatd socket configurationOOMScoreAdjust=-300toOOMScoreAdjust=-1000(maximum protection)Nice=-15toNice=-20(highest nice priority)CPUWeight=10000(high CPU weight)CPUSchedulingPolicy=rr(round-robin realtime scheduling)CPUSchedulingPriority=20(realtime priority level)IOWeight=10000(high I/O weight)IOSchedulingClass=realtime(realtime I/O scheduling)IOSchedulingPriority=0(highest I/O priority)This PR replaces closed PR #932 which was targeting the old/master branch.
Summary by Sourcery
Increase Treeland systemd service runtime priority and assume ownership of seatd socket configuration.
Enhancements: