Skip to content

Conversation

@fly602
Copy link
Contributor

@fly602 fly602 commented Sep 24, 2025

  1. Removed the entire swap scheduler module including:
    • Main implementation files (swapsched.go)
    • Auto-generated DBus methods file
    • Systemd service configuration
    • DBus configuration files
    • Test references
    • Build system references
  2. Cleaned up related systemd service configurations
  3. Updated RPM spec file to remove swap scheduler references

The swap scheduler functionality appears to be deprecated or no longer needed. This change:

  1. Simplifies the codebase by removing unused components
  2. Reduces maintenance overhead
  3. Removes potential security surface area
  4. Follows up on previous deprecation steps (note the /bin/false in service file)

Influence:

  1. Verify system boots correctly without swap scheduler
  2. Check no swap scheduler related processes are running
  3. Confirm no swap scheduler DBus interfaces are registered
  4. Test system resource management continues to work normally
  5. Verify no regression in session management functionality

refactor: 移除交换调度器模块

  1. 移除了整个交换调度器模块,包括:
    • 主实现文件 (swapsched.go)
    • 自动生成的DBus方法文件
    • Systemd服务配置
    • DBus配置文件
    • 测试引用
    • 构建系统引用
  2. 清理了相关的systemd服务配置
  3. 更新了RPM spec文件以移除交换调度器引用

交换调度器功能似乎已被弃用或不再需要。此变更:

  1. 通过移除未使用的组件简化代码库
  2. 减少维护开销
  3. 移除潜在的安全攻击面
  4. 跟进之前的弃用步骤(注意服务文件中的/bin/false)

Influence:

  1. 验证系统在没有交换调度器的情况下能正常启动
  2. 检查没有交换调度器相关进程在运行
  3. 确认没有交换调度器DBus接口被注册
  4. 测试系统资源管理功能继续正常工作
  5. 验证会话管理功能没有回归

Summary by Sourcery

Remove the deprecated swap scheduler module and clean up all related references across the codebase, build and configuration files.

Enhancements:

  • Remove the entire swap scheduler module, including implementation, DBus methods and configuration files

Build:

  • Eliminate swapsched references from the Makefile and RPM spec

Deployment:

  • Clean up systemd service definitions and DBus configs for the swap scheduler

Tests:

  • Remove any test references to the swap scheduler

1. Removed the entire swap scheduler module including:
   - Main implementation files (swapsched.go)
   - Auto-generated DBus methods file
   - Systemd service configuration
   - DBus configuration files
   - Test references
   - Build system references
2. Cleaned up related systemd service configurations
3. Updated RPM spec file to remove swap scheduler references

The swap scheduler functionality appears to be deprecated or no longer
needed. This change:
1. Simplifies the codebase by removing unused components
2. Reduces maintenance overhead
3. Removes potential security surface area
4. Follows up on previous deprecation steps (note the /bin/false in
service file)

Influence:
1. Verify system boots correctly without swap scheduler
2. Check no swap scheduler related processes are running
3. Confirm no swap scheduler DBus interfaces are registered
4. Test system resource management continues to work normally
5. Verify no regression in session management functionality

refactor: 移除交换调度器模块

1. 移除了整个交换调度器模块,包括:
   - 主实现文件 (swapsched.go)
   - 自动生成的DBus方法文件
   - Systemd服务配置
   - DBus配置文件
   - 测试引用
   - 构建系统引用
2. 清理了相关的systemd服务配置
3. 更新了RPM spec文件以移除交换调度器引用

交换调度器功能似乎已被弃用或不再需要。此变更:
1. 通过移除未使用的组件简化代码库
2. 减少维护开销
3. 移除潜在的安全攻击面
4. 跟进之前的弃用步骤(注意服务文件中的/bin/false)

Influence:
1. 验证系统在没有交换调度器的情况下能正常启动
2. 检查没有交换调度器相关进程在运行
3. 确认没有交换调度器DBus接口被注册
4. 测试系统资源管理功能继续正常工作
5. 验证会话管理功能没有回归
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: fly602

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

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

@deepin-ci-robot
Copy link

deepin pr auto review

根据提供的git diff,我看到这是一个移除swap调度相关功能的变更。我来分析一下这个变更:

  1. 主要变更内容:
  • 从Makefile中移除了swapsched1相关的测试
  • 从主程序中移除了swapsched1的导入
  • 删除了SwapSchedHelper1的D-Bus配置文件
  • 删除了systemd服务文件
  • 从systemd服务配置中移除了cgroup相关配置
  • 从spec文件中移除了SwapSchedHelper1服务
  • 完全删除了swapsched1包及其实现文件
  1. 代码质量分析:
  • 原swapsched1模块的实现结构完整,包含了Daemon、Helper等核心组件
  • 实现了D-Bus接口,支持会话管理
  • 使用了cgroup进行资源控制
  1. 潜在问题:
  • 移除cgroup配置可能会影响其他需要cgroup功能的模块
  • 没有看到替代方案,直接删除功能可能会影响系统性能管理
  1. 改进建议:
  • 在移除功能前,应该确认是否有替代方案实现相同功能
  • 建议保留cgroup配置,因为其他模块可能仍然需要
  • 如果确定要移除,应该在代码中添加注释说明移除原因
  • 考虑添加日志记录,以便追踪移除功能后的系统表现
  1. 安全性考虑:
  • 移除cgroup控制可能会影响系统资源隔离的安全性
  • 建议确保有其他机制来保证系统资源的安全隔离

总体来看,这个变更移除了swap调度相关的整个功能模块,这是一个较大的架构变更。建议:

  1. 确认是否有替代方案
  2. 评估对系统性能管理的影响
  3. 考虑分阶段移除,先废弃一段时间后再完全删除
  4. 在移除前充分测试,确保不会影响系统稳定性

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


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.

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 24, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR refactors the codebase by removing the deprecated swap scheduler module and all its associated source, configuration, service definitions, and build references to simplify maintenance and reduce the security surface.

Entity relationship diagram for DBus service configuration after swap scheduler removal

erDiagram
"org.deepin.dde.Power1.service" ||--|| "deepin-accounts-daemon.service" : uses
"org.deepin.dde.Gesture1.service" ||--|| "deepin-accounts-daemon.service" : uses
"org.deepin.dde.Timedated1.service" ||--|| "deepin-accounts-daemon.service" : uses
%% org.deepin.dde.SwapSchedHelper1.service has been removed.
Loading

File-Level Changes

Change Details Files
Remove swap scheduler module code
  • Delete core implementation file
  • Delete auto-generated DBus methods
  • Remove the module directory
system/swapsched1/exported_methods_auto.go
system/swapsched1/swapsched.go
Delete swap scheduler DBus config and service
  • Remove D-Bus interface configuration
  • Remove systemd service unit
misc/conf/org.deepin.dde.SwapSchedHelper1.conf
misc/system-services/org.deepin.dde.SwapSchedHelper1.service
Clean up build and packaging references
  • Remove swapsched1 from Makefile test targets
  • Remove swapsched1 import in daemon main.go
  • Update RPM spec to drop SwapSchedHelper service
Makefile
bin/dde-system-daemon/main.go
rpm/dde-daemon.spec

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

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Sep 25, 2025

TAG Bot

New tag: 6.1.57
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #920

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 10, 2025

TAG Bot

New tag: 6.1.58
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #924

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 16, 2025

TAG Bot

New tag: 6.1.59
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #934

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 30, 2025

TAG Bot

New tag: 6.1.62
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #951

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.

2 participants