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

deepin: KABI: KABI reservation for sched structures #551

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

opsiff
Copy link
Member

@opsiff opsiff commented Jan 8, 2025

We reserve some fields beforehand for sched structures prone to change, therefore, we can hot add/change features of sched with this enhancement. After reserving, normally cache does not matter as the reserved fields are not accessed at all.

Link: https://gitee.com/openeuler/kernel/issues/I8ZJI8
Link: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/f11bec33927d12cf8a0f95b1ad10653d69897444

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from opsiff. For more information see the Code Review Process.

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

We reserve some fields beforehand for sched structures prone to change,
therefore, we can hot add/change features of sched with this enhancement.
After reserving, normally cache does not matter as the reserved fields
are not accessed at all.

Link: https://gitee.com/openeuler/kernel/issues/I8ZJI8
Link: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/commit/f11bec33927d12cf8a0f95b1ad10653d69897444

Signed-off-by: Phil Auld's avatarPhil Auld <[email protected]>
Signed-off-by: Guan Jing <[email protected]>
Signed-off-by: Wentao Guan <[email protected]>
@opsiff opsiff force-pushed the linux-6.6.y-kabi-sched branch from b35fbbc to 884f72d Compare January 8, 2025 06:51
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 新增头文件:在sched.h文件中新增了<linux/deepin_kabi.h>头文件,需要确认该头文件是否必要,以及是否已经包含了所有需要的依赖。

  2. KABI保留字段:在多个结构体中添加了DEEPIN_KABI_RESERVE宏,用于保留字段以支持KABI(内核应用二进制接口)。这些保留字段的位置和数量需要根据具体的需求和未来的扩展计划进行合理规划。

  3. 结构体扩展:在task_struct中添加了task_struct_extend指针,用于扩展任务结构体。需要确保这个指针的使用不会导致内存泄漏或指针悬挂问题,并且在使用时进行了适当的初始化和清理。

  4. 代码风格:在添加新字段时,应该保持代码风格的一致性,例如在添加新字段时,应该遵循已有的注释和代码格式。

  5. 性能考虑:添加新的保留字段可能会影响结构体的对齐和内存占用,需要评估这些改动对性能的影响,并确保不会对系统性能产生负面影响。

  6. 安全性:在添加新的结构体和字段时,应该确保不会引入新的安全漏洞,例如内存泄漏、缓冲区溢出等。

  7. 文档和注释:应该为新增的结构体和字段添加适当的文档和注释,以便其他开发者理解这些改动的原因和用途。

  8. 测试:在添加新的结构体和字段后,应该进行充分的测试,以确保这些改动不会引入新的bug,并且与现有的代码和功能兼容。

总体来说,这些改动需要仔细考虑其对内核架构和性能的影响,并确保代码的质量和安全性。

@Avenger-285714 Avenger-285714 self-assigned this Jan 8, 2025
@Avenger-285714 Avenger-285714 self-requested a review January 8, 2025 06:53
@opsiff opsiff merged commit 34aa3d7 into linux-6.6.y Jan 10, 2025
7 of 10 checks passed
@opsiff opsiff deleted the linux-6.6.y-kabi-sched branch January 13, 2025 07:59
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.

4 participants