Skip to content

feat!: 支持设置进程的 I/O 优先级与内存优先级 - #80

Merged
Ray-lea merged 22 commits into
Ray-lea:mainfrom
digital-bombyx:feat/io-memory-priority
Nov 17, 2026
Merged

Ray-lea merged 22 commits into
Ray-lea:mainfrom
digital-bombyx:feat/io-memory-priority

Conversation

@digital-bombyx

@digital-bombyx digital-bombyx commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

进程右键菜单新增 I/O 优先级(非常低、低、正常)与内存优先级(五档)子菜单,应用组作用于全部成员,各成员一致时勾选当前级别;进程表新增两个默认隐藏的可选列,按级别排序,详情面板在“优先级”之后同步显示。设置前校验进程身份,高与关键 I/O 优先级由 Windows 保留,不可设置;当前取值随采样以已缓存的查询句柄读取,不增加额外查询。

BREAKING CHANGE: 特权服务 IPC 协议从 11 升至 12,已有服务需要更新。

改动内容 / Changes

Adds I/O priority and memory priority, the next part of #49 after suspend/resume.

  • Context menu: "I/O priority" (Very low / Low / Normal) and "Memory priority" (the five Windows levels) after "Set priority". App groups apply to every member; the current level is checked when all members agree.
  • High and Critical I/O are reserved by Windows: the menu doesn't offer them, and both the service and core refuse them. They still show in the column when Windows uses them.
  • Two optional columns ("I/O priority" under Disk and I/O, "Memory priority" under Memory), hidden by default and sorted by level; two rows in the details panel after "Priority".
  • Current values are read during sampling with the cached query handle, next to efficiency mode. One-off measurement, not a budget: about 60 µs for 98 openable processes (release build, Ryzen 5 6600H, not elevated).
  • Privileged service: new IoPriority / MemoryPriority operations with the same PID/start-time and self/client guards as terminate and suspend. Protocol 11 → 12. The consent text lists the new operations in all 8 locales.
  • scripts/native-dispatch.mjs now imports the two new argument types.
  • Like the other per-process query columns, the values show as "—" for processes Argus can't open with its own rights (most service hosts when not running as administrator); the privileged service still sets them from the menu.

CPU affinity / CPU sets are left for a separate PR.

Refs #49

检查清单 / Checklist

  • 拉取请求标题与各个提交信息符合 Conventional Commits(<type>(<scope>): <描述>)/ The title and commit messages follow Conventional Commits
  • start.bat check 通过 / start.bat check passes — run as its parts (local Node is older than the pinned engine): i18n, cargo fmt, clippy -D warnings and Biome pass; all tests pass except 3 argus-service install-lock tests (admin, cleanup, driver) that fail the same way on a clean main on this machine
  • 行为变化已同步到 docs/ 中对应的页面 / Behavior changes are reflected in docs/
  • 文案已写入 locales/ 的中文与英文目录 / New text is in both the Chinese and English catalogs under locales/ (all 8 locales)
  • 界面改动附有截图,并按性能基线测量了开销 / UI changes include screenshots and a measurement against the performance baseline — screenshots attached; read cost measured as above, no full baseline run
I/O priority Memory priority
ioio mem
sortmem sortio

BREAKING CHANGE: New daily history files use version 3 to retain process creation times. Version 2 files remain readable and continue in their original format for the current day. Older builds cannot read version 3 recordings. Back up history before downgrading.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T04:31:54.365252Z f550617 New commits
🔒 Security Review ❌ Failed 2026-11-17T04:23:32.486496Z
We couldn’t complete this review. Comment @codex security review to try again.
f550617 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0df39e5a7b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src-gpui/src/frontend/columns.rs Resolved
Comment thread src-gpui/src/frontend/columns.rs Resolved

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 36de7d8d1f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread docs/architecture/core.md Resolved
Comment thread locales/zh-CN/actions.json Resolved
hayxe1 and others added 6 commits November 12, 2026 22:46
进程右键菜单在“设置优先级”之后新增“I/O 优先级”(非常低、低、正常)与“内存优先级”(非常低、低、中、低于正常、正常)两个子菜单,按应用分组时作用于组内全部进程,当前取值在各成员一致时打勾。高与关键两档 I/O 优先级由 Windows 保留,界面不提供,服务与核心也拒绝设置。

当前取值随采样用已缓存的查询句柄读取,两项合计每进程约 0.6 µs。设置前校验 PID 与启动时间;权限不足时交给特权服务执行,服务新增 IoPriority 与 MemoryPriority 两项操作,校验规则与结束、暂停相同。特权服务的授权说明同步列出这两项。

BREAKING CHANGE: 特权服务协议升级到第 12 版,旧服务需要在“设置 → 权限”中更新。

Refs Ray-lea#49
“选择列”新增“I/O 优先级”(磁盘与 I/O 分类)与“内存优先级”(内存分类)两列,默认隐藏,按级别而非名称排序;应用分组行仅在成员一致时显示。详情面板在“优先级”之后列出这两项。取值来自采样时已读取的数据,不增加查询。

Windows 保留的“高”“关键”两档 I/O 优先级只用于显示。
设置 I/O 或内存优先级失败时,原因改用这两项操作自己的说明(无权限、服务版本不兼容、无法更改、进程已退出),不再沿用结束进程的提示;整句由各语言的文案组成,标点随界面语言。

两列优先级与 CPU 数据一同采样,计数查询超时、沿用上次读数时同样提示“正在更新”;悬停提示显示本地化的级别名称,而非内部标识。
简体与繁体中文的 I/O 优先级、内存优先级无权限提示此前沿用暂停的说法(“无法暂停或恢复”),改为对应的优先级操作。架构文档与代码注释中未注明测量条件的单次读取耗时一并删除。
子进程的 I/O 与内存优先级继承自运行测试的进程,CI 运行器以低 I/O 优先级启动它,测试因此在初始断言处失败。现在只要求初始级别可读,各级别的设置与读回不变。
@digital-bombyx
digital-bombyx force-pushed the feat/io-memory-priority branch from dea8748 to 39cbe7b Compare November 14, 2026 17:56
@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector

Copy link
Copy Markdown

The account paying for this security review has reached its Codex usage limits. The payer can check the Codex usage dashboard. For personal accounts, using credits requires enabling “Use credits for security reviews” in Code review settings. If you do not manage the paying account, contact this repository's admins.

@Ray-lea
Ray-lea merged commit e1b76fd into Ray-lea:main Nov 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f550617fd8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +86 to +90
IoPriority {
pid: u32,
create_time: i64,
priority: IoPriority,
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Bump the protocol version for the new service operations

If an unelevated host connects to a service built from the base revision, both new setters fail even for locally writable targets. The base already advertises protocol 12 (crates/argus-service/src/lib.rs:50), but cannot deserialize these variants, so it closes the pipe. The probe in pipe::request_with_timeout then receives a matching v12 Pong and preserves the broken-pipe error instead of returning INCOMPATIBLE; consequently, commands::privileged never takes its local fallback or reports ServiceOutdated. Assign this extension a new protocol version and cover a base-v12 service in the compatibility test, which currently assumes the old service is PROTOCOL - 1.

Useful? React with 👍 / 👎.

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