Skip to content

feat(process): 新增进程资源限制(rlimit)管理功能及相关系统调用#1300

Merged
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:feat-impl-rlimit
Sep 27, 2025
Merged

feat(process): 新增进程资源限制(rlimit)管理功能及相关系统调用#1300
fslongjin merged 1 commit intoDragonOS-Community:masterfrom
fslongjin:feat-impl-rlimit

Conversation

@fslongjin
Copy link
Member

@fslongjin fslongjin commented Sep 26, 2025

  • 为ProcessControlBlock添加rlimits字段,存储进程资源限制,默认初始化典型值(如nofile软限制1024、硬限制65536)
  • 实现进程rlimit的获取、设置及继承机制(inherit_rlimits_from)
  • 在dup2、fcntl等函数中添加RLIMIT_NOFILE检查,确保文件描述符不超过软限制
  • 实现sys_prlimit64和sys_setrlimit系统调用,支持查询和设置进程资源限制
  • 调整测试用例,添加dup_test到gvisor白名单,忽略未支持的测试

@fslongjin fslongjin requested a review from sparkzky September 26, 2025 06:44
@github-actions github-actions bot added the enhancement New feature or request label Sep 26, 2025
cursor[bot]

This comment was marked as outdated.

@fslongjin fslongjin force-pushed the feat-impl-rlimit branch 2 times, most recently from 6a20f9a to b67a1ee Compare September 26, 2025 08:39
cursor[bot]

This comment was marked as outdated.

-
为ProcessControlBlock添加rlimits字段,存储进程资源限制,默认初始化典型值(如nofi
le软限制1024、硬限制65536)
- 实现进程rlimit的获取、设置及继承机制(inherit_rlimits_from)
- 在dup2、fcntl等函数中添加RLIMIT_NOFILE检查,确保文件描述符不超过软限制
- 实现sys_prlimit64和sys_setrlimit系统调用,支持查询和设置进程资源限制
- 调整测试用例,添加dup_test到gvisor白名单,忽略未支持的测试

Signed-off-by: longjin <longjin@DragonOS.org>
@fslongjin fslongjin merged commit afc09a4 into DragonOS-Community:master Sep 27, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants