Skip to content

[codex] raise Treeland service resource priority - #977

Merged
zccrs merged 1 commit into
linuxdeepin:masterfrom
deepin-wm:codex/highest-service-priority-v2
Jun 15, 2026
Merged

[codex] raise Treeland service resource priority#977
zccrs merged 1 commit into
linuxdeepin:masterfrom
deepin-wm:codex/highest-service-priority-v2

Conversation

@deepin-wm

@deepin-wm deepin-wm commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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:

  • Add Environment=SEATD_SOCK=/run/dde-seatd.sock to own the seatd socket configuration
  • Change OOMScoreAdjust=-300 to OOMScoreAdjust=-1000 (maximum protection)
  • Change Nice=-15 to Nice=-20 (highest nice priority)
  • Add CPUWeight=10000 (high CPU weight)
  • Add CPUSchedulingPolicy=rr (round-robin realtime scheduling)
  • Add CPUSchedulingPriority=20 (realtime priority level)
  • Add IOWeight=10000 (high I/O weight)
  • Add IOSchedulingClass=realtime (realtime I/O scheduling)
  • Add 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 priority and own seatd socket configuration for DDM mode.

Enhancements:

  • Raise Treeland service CPU, I/O, and OOM protection priorities to their highest normal levels.
  • Configure Treeland service to own the dde-seatd socket environment via SEATD_SOCK.

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 服务的性能表现,确保系统流畅运行
@deepin-wm

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA.

@sourcery-ai

sourcery-ai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts Treeland's systemd unit to run with maximum normal CPU/I/O priority and strongest OOM protection, while centralizing seatd socket environment configuration into the service.

File-Level Changes

Change Details Files
Raise Treeland systemd service CPU, I/O, and OOM priorities to maximum levels within normal/realtime bounds.
  • Increase OOM protection by changing OOMScoreAdjust from -300 to -1000.
  • Increase process scheduling priority by changing Nice from -15 to -20.
  • Assign maximum CPU weight with CPUWeight=10000.
  • Enable realtime CPU scheduling with CPUSchedulingPolicy=rr and CPUSchedulingPriority=20.
  • Assign maximum I/O weight with IOWeight=10000.
  • Enable realtime I/O scheduling with IOSchedulingClass=realtime and IOSchedulingPriority=0.
misc/systemd/treeland.service.in
Centralize seatd socket configuration into the Treeland systemd service.
  • Add Environment=SEATD_SOCK=/run/dde-seatd.sock to own the seatd socket configuration within treeland.service.
misc/systemd/treeland.service.in

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Raising Treeland to full realtime CPU/IO scheduling with Nice=-20, CPUSchedulingPolicy=rr, and IOSchedulingClass=realtime plus OOMScoreAdjust=-1000 risks starving other services and making the system hard to recover under load; consider whether a high non-realtime scheduling class or more moderate weights would achieve the goal with less impact.
  • CPUSchedulingPolicy=rr and CPUSchedulingPriority=20 require CAP_SYS_NICE and may fail or be ignored on some deployments; it would be good to confirm how this behaves on systems without those capabilities and whether you need a fallback configuration.
  • Moving SEATD_SOCK into treeland.service’s Environment ties seatd socket configuration directly to this unit; consider whether this should instead live in a shared environment (e.g., EnvironmentFile or seatd-related unit) so that other consumers of dde-seatd.sock don’t diverge in their configuration.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Raising Treeland to full realtime CPU/IO scheduling with Nice=-20, CPUSchedulingPolicy=rr, and IOSchedulingClass=realtime plus OOMScoreAdjust=-1000 risks starving other services and making the system hard to recover under load; consider whether a high non-realtime scheduling class or more moderate weights would achieve the goal with less impact.
- CPUSchedulingPolicy=rr and CPUSchedulingPriority=20 require CAP_SYS_NICE and may fail or be ignored on some deployments; it would be good to confirm how this behaves on systems without those capabilities and whether you need a fallback configuration.
- Moving SEATD_SOCK into treeland.service’s Environment ties seatd socket configuration directly to this unit; consider whether this should instead live in a shared environment (e.g., EnvironmentFile or seatd-related unit) so that other consumers of dde-seatd.sock don’t diverge in their configuration.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-bot

deepin-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

TAG Bot

New tag: 0.8.9
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #980

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm, zccrs

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zccrs
zccrs merged commit 24e6c2b into linuxdeepin:master Jun 15, 2026
9 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.

3 participants