Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【任务发布】实现 sched_setaffinity 系统调用 和 CPU 亲和性 #1035

Open
val213 opened this issue Nov 9, 2024 · 3 comments
Open
Labels
A-sched Area: 调度子系统

Comments

@val213
Copy link
Collaborator

val213 commented Nov 9, 2024

sched_setaffinity 系统调用用于设置指定进程的 CPU 亲和性,将进程绑定到特定的 CPU 或 CPU 集合上运行,从而可以控制进程在哪些 CPU 上执行。

参考:https://code.dragonos.org.cn/xref/linux-6.6.21/kernel/sched/core.c#8366

相关:测试多核调度性能需要内核先支持 CPU 亲和性并实现 sched_setaffinity 系统调用,从而为 taskset 的引入提供支持。taskset 配合 gnu time 可以在引入标准的基准测试之前简单地测试跨核调度的性能(实现多核调度及负载均衡后)

@val213 val213 added the enhancement New feature or request label Nov 9, 2024
@dragonosbot dragonosbot added the needs-triage 这个问题可能需要分类处理。如果已经完成分类,请移除它。 label Nov 9, 2024
@github-actions github-actions bot removed the enhancement New feature or request label Nov 9, 2024
@yuyi2439
Copy link
Contributor

我没有看到有关多processor调度的代码
如果真的没有的话,我会先开一个实现此系统调用的pr,具体的调度实现我还不懂

@fslongjin
Copy link
Member

@val213 现在的问题不是dragonos还没实现多核负载均衡吗?
见:#758

cc @GnoCiYeH

@val213
Copy link
Collaborator Author

val213 commented Nov 14, 2024

@val213 现在的问题不是dragonos还没实现多核负载均衡吗? 见:#758

cc @GnoCiYeH

对的,我的想法是同时为实现多核负载均衡前后能够在用户态调用这个系统调用进行测试做准备?

@val213 val213 added A-sched Area: 调度子系统 and removed needs-triage 这个问题可能需要分类处理。如果已经完成分类,请移除它。 labels Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sched Area: 调度子系统
Projects
None yet
Development

No branches or pull requests

4 participants