Documentation/translations/zh_CN/process/2.Process.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/process/2.Process.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/process/2.Process.rst- Extension
.rst- Size
- 21048 bytes
- Lines
- 359
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. include:: ../disclaimer-zh_CN.rst
:Original: :ref:`Documentation/process/2.Process.rst <development_process>`
:Translator:
时奎亮 Alex Shi <alex.shi@linux.alibaba.com>
:校译:
吴想成 Wu XiangCheng <bobwxc@email.cn>
.. _cn_development_process:
开发流程如何进行
================
90年代早期的Linux内核开发是一件相当松散的事情,涉及的用户和开发人员相对较少。
由于拥有数以百万计的用户群,且每年有大约2000名开发人员参与进来,内核因此必须
发展出许多既定流程来保证开发的顺利进行。要参与到流程中来,需要对此流程的进行
方式有一个扎实的理解。
总览
----
内核开发使用一个松散的、基于时间的滚动发布(rolling release)开发模型。
一个新的主内核发行版本(作为示例,我们将其称为 9.x) [1]_ 大约每两到三个月
发布一次,它带来了新特性、内部 API 的更改等。一个典型的版本包含大约 13,000
个变更集(changesets),涉及几十万行代码的修改。最近的发行版本及其日期可以
在这里找到
`维基百科 <https://en.wikipedia.org/wiki/Linux_kernel_version_history>`_
.. [1] 严格来说,Linux 内核并不采用语义化版本号方案,而是将 9.x 这一组数字
作为一个整体来标识主发行版本号。对于每一个版本,x 都会递增,但只有
当 x 被认为足够大时,9 才会递增(例如:Linux 5.0 是紧随 Linux 4.20
之后发布的)。
对于每个版本的补丁合并,遵循一个相对简单的规则。在每个开发周期的开头,“合并
窗口”被打开。这时,被认为足够稳定(并且被开发社区接受)的代码被合并到主线内
核中。在这段时间内,新开发周期的大部分变更(以及所有主要变更)将以接近每天
1000次变更(“补丁”或“变更集”)的速度合并。
(顺便说一句,值得注意的是,合并窗口期间集成的更改并不是凭空产生的;它们是经
提前收集、测试和分级的。稍后将详细描述该过程的工作方式。)
合并窗口持续大约两周。在这段时间结束时,Linus Torvalds将声明窗口已关闭,并
释放第一个“rc”内核。例如,对于目标为9.x的内核,在合并窗口结束时发生的释放
将被称为9.x-rc1。-rc1 版本是一个信号,表示合并新特性的时间已经过去,稳定下一
个内核的时间已经到来。
在接下来的6到10周内,只有修复问题的补丁才应该提交给主线。有时会允许更大的
更改,但这种情况很少发生;试图在合并窗口外合并新功能的开发人员往往受不到
友好的接待。一般来说,如果您错过了给定特性的合并窗口,最好的做法是等待下一
个开发周期。(偶尔会对未支持硬件的驱动程序进行例外;如果它们不改变已有代码,
则不会导致回归,应该可以随时被安全地加入)。
随着修复程序进入主线,补丁速度将随着时间的推移而变慢。Linus大约每周发布一次
新的-rc内核;在内核被认为足够稳定并最终发布前,一般会达到-rc6到-rc9之间。
然后,整个过程又重新开始了。
例如,这里是5.4的开发周期进行情况(2019年):
============== ==============================
九月 15 5.3 稳定版发布
九月 30 5.4-rc1 合并窗口关闭
十月 6 5.4-rc2
十月 13 5.4-rc3
十月 20 5.4-rc4
十月 27 5.4-rc5
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.