요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
Release cycle의 큰 흐름
2.Process.rst:13-141커널은 대략 2~3개월마다 새 major release를 내는 느슨한 시간 기반 절차를 사용한다. 원문은 2019년의 5.0부터 5.5까지를 예로 들며 각 5.x release가 새 기능과 내부 API 변경을 포함한 major release라고 설명한다.
일반적인 release에는 약 13,000개의 changeset과 수십만 줄의 변경이 들어갈 수 있다. Linux는 큰 변경을 계속 통합하는 rolling development model을 사용한다.
Merge window
개발 cycle이 시작되면 약 2주 동안 merge window가 열린다. 충분히 안정되었고 community가 받아들인 코드는 이 기간에 mainline으로 들어간다. 새 cycle의 대부분의 변경과 모든 major change가 이때 merge되며, 속도는 하루 약 1,000개 patch에 가까울 수 있다.
Merge window에 들어오는 변경은 그때 갑자기 만들어진 것이 아니다. subsystem tree에서 수집·review·test·staging된 결과가 merge window에 상위 tree로 올라오는 것이다.
약 2주가 지나 Linus Torvalds가 window를 닫으면 첫 release candidate인 -rc1이 나온다. 예를 들어 최종 목표가 5.6이면 첫 후보는 5.6-rc1이다. 이 시점부터 새 기능 통합은 끝나고 stabilization이 시작된다.
Release candidate와 stabilization
이어지는 6~10주 동안 mainline에는 문제를 고치는 patch만 제출하는 것이 원칙이다. merge window 밖의 새 기능은 거의 받아들여지지 않으므로 다음 cycle을 기다려야 한다. 기존 in-tree code를 건드리지 않아 regression 위험이 낮은 신규 hardware driver가 드문 예외가 될 수 있다.
수정이 쌓이면서 patch 유입 속도는 줄고 Linus는 대략 주 1회 새 -rc를 낸다. 보통 -rc6에서 -rc9 사이에 충분히 안정되었다고 판단하면 final release를 만들고 다음 cycle이 시작된다.
| 2019년 5.4 cycle | 의미 |
|---|---|
| 9월 15일 · 5.3 | 이전 stable release, 새 merge window 시작 |
| 9월 30일 · 5.4-rc1 | merge window 종료 |
| 10월 6일~11월 17일 · rc2~rc8 | stabilization과 regression 수정 |
| 11월 24일 · 5.4 | stable release |
Regression과 final release 판단
개발 cycle을 닫을 때 가장 중요한 지표는 이전 release에서 동작하던 system을 깨뜨린 regression 목록이다. 모든 bug가 문제지만 regression은 특히 심각하게 취급하며, 원인이 된 patch는 stabilization 기간에 revert될 가능성이 높다.
목표는 알려진 regression을 모두 고치는 것이지만 대규모 project에서 완벽은 어렵다. final release를 계속 늦추면 다음 merge window에 대기하는 변경이 커져 다음 cycle의 regression 위험도 커진다. 그래서 심각하지 않은 알려진 regression이 소수 남은 상태로 release할 수 있다.
Stable update와 long-term kernel
Final release 뒤 유지관리는 stable team으로 넘어가고 5.x.y 같은 번호의 update가 나온다. stable update 후보 patch는 중요한 bug를 고쳐야 하며, 다음 개발 kernel의 mainline에 이미 merge되어 있어야 한다.
일반 release는 최초 release 뒤 한 development cycle을 조금 넘는 기간 동안 stable update를 받는다. 일부 release는 maintainer가 필요성과 유지할 시간을 갖고 있을 때 long term kernel로 지정되어 더 오래 지원된다. 특정 미래 release가 자동으로 LTS가 되는 계획은 없다.
Patch lifecycle
2.Process.rst:142-209Patch는 개발자의 keyboard에서 곧바로 mainline으로 가지 않는다. 각 patch의 품질과 mainline에 필요한 변경인지 확인하는 review 절차를 거친다. 작은 fix는 빠르게 끝날 수 있지만 크고 논쟁적인 변경은 수년이 걸릴 수 있다.
| 단계 | 해야 할 일 |
|---|---|
| Design | 실제 요구사항과 해결 방식을 정한다. 가능한 한 공개적으로 진행해 뒤늦은 재설계를 줄인다. |
| Early review | 관련 mailing list에 patch를 보내 큰 설계·구현 문제를 찾는다. |
| Wider review | subsystem maintainer가 받아 tree와 -next에 넣고 다른 변경과 통합했을 때의 문제를 찾는다. |
| Mainline merge | Linus의 repository에 들어간다. 이때 나온 의견과 문제에도 즉시 대응한다. |
| Stable release | 더 많은 사용자가 실제로 사용하면서 새 문제가 나타날 수 있다. |
| Long-term maintenance | merge 뒤에도 원 개발자가 코드의 장기 유용성에 책임을 진다. |
Maintainer도 대부분 본업이 있으므로 모든 patch merge가 최우선은 아니다. 수정 요구를 받으면 반영하거나 반영하지 않아야 하는 기술적 이유를 설명해야 한다. 반대 의견은 없지만 merge되지 않는다면 최신 커널에 clean하게 적용되도록 계속 갱신해 review와 merge를 다시 요청해야 한다.
가장 큰 실수 가운데 하나는 전체 절차를 mainline merge 한 단계로 줄이려는 것이다. 설계 공개, review, integration test와 유지보수를 건너뛰면 참여자 모두가 더 큰 비용을 치르게 된다.
Patch가 maintainer를 거쳐 올라가는 방식
2.Process.rst:211-257Mainline repository에 직접 merge할 수 있는 사람은 Linus Torvalds 한 명이지만 모든 patch를 혼자 검사하지는 않는다. 예를 들어 2.6.38에 들어간 9,500개가 넘는 patch 중 Linus가 직접 선택한 것은 112개, 약 1.3%였다.
커널은 networking, architecture, memory management, video device 같은 subsystem으로 논리적으로 나뉜다. 대부분의 subsystem에는 해당 code의 전체 책임을 지고 mainline 후보 patch를 받아들이는 maintainer가 있다.
각 maintainer는 보통 git으로 자신의 kernel tree를 관리한다. git, quilt, Mercurial 같은 도구는 patch 목록과 authorship 등 metadata를 추적하며 mainline에 아직 없는 patch를 식별하게 해 준다.
Merge window가 열리면 top-level maintainer가 자신의 repository에서 선택한 patch를 pull해 달라고 Linus에게 요청한다. Linus는 개별 patch를 자세히 볼 때도 있지만 일반적으로 subsystem maintainer가 잘못된 patch를 upstream으로 보내지 않을 것이라고 신뢰한다.
Subsystem maintainer도 하위 maintainer의 tree에서 pull할 수 있다. networking tree가 network device driver, wireless 등의 하위 tree를 모으는 방식이다. repository chain은 보통 2~3단계를 넘지 않으며, 각 단계가 아래 단계 maintainer를 신뢰하므로 chain of trust라고 부른다.
따라서 patch를 kernel에 넣으려면 올바른 maintainer를 찾는 것이 핵심이다. 일반적인 patch를 Linus에게 직접 보내는 것은 올바른 경로가 아니다.
-next tree와 integration test
2.Process.rst:258-309다음 merge window를 준비하는 여러 subsystem tree를 한데 모아 미리 review하고 test하려면 -next tree가 필요하다. core function prototype을 바꾸는 patch와 옛 prototype을 사용하는 다른 tree의 patch처럼, 각각의 tree에서는 보이지 않던 conflict를 통합 상태에서 찾을 수 있다.
-mm와 MMOTM
Andrew Morton이 유지하는 오래된 -mm tree는 memory management에서 시작했지만 긴 subsystem tree 목록과 debugging patch를 통합한다. Andrew가 직접 고른 patch나 명확한 subsystem tree가 없는 patch도 포함하므로 최후의 subsystem tree처럼 동작한다.
일반 cycle에서 mainline patch의 약 5~10%가 -mm를 거친다. 현재 patch set은 MMOTM(-mm of the moment)으로 제공되지만 compile 자체가 되지 않을 가능성도 있어 사용하는 과정이 불편할 수 있다.
linux-next
다음 cycle patch 통합의 주 tree는 Stephen Rothwell이 유지하는 linux-next다. 다음 merge window가 닫힌 뒤 mainline이 어떤 모습일지 보여 주는 snapshot을 목표로 한다.
linux-next build는 linux-kernel과 linux-next mailing list에 공지된다. 특정 merge window에 들어갈 patch라면 window가 열리기 전에 충분한 기간 linux-next를 거쳐야 한다.
drivers/staging
2.Process.rst:311-338drivers/staging/에는 mainline 정식 위치로 이동하기 전에 추가 작업이 필요한 driver와 file system이 놓인다. coding·quality standard에 아직 미치지 못하지만 사용과 공동 개발의 가치가 있는 코드를 추적하는 공간이다.
각 driver는 별도 subdirectory를 가지며 TODO 파일에 정식 merge까지 남은 작업과 patch를 Cc할 사람을 적는다. staging에 들어오는 driver는 최소한 올바르게 compile되어야 한다.
Staging은 다른 개발자에게 노출되어 빠르게 개선될 기회를 주지만 목적지가 아니다. 꾸준한 진전이 없는 코드는 결국 제거될 수 있고 distribution도 staging driver enable에 조심스럽다. 최종 목표는 품질 기준을 만족해 정식 subsystem으로 이동하는 것이다.
Patch와 tree를 관리하는 도구
2.Process.rst:340-385커널 개발은 많은 patch 집합을 여러 tree 사이에서 이동시키므로 강력한 관리 도구가 필수다. 이 문서는 사용법 tutorial 대신 각 도구의 역할을 소개한다.
- git: 커널 community의 지배적인 distributed version control system이다. 큰 repository와 많은 patch를 효율적으로 처리한다. 자신의 작업에 쓰지 않더라도 mainline과 다른 개발자의 변경을 따라가려면 익숙해야 한다.
- Mercurial: git을 쓰지 않는 개발자 사이에서 널리 쓰이며 비슷한 기능과 더 쉽게 느껴질 수 있는 interface를 제공한다.
- Quilt: source history 전체가 아니라 계속 변하는 code base 위의 특정 patch series를 관리한다. -mm 같은 tree나 일부 subsystem maintainer의 patch 관리에 잘 맞는다.
Mailing list에서 일하는 법
2.Process.rst:387-455Linux 커널 개발의 상당 부분은 mailing list에서 진행된다. 완전한 community 구성원으로 활동하려면 적어도 관련 list 하나에는 참여해야 하지만 많은 mail과 고유한 대화 관행에 대비해야 한다.
대부분의 kernel mailing list는 kernel.org에서 host하며 subsystem별 정확한 list는 MAINTAINERS 파일에서 찾는다. 전체 개발의 중심인 linux-kernel은 하루 500개 message에 이를 수 있고 noise가 많으며 대화가 매우 기술적일 수 있지만, 전체 community의 중요한 정보를 보려면 무시할 수 없다.
- 주 mailbox와 다른 folder로 배달해 필요할 때 stream을 잠시 무시할 수 있게 한다.
- 모든 대화를 따라가려 하지 말고 topic과 참여자를 기준으로 거른다. 긴 thread는 subject를 바꾸지 않은 채 주제가 이동할 수 있다.
- 분노를 유도하는 message에는 반응하지 않는다.
- 답장할 때 관련된 모든 사람의 Cc를 유지하고 특별한 이유가 없으면 recipient를 빼지 않는다.
- 질문하기 전에 mailing-list archive와 web을 검색한다.
- top-posting 대신 인용문 아래에 답을 배치하는 interleaved inline reply를 사용한다.
- 질문과 patch를 올바른 subsystem list에 보낸다. networking 문제라면 일반 linux-kernel보다 netdev가 적합하다.
커널 개발 시작하기
2.Process.rst:457-500회사는 유명한 kernel developer를 채용해 조직을 시작할 수 있지만 비용이 크고 경험 있는 개발자 pool을 넓히지는 못한다. 시간을 투자해 사내 개발자를 교육하면 커널과 회사 사정을 모두 이해하고 다른 사람도 훈련할 수 있는 team을 만들 수 있어 중기적으로 더 유리할 수 있다.
개인은 큰 project부터 시작하기가 부담스러워 spelling이나 사소한 coding-style patch를 고르기 쉽다. 하지만 이런 patch는 전체 community에 noise를 만들기 때문에 좋은 첫인상을 주기 어렵다.
Andrew Morton은 초보자의 첫 project로 자신이 접근할 수 있는 모든 machine에서 kernel이 항상 완벽하게 동작하도록 만들라고 조언한다. 문제를 다른 사람과 함께 고치는 과정에는 끈기가 필요하며 그 자체가 커널 개발의 일부다.
당장 고칠 문제가 보이지 않으면 현재 regression 목록과 open bug를 살펴본다. 해결해야 할 문제는 항상 있으며, 실제 bug를 고치면 절차를 경험하는 동시에 community의 신뢰도 얻을 수 있다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. _development_process:
How the development process works
=================================
Linux kernel development in the early 1990's was a pretty loose affair,
with relatively small numbers of users and developers involved. With a
user base in the millions and with some 2,000 developers involved over the
course of one year, the kernel has since had to evolve a number of
processes to keep development happening smoothly. A solid understanding of
how the process works is required in order to be an effective part of it.
The big picture
---------------
The kernel developers use a loosely time-based release process, with a new
major kernel release happening every two or three months. The recent
release history looks like this:
====== =================
5.0 March 3, 2019
5.1 May 5, 2019
5.2 July 7, 2019
5.3 September 15, 2019
5.4 November 24, 2019
5.5 January 6, 2020
====== =================
Every 5.x release is a major kernel release with new features, internal
API changes, and more. A typical release can contain about 13,000
changesets with changes to several hundred thousand lines of code. 5.x is
the leading edge of Linux kernel development; the kernel uses a
rolling development model which is continually integrating major changes.
A relatively straightforward discipline is followed with regard to the
merging of patches for each release. At the beginning of each development
cycle, the "merge window" is said to be open. At that time, code which is
deemed to be sufficiently stable (and which is accepted by the development
community) is merged into the mainline kernel. The bulk of changes for a
new development cycle (and all of the major changes) will be merged during
this time, at a rate approaching 1,000 changes ("patches," or "changesets")
per day.
(As an aside, it is worth noting that the changes integrated during the
merge window do not come out of thin air; they have been collected, tested,
and staged ahead of time. How that process works will be described in
detail later on).
The merge window lasts for approximately two weeks. At the end of this
time, Linus Torvalds will declare that the window is closed and release the
first of the "rc" kernels. For the kernel which is destined to be 5.6,
for example, the release which happens at the end of the merge window will
be called 5.6-rc1. The -rc1 release is the signal that the time to
merge new features has passed, and that the time to stabilize the next
kernel has begun.
Over the next six to ten weeks, only patches which fix problems should be
submitted to the mainline. On occasion a more significant change will be
allowed, but such occasions are rare; developers who try to merge new
features outside of the merge window tend to get an unfriendly reception.
As a general rule, if you miss the merge window for a given feature, the
best thing to do is to wait for the next development cycle. (An occasional
exception is made for drivers for previously-unsupported hardware; if they
touch no in-tree code, they cannot cause regressions and should be safe to
add at any time).
As fixes make their way into the mainline, the patch rate will slow over
time. Linus releases new -rc kernels about once a week; a normal series
will get up to somewhere between -rc6 and -rc9 before the kernel is
considered to be sufficiently stable and the final release is made.
At that point the whole process starts over again.
As an example, here is how the 5.4 development cycle went (all dates in
2019):
============== ===============================
September 15 5.3 stable release
September 30 5.4-rc1, merge window closes
October 6 5.4-rc2
October 13 5.4-rc3
October 20 5.4-rc4
October 27 5.4-rc5
November 3 5.4-rc6
November 10 5.4-rc7
November 17 5.4-rc8
November 24 5.4 stable release
============== ===============================
How do the developers decide when to close the development cycle and create
the stable release? The most significant metric used is the list of
regressions from previous releases. No bugs are welcome, but those which
break systems which worked in the past are considered to be especially
serious. For this reason, patches which cause regressions are looked upon
unfavorably and are quite likely to be reverted during the stabilization
period.
The developers' goal is to fix all known regressions before the stable
release is made. In the real world, this kind of perfection is hard to
achieve; there are just too many variables in a project of this size.
There comes a point where delaying the final release just makes the problem
worse; the pile of changes waiting for the next merge window will grow
larger, creating even more regressions the next time around. So most 5.x
kernels go out with a handful of known regressions though, hopefully, none
of them are serious.
Once a stable release is made, its ongoing maintenance is passed off to the
"stable team," currently consists of Greg Kroah-Hartman and Sasha Levin. The
stable team will release occasional updates to the stable release using the
5.x.y numbering scheme.
To be considered for an update release, a patch must (1) fix a significant
bug, and (2) already be merged into the mainline for the next development
kernel. Kernels will typically receive stable updates for a little more
than one development cycle past their initial release. So, for example, the
5.2 kernel's history looked like this (all dates in 2019):
============== ===============================
July 7 5.2 stable release
July 14 5.2.1
July 21 5.2.2
July 26 5.2.3
July 28 5.2.4
July 31 5.2.5
... ...
October 11 5.2.21
============== ===============================
5.2.21 was the final stable update of the 5.2 release.
Some kernels are designated "long term" kernels; they will receive support
for a longer period. Please refer to the following link for the list of active
long term kernel versions and their maintainers:
https://www.kernel.org/category/releases.html
The selection of a kernel for long-term support is purely a matter of a
maintainer having the need and the time to maintain that release. There
are no known plans for long-term support for any specific upcoming
release.
The lifecycle of a patch
------------------------
Patches do not go directly from the developer's keyboard into the mainline
kernel. There is, instead, a somewhat involved (if somewhat informal)
process designed to ensure that each patch is reviewed for quality and that
each patch implements a change which is desirable to have in the mainline.
This process can happen quickly for minor fixes, or, in the case of large
and controversial changes, go on for years. Much developer frustration
comes from a lack of understanding of this process or from attempts to
circumvent it.
In the hopes of reducing that frustration, this document will describe how
a patch gets into the kernel. What follows below is an introduction which
describes the process in a somewhat idealized way. A much more detailed
treatment will come in later sections.
The stages that a patch goes through are, generally:
- Design. This is where the real requirements for the patch - and the way
those requirements will be met - are laid out. Design work is often
done without involving the community, but it is better to do this work
in the open if at all possible; it can save a lot of time redesigning
things later.
- Early review. Patches are posted to the relevant mailing list, and
developers on that list reply with any comments they may have. This
process should turn up any major problems with a patch if all goes
well.
- Wider review. When the patch is getting close to ready for mainline
inclusion, it should be accepted by a relevant subsystem maintainer -
though this acceptance is not a guarantee that the patch will make it
all the way to the mainline. The patch will show up in the maintainer's
subsystem tree and into the -next trees (described below). When the
process works, this step leads to more extensive review of the patch and
the discovery of any problems resulting from the integration of this
patch with work being done by others.
- Please note that most maintainers also have day jobs, so merging
your patch may not be their highest priority. If your patch is
getting feedback about changes that are needed, you should either
make those changes or justify why they should not be made. If your
patch has no review complaints but is not being merged by its
appropriate subsystem or driver maintainer, you should be persistent
in updating the patch to the current kernel so that it applies cleanly
and keep sending it for review and merging.
- Merging into the mainline. Eventually, a successful patch will be
merged into the mainline repository managed by Linus Torvalds. More
comments and/or problems may surface at this time; it is important that
the developer be responsive to these and fix any issues which arise.
- Stable release. The number of users potentially affected by the patch
is now large, so, once again, new problems may arise.
- Long-term maintenance. While it is certainly possible for a developer
to forget about code after merging it, that sort of behavior tends to
leave a poor impression in the development community. Merging code
eliminates some of the maintenance burden, in that others will fix
problems caused by API changes. But the original developer should
continue to take responsibility for the code if it is to remain useful
in the longer term.
One of the largest mistakes made by kernel developers (or their employers)
is to try to cut the process down to a single "merging into the mainline"
step. This approach invariably leads to frustration for everybody
involved.
How patches get into the Kernel
-------------------------------
There is exactly one person who can merge patches into the mainline kernel
repository: Linus Torvalds. But, for example, of the over 9,500 patches
which went into the 2.6.38 kernel, only 112 (around 1.3%) were directly
chosen by Linus himself. The kernel project has long since grown to a size
where no single developer could possibly inspect and select every patch
unassisted. The way the kernel developers have addressed this growth is
through the use of a lieutenant system built around a chain of trust.
The kernel code base is logically broken down into a set of subsystems:
networking, specific architecture support, memory management, video
devices, etc. Most subsystems have a designated maintainer, a developer
who has overall responsibility for the code within that subsystem. These
subsystem maintainers are the gatekeepers (in a loose way) for the portion
of the kernel they manage; they are the ones who will (usually) accept a
patch for inclusion into the mainline kernel.
Subsystem maintainers each manage their own version of the kernel source
tree, usually (but certainly not always) using the git source management
tool. Tools like git (and related tools like quilt or mercurial) allow
maintainers to track a list of patches, including authorship information
and other metadata. At any given time, the maintainer can identify which
patches in his or her repository are not found in the mainline.
When the merge window opens, top-level maintainers will ask Linus to "pull"
the patches they have selected for merging from their repositories. If
Linus agrees, the stream of patches will flow up into his repository,
becoming part of the mainline kernel. The amount of attention that Linus
pays to specific patches received in a pull operation varies. It is clear
that, sometimes, he looks quite closely. But, as a general rule, Linus
trusts the subsystem maintainers to not send bad patches upstream.
Subsystem maintainers, in turn, can pull patches from other maintainers.
For example, the networking tree is built from patches which accumulated
first in trees dedicated to network device drivers, wireless networking,
etc. This chain of repositories can be arbitrarily long, though it rarely
exceeds two or three links. Since each maintainer in the chain trusts
those managing lower-level trees, this process is known as the "chain of
trust."
Clearly, in a system like this, getting patches into the kernel depends on
finding the right maintainer. Sending patches directly to Linus is not
normally the right way to go.
Next trees
----------
The chain of subsystem trees guides the flow of patches into the kernel,
but it also raises an interesting question: what if somebody wants to look
at all of the patches which are being prepared for the next merge window?
Developers will be interested in what other changes are pending to see
whether there are any conflicts to worry about; a patch which changes a
core kernel function prototype, for example, will conflict with any other
patches which use the older form of that function. Reviewers and testers
want access to the changes in their integrated form before all of those
changes land in the mainline kernel. One could pull changes from all of
the interesting subsystem trees, but that would be a big and error-prone
job.
The answer comes in the form of -next trees, where subsystem trees are
collected for testing and review. The older of these trees, maintained by
Andrew Morton, is called "-mm" (for memory management, which is how it got
started). The -mm tree integrates patches from a long list of subsystem
trees; it also has some patches aimed at helping with debugging.
Beyond that, -mm contains a significant collection of patches which have
been selected by Andrew directly. These patches may have been posted on a
mailing list, or they may apply to a part of the kernel for which there is
no designated subsystem tree. As a result, -mm operates as a sort of
subsystem tree of last resort; if there is no other obvious path for a
patch into the mainline, it is likely to end up in -mm. Miscellaneous
patches which accumulate in -mm will eventually either be forwarded on to
an appropriate subsystem tree or be sent directly to Linus. In a typical
development cycle, approximately 5-10% of the patches going into the
mainline get there via -mm.
The current -mm patch is available in the "mmotm" (-mm of the moment)
directory at:
https://www.ozlabs.org/~akpm/mmotm/
Use of the MMOTM tree is likely to be a frustrating experience, though;
there is a definite chance that it will not even compile.
The primary tree for next-cycle patch merging is linux-next, maintained by
Stephen Rothwell. The linux-next tree is, by design, a snapshot of what
the mainline is expected to look like after the next merge window closes.
Linux-next trees are announced on the linux-kernel and linux-next mailing
lists when they are assembled; they can be downloaded from:
https://www.kernel.org/pub/linux/kernel/next/
Linux-next has become an integral part of the kernel development process;
all patches merged during a given merge window should really have found
their way into linux-next some time before the merge window opens.
Staging trees
-------------
The kernel source tree contains the drivers/staging/ directory, where
many sub-directories for drivers or filesystems that are on their way to
being added to the kernel tree live. They remain in drivers/staging while
they still need more work; once complete, they can be moved into the
kernel proper. This is a way to keep track of drivers that aren't
up to Linux kernel coding or quality standards, but people may want to use
them and track development.
Greg Kroah-Hartman currently maintains the staging tree. Drivers that
still need work are sent to him, with each driver having its own
subdirectory in drivers/staging/. Along with the driver source files, a
TODO file should be present in the directory as well. The TODO file lists
the pending work that the driver needs for acceptance into the kernel
proper, as well as a list of people that should be Cc'd for any patches to
the driver. Current rules require that drivers contributed to staging
must, at a minimum, compile properly.
Staging can be a relatively easy way to get new drivers into the mainline
where, with luck, they will come to the attention of other developers and
improve quickly. Entry into staging is not the end of the story, though;
code in staging which is not seeing regular progress will eventually be
removed. Distributors also tend to be relatively reluctant to enable
staging drivers. So staging is, at best, a stop on the way toward becoming
a proper mainline driver.
Tools
-----
As can be seen from the above text, the kernel development process depends
heavily on the ability to herd collections of patches in various
directions. The whole thing would not work anywhere near as well as it
does without suitably powerful tools. Tutorials on how to use these tools
are well beyond the scope of this document, but there is space for a few
pointers.
By far the dominant source code management system used by the kernel
community is git. Git is one of a number of distributed version control
systems being developed in the free software community. It is well tuned
for kernel development, in that it performs quite well when dealing with
large repositories and large numbers of patches. It also has a reputation
for being difficult to learn and use, though it has gotten better over
time. Some sort of familiarity with git is almost a requirement for kernel
developers; even if they do not use it for their own work, they'll need git
to keep up with what other developers (and the mainline) are doing.
Git is now packaged by almost all Linux distributions. There is a home
page at:
https://git-scm.com/
That page has pointers to documentation and tutorials.
Among the kernel developers who do not use git, the most popular choice is
almost certainly Mercurial:
https://www.selenic.com/mercurial/
Mercurial shares many features with git, but it provides an interface which
many find easier to use.
The other tool worth knowing about is Quilt:
https://savannah.nongnu.org/projects/quilt/
Quilt is a patch management system, rather than a source code management
system. It does not track history over time; it is, instead, oriented
toward tracking a specific set of changes against an evolving code base.
Some major subsystem maintainers use quilt to manage patches intended to go
upstream. For the management of certain kinds of trees (-mm, for example),
quilt is the best tool for the job.
Mailing lists
-------------
A great deal of Linux kernel development work is done by way of mailing
lists. It is hard to be a fully-functioning member of the community
without joining at least one list somewhere. But Linux mailing lists also
represent a potential hazard to developers, who risk getting buried under a
load of electronic mail, running afoul of the conventions used on the Linux
lists, or both.
Most kernel mailing lists are hosted at kernel.org; the master list can
be found at:
https://subspace.kernel.org
There are lists hosted elsewhere; please check the MAINTAINERS file for
the list relevant for any particular subsystem.
The core mailing list for kernel development is, of course, linux-kernel.
This list is an intimidating place to be; volume can reach 500 messages per
day, the amount of noise is high, the conversation can be severely
technical, and participants are not always concerned with showing a high
degree of politeness. But there is no other place where the kernel
development community comes together as a whole; developers who avoid this
list will miss important information.
There are a few hints which can help with linux-kernel survival:
- Have the list delivered to a separate folder, rather than your main
mailbox. One must be able to ignore the stream for sustained periods of
time.
- Do not try to follow every conversation - nobody else does. It is
important to filter on both the topic of interest (though note that
long-running conversations can drift away from the original subject
without changing the email subject line) and the people who are
participating.
- Do not feed the trolls. If somebody is trying to stir up an angry
response, ignore them.
- When responding to linux-kernel email (or that on other lists) preserve
the Cc: header for all involved. In the absence of a strong reason (such
as an explicit request), you should never remove recipients. Always make
sure that the person you are responding to is in the Cc: list. This
convention also makes it unnecessary to explicitly ask to be copied on
replies to your postings.
- Search the list archives (and the net as a whole) before asking
questions. Some developers can get impatient with people who clearly
have not done their homework.
- Use interleaved ("inline") replies, which makes your response easier to
read. (i.e. avoid top-posting -- the practice of putting your answer above
the quoted text you are responding to.) For more details, see
:ref:`Documentation/process/submitting-patches.rst <interleaved_replies>`.
- Ask on the correct mailing list. Linux-kernel may be the general meeting
point, but it is not the best place to find developers from all
subsystems.
The last point - finding the correct mailing list - is a common place for
beginning developers to go wrong. Somebody who asks a networking-related
question on linux-kernel will almost certainly receive a polite suggestion
to ask on the netdev list instead, as that is the list frequented by most
networking developers. Other lists exist for the SCSI, video4linux, IDE,
filesystem, etc. subsystems. The best place to look for mailing lists is
in the MAINTAINERS file packaged with the kernel source.
Getting started with Kernel development
---------------------------------------
Questions about how to get started with the kernel development process are
common - from both individuals and companies. Equally common are missteps
which make the beginning of the relationship harder than it has to be.
Companies often look to hire well-known developers to get a development
group started. This can, in fact, be an effective technique. But it also
tends to be expensive and does not do much to grow the pool of experienced
kernel developers. It is possible to bring in-house developers up to speed
on Linux kernel development, given the investment of a bit of time. Taking
this time can endow an employer with a group of developers who understand
the kernel and the company both, and who can help to train others as well.
Over the medium term, this is often the more profitable approach.
Individual developers are often, understandably, at a loss for a place to
start. Beginning with a large project can be intimidating; one often wants
to test the waters with something smaller first. This is the point where
some developers jump into the creation of patches fixing spelling errors or
minor coding style issues. Unfortunately, such patches create a level of
noise which is distracting for the development community as a whole, so,
increasingly, they are looked down upon. New developers wishing to
introduce themselves to the community will not get the sort of reception
they wish for by these means.
Andrew Morton gives this advice for aspiring kernel developers
::
The #1 project for all kernel beginners should surely be "make sure
that the kernel runs perfectly at all times on all machines which
you can lay your hands on". Usually the way to do this is to work
with others on getting things fixed up (this can require
persistence!) but that's fine - it's a part of kernel development.
(https://lwn.net/Articles/283982/).
In the absence of obvious problems to fix, developers are advised to look
at the current lists of regressions and open bugs in general. There is
never any shortage of issues in need of fixing; by addressing these issues,
developers will gain experience with the process while, at the same time,
building respect with the rest of the development community.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Kernel 개발 절차가 필요한 이유
1-111990년대 초 Linux kernel 개발은 사용자와 개발자 수가 적어 비교적 느슨하게 진행되었다. 이후 사용자 기반이 수백만 명으로 늘고 1년 동안 참여하는 개발자도 약 2,000명에 이르면서, 개발을 원활하게 유지하기 위한 여러 절차가 생겼다. 이 community에서 효과적으로 일하려면 절차가 어떻게 동작하는지 확실히 이해해야 한다.
Mainline release cycle과 merge window
13-71Kernel 개발자는 대략적인 시간 기반 release 절차를 사용하며 두세 달마다 새 major kernel을 release한다. 원문이 제시한 당시 release 이력은 다음과 같다.
| Version | Release date |
|---|---|
| 5.0 | March 3, 2019 |
| 5.1 | May 5, 2019 |
| 5.2 | July 7, 2019 |
| 5.3 | September 15, 2019 |
| 5.4 | November 24, 2019 |
| 5.5 | January 6, 2020 |
각 5.x release는 새 기능과 internal API 변경 등을 포함하는 major kernel release다. 일반적인 release 하나에는 약 13,000 changeset과 수십만 line의 변경이 들어갈 수 있다. 5.x는 Linux kernel 개발의 최전선이며 major change를 계속 통합하는 rolling development model을 사용한다.
각 cycle 시작에는 merge window가 열린다. 충분히 안정적이라고 판단되고 development community가 받아들인 code가 이때 mainline에 merge된다. 새 cycle 변경의 대부분과 모든 major change가 이 기간에 들어오며 하루 약 1,000 patch 또는 changeset에 가까운 속도로 merge될 수 있다.
Merge window에 들어오는 변경은 갑자기 생긴 것이 아니다. 이미 그 전에 수집·test·staging된 code이며 뒤 절에서 이 준비 과정을 설명한다.
Merge window는 약 2주 동안 열린다. 끝나면 Linus Torvalds가 window 종료를 선언하고 첫 rc kernel을 release한다. 최종 5.6이 될 cycle이라면 첫 release는 5.6-rc1이다. -rc1은 새 feature를 merge할 시간이 끝나고 다음 kernel을 안정화할 시간이 시작됐다는 신호다.
그 다음 6~10주에는 문제를 고치는 patch만 mainline에 제출해야 한다. 더 큰 변경이 허용되는 경우도 드물게 있지만 merge window 밖에서 새 feature를 넣으려 하면 좋지 않은 반응을 받는다. Feature가 window를 놓쳤다면 일반적으로 다음 cycle을 기다려야 한다. In-tree code를 건드리지 않는 완전히 새로운 hardware driver는 regression을 만들 수 없어 예외적으로 언제든 추가될 수 있다.
Fix가 mainline에 들어오면서 patch rate는 점차 낮아진다. Linus는 약 일주일마다 새 -rc를 release하며 보통 -rc6에서 -rc9 사이에 충분히 안정적이라고 판단해 final release를 만든다. 그 시점부터 전체 절차가 다시 시작된다.
Major feature는 약 2주의 merge window에 들어가고, -rc1 이후에는 6~10주 동안 regression과 bug 수정에 집중한다. Final release 뒤 다음 merge window가 열린다.
5.4 cycle과 regression 기준
73-104원문은 2019년의 5.4 development cycle을 다음과 같이 예로 든다.
| Date | Release |
|---|---|
| September 15 | 5.3 stable release |
| September 30 | 5.4-rc1, merge window closes |
| October 6 | 5.4-rc2 |
| October 13 | 5.4-rc3 |
| October 20 | 5.4-rc4 |
| October 27 | 5.4-rc5 |
| November 3 | 5.4-rc6 |
| November 10 | 5.4-rc7 |
| November 17 | 5.4-rc8 |
| November 24 | 5.4 stable release |
Development cycle을 닫고 stable release를 만들 시점을 결정할 때 가장 중요한 지표는 이전 release에 비해 생긴 regression 목록이다. 어떤 bug도 바람직하지 않지만 과거에 동작하던 system을 깨뜨리는 bug는 특히 심각하다. 따라서 regression을 만든 patch는 좋지 않게 평가되며 stabilization 기간에 revert될 가능성이 높다.
목표는 stable release 전에 알려진 regression을 모두 고치는 것이다. 그러나 이 규모의 project에는 변수가 너무 많아 현실에서 완벽히 달성하기 어렵다. Final release를 계속 늦추면 다음 merge window를 기다리는 변경이 쌓이고 다음 cycle에 더 많은 regression이 생길 수 있다. 그래서 대부분 5.x kernel은 심각한 것은 아니길 바라면서도 소수의 알려진 regression을 가진 채 release된다.
Stable update와 long-term kernel
106-139Stable release가 만들어지면 이후 maintenance는 원문 작성 당시 Greg Kroah-Hartman과 Sasha Levin으로 구성된 stable team에 넘겨진다. Stable team은 5.x.y numbering으로 update를 release한다.
Update release 후보 patch는 두 조건을 충족해야 한다. 첫째, 중요한 bug를 고쳐야 한다. 둘째, 다음 development kernel을 위한 mainline에 이미 merge되어 있어야 한다. 일반 kernel은 initial release 뒤 한 development cycle보다 조금 긴 기간 동안 stable update를 받는다.
| Date | 5.2 stable history |
|---|---|
| July 7, 2019 | 5.2 stable release |
| July 14 | 5.2.1 |
| July 21 | 5.2.2 |
| July 26 | 5.2.3 |
| July 28 | 5.2.4 |
| July 31 | 5.2.5 |
| … | … |
| October 11 | 5.2.21 · final stable update |
일부 kernel은 long term kernel로 지정되어 더 오래 지원된다. Long-term support 대상 선정은 특정 release를 유지할 필요와 시간이 있는 maintainer가 존재하는지에 달려 있다. 특정 future release가 반드시 long-term이 된다는 사전 계획은 없다.
Patch가 거치는 단계
142-209Patch는 developer keyboard에서 곧바로 mainline으로 이동하지 않는다. 각 patch의 품질을 review하고 mainline에 둘 가치가 있는 변경인지 확인하는 다소 복잡하고 비공식적인 절차를 거친다. 작은 fix는 빠르게 지나갈 수 있지만 크고 논쟁적인 변경은 수년이 걸릴 수 있다. 이 절차를 이해하지 못하거나 우회하려는 시도는 개발자에게 큰 좌절을 만든다.
설계와 review를 거친 patch가 maintainer tree와 -next에서 통합 검증된 뒤 mainline, stable release로 이동하고 원 개발자의 장기 maintenance로 이어진다.
- Design: 실제 요구 사항과 이를 충족할 방법을 정한다. Community 없이 진행하는 경우가 많지만 가능하면 공개적으로 설계해야 나중의 재설계 시간을 줄일 수 있다.
- Early review: 관련 mailing list에 patch를 게시하고 list의 개발자에게 comment를 받는다. 잘 진행되면 major problem이 이 단계에서 드러난다.
- Wider review: mainline 준비가 가까워지면 관련 subsystem maintainer의 acceptance를 받아 maintainer subsystem tree와 -next tree에 나타난다. Acceptance가 mainline 도달을 보장하지는 않지만 더 넓은 review와 다른 작업과의 integration problem 발견으로 이어진다.
- Mainline merge: 성공한 patch는 결국 Linus Torvalds의 mainline repository에 merge된다. 이때도 새 comment와 문제가 나올 수 있으므로 developer는 신속히 대응하고 고쳐야 한다.
- Stable release: patch의 영향을 받을 수 있는 사용자 수가 크게 늘면서 또 다른 문제가 드러날 수 있다.
- Long-term maintenance: Merge 뒤 code를 잊는 행동은 community에 나쁜 인상을 준다. API 변경으로 생긴 일부 문제는 다른 개발자가 고쳐 주지만 original developer도 code가 장기간 유용하도록 계속 책임져야 한다.
대부분 maintainer에게는 본업도 있으므로 사용자의 patch merge가 최우선일 수 없다. 필요한 변경에 대한 feedback을 받았다면 수정하거나 왜 수정하지 않아야 하는지 설명한다. Review objection은 없지만 maintainer가 merge하지 않는다면 current kernel에 계속 rebase하여 cleanly apply되도록 갱신하고 review와 merge를 위해 꾸준히 다시 보낸다.
Kernel developer나 고용주가 저지르는 가장 큰 실수 중 하나는 전체 절차를 mainline merge 한 단계로 줄이려는 것이다. 이 접근은 관련된 모두에게 반드시 좌절을 만든다.
Maintainer hierarchy와 chain of trust
211-255Mainline kernel repository에 patch를 merge할 수 있는 사람은 Linus Torvalds 한 명뿐이다. 하지만 2.6.38에 들어간 9,500개가 넘는 patch 중 Linus가 직접 선택한 것은 112개, 약 1.3%뿐이었다. Project가 커져 한 개발자가 모든 patch를 직접 검사하고 선택할 수 없게 되자 kernel은 trust chain을 중심으로 lieutenant system을 만들었다.
Kernel code base는 networking, architecture support, memory management, video device 같은 subsystem으로 논리적으로 나뉜다. 대부분 subsystem에는 해당 code 전체를 책임지는 maintainer가 있다. 이들은 자신이 관리하는 kernel 영역의 느슨한 gatekeeper이며 보통 mainline 포함을 위한 patch를 받아들이는 사람이다.
Subsystem maintainer는 대개 Git을 사용해 자신의 kernel source tree를 관리한다. Git, quilt, Mercurial 같은 도구는 authorship와 기타 metadata를 포함한 patch 목록을 추적하게 해 준다. Maintainer는 언제든 자신의 repository에만 있고 mainline에는 없는 patch를 식별할 수 있다.
하위 driver tree의 maintainer가 검증한 변경을 subsystem maintainer가 다시 모으고, top-level maintainer의 pull request를 Linus가 받아 mainline에 통합한다.
Merge window가 열리면 top-level maintainer는 자신의 repository에서 선택한 patch를 pull해 달라고 Linus에게 요청한다. Linus가 동의하면 patch stream이 mainline repository로 올라간다. Linus가 pull에 포함된 개별 patch를 살펴보는 정도는 상황마다 다르며 때로는 매우 자세히 보지만, 일반적으로 subsystem maintainer가 나쁜 patch를 upstream으로 보내지 않을 것이라고 신뢰한다.
Subsystem maintainer도 다른 maintainer tree에서 patch를 pull할 수 있다. 예를 들어 networking tree는 network device driver, wireless networking 등의 전용 tree에 먼저 쌓인 patch로 구성된다. Repository chain 길이에 제한은 없지만 대개 두세 단계보다 길지 않다. 각 maintainer가 하위 tree 관리자를 신뢰하기 때문에 chain of trust라고 부른다.
이 system에서 patch를 kernel에 넣으려면 올바른 maintainer를 찾는 일이 핵심이다. Patch를 Linus에게 직접 보내는 것은 일반적으로 올바른 경로가 아니다.
-mm과 linux-next의 통합 검증
258-308Subsystem tree chain은 patch 흐름을 안내하지만 다음 merge window의 후보인 모든 patch를 한꺼번에 보고 싶다는 요구가 생긴다. Core function prototype을 바꾸는 patch는 old form을 사용하는 다른 patch와 충돌할 수 있으므로 developer는 pending change를 미리 알아야 한다. Reviewer와 tester도 mainline landing 전에 통합된 형태에 접근해야 한다. 모든 subsystem tree를 각각 pull하는 일은 크고 오류가 나기 쉽다.
해결책은 subsystem tree를 test와 review를 위해 모은 -next tree다. 오래된 tree인 -mm은 memory management에서 시작했으며 Andrew Morton이 유지한다. 긴 subsystem tree 목록의 patch와 debugging 지원 patch를 통합한다.
-mm에는 Andrew가 직접 선택한 patch도 상당량 들어 있다. Mailing list에 게시되었거나 전용 subsystem tree가 없는 kernel 영역의 patch일 수 있다. 그래서 다른 명확한 mainline 경로가 없는 patch가 도착하는 최후의 subsystem tree처럼 동작한다. -mm에 쌓인 miscellaneous patch는 적절한 subsystem tree로 전달되거나 Linus에게 직접 보내진다. 일반 cycle에서 mainline patch의 약 5~10%가 -mm을 통해 들어간다.
Current -mm patch는 MMOTM(-mm of the moment) directory에 있다. 다만 MMOTM tree는 compile조차 되지 않을 가능성이 있어 사용이 답답할 수 있다.
다음 cycle patch 통합의 primary tree는 Stephen Rothwell이 유지하는 linux-next다. 설계상 다음 merge window가 닫힌 뒤 mainline이 어떤 모습일지 보여 주는 snapshot이다. Assemble될 때 linux-kernel과 linux-next mailing list에 공지되며 kernel.org에서 download할 수 있다.
Linux-next는 kernel development process의 필수 요소가 되었다. 특정 merge window에 들어갈 모든 patch는 window가 열리기 어느 정도 전에 linux-next에 들어가 있어야 한다.
drivers/staging은 mainline driver로 가는 중간 단계
311-337Kernel source tree의 drivers/staging/에는 kernel tree에 추가되는 과정에 있는 driver나 filesystem의 subdirectory가 많이 있다. 더 많은 작업이 필요한 동안 staging에 머물고 완성되면 kernel proper 위치로 이동할 수 있다. Linux coding 또는 quality standard에 아직 미치지 못하지만 사용자가 이용하고 개발을 추적할 가치가 있는 driver를 관리하는 방법이다.
원문 작성 당시 Greg Kroah-Hartman이 staging tree를 유지한다. 작업이 더 필요한 driver는 drivers/staging/ 아래 독립 subdirectory로 보내며 source file과 함께 TODO file을 둬야 한다. TODO에는 kernel proper acceptance에 필요한 작업과 그 driver patch에 Cc해야 할 사람 목록을 적는다. 최소한 compile에 성공해야 staging에 기여할 수 있다.
Staging은 새 driver를 mainline에 비교적 쉽게 넣어 다른 developer의 관심과 개선을 얻는 경로가 될 수 있다. 하지만 staging 진입이 끝은 아니다. 정기적으로 발전하지 않는 code는 결국 제거된다. Distribution도 staging driver enable에 소극적인 편이다. 따라서 staging은 proper mainline driver가 되는 길의 중간 정거장일 뿐이다.
Git, Mercurial과 Quilt
340-384Kernel development는 patch collection을 여러 방향으로 이동시키는 능력에 크게 의존하므로 강력한 도구가 없으면 현재처럼 작동할 수 없다. 이 문서는 tutorial까지 다루지 않고 주요 도구를 소개한다.
Kernel community에서 압도적으로 많이 사용하는 source code management system은 Git이다. Free software community에서 개발된 distributed version control system 중 하나이며 큰 repository와 많은 patch를 효율적으로 처리해 kernel development에 잘 맞는다. 배우고 사용하기 어렵다는 평판이 있지만 계속 개선되었다. 자신의 작업에 Git을 쓰지 않더라도 다른 developer와 mainline의 변화를 따라가려면 Git 지식이 거의 필수다.
Git을 사용하지 않는 kernel developer 사이에서는 Mercurial이 가장 흔한 선택이다. Git과 많은 기능을 공유하지만 더 쉽게 느끼는 사람이 많은 interface를 제공한다.
Quilt는 source code management system이 아니라 patch management system이다. 시간에 따른 전체 history를 추적하지 않고 변화하는 code base에 대한 특정 변경 집합을 관리한다. 일부 major subsystem maintainer가 upstream용 patch를 관리하는 데 사용하며 -mm 같은 특정 종류 tree에는 가장 알맞은 도구다.
Mailing list에서 일하는 방법
387-454Linux kernel 개발 작업의 많은 부분이 mailing list에서 이루어진다. 하나 이상의 list에 참여하지 않고 community의 온전한 구성원으로 활동하기는 어렵다. 동시에 많은 mail에 파묻히거나 list convention을 어길 위험도 있다.
대부분 kernel mailing list는 kernel.org에서 host하지만 다른 곳의 list도 있으므로 특정 subsystem에 맞는 list는 MAINTAINERS file에서 확인한다. Core list인 linux-kernel은 하루 500 message에 이를 수 있고 noise가 많으며 대화는 매우 기술적이고 항상 친절하지는 않다. 그래도 전체 kernel community가 한자리에 모이는 유일한 곳이라 피하면 중요한 정보를 놓친다.
- Main mailbox가 아닌 별도 folder로 list mail을 받는다. 일정 기간 stream을 무시할 수 있어야 한다.
- 모든 대화를 따라가려 하지 않는다. 관심 topic과 참여자를 함께 filter한다. 긴 thread가 subject를 바꾸지 않은 채 원래 topic에서 벗어날 수 있음에 유의한다.
- 분노를 유도하는 사람에게 반응하지 말고 무시한다.
- Reply할 때 관련된 모든 사람의 Cc header를 보존한다. 명시적 요청 같은 강한 이유가 없으면 recipient를 제거하지 않으며 답하는 상대도 Cc에 있는지 확인한다.
- 질문 전에 list archive와 전체 web을 검색한다. 사전 조사를 하지 않은 질문에 개발자는 인내심을 잃을 수 있다.
- Top-posting을 피하고 인용문 사이에 답을 넣는 interleaved 또는 inline reply를 사용한다. 자세한 내용은 Documentation/process/submitting-patches.rst의 interleaved_replies 절을 본다.
- 정확한 mailing list에서 질문한다. linux-kernel은 전체 meeting point지만 모든 subsystem developer를 찾기 가장 좋은 곳은 아니다.
초보자가 흔히 틀리는 부분은 올바른 list를 찾는 일이다. Networking 질문을 linux-kernel에 올리면 대부분 networking developer가 있는 netdev에서 질문하라는 안내를 받을 가능성이 높다. SCSI, video4linux, IDE, filesystem 등에도 별도 list가 있으며 kernel source의 MAINTAINERS가 가장 좋은 출발점이다.
Kernel 개발을 시작하는 현실적인 방법
457-499개인과 회사 모두 kernel development를 어떻게 시작할지 자주 묻고, 관계의 시작을 불필요하게 어렵게 만드는 실수도 흔하다.
회사는 개발 group을 시작하기 위해 유명 developer를 채용하곤 한다. 효과적일 수 있지만 비용이 많이 들고 경험 있는 kernel developer pool을 늘리는 데에는 크게 기여하지 않는다. 시간을 투자하면 사내 developer도 Linux kernel development를 익힐 수 있다. 그러면 kernel과 회사 사정을 모두 이해하고 다른 사람까지 교육할 수 있는 group이 생기므로 중기적으로 더 이익인 경우가 많다.
개인 developer는 시작점을 찾기 어렵다. 큰 project는 부담스러워 spelling error나 사소한 coding style issue를 고치는 patch로 시험해 보고 싶을 수 있다. 하지만 이런 patch는 community 전체를 산만하게 하는 noise를 만들기 때문에 점점 좋지 않게 평가된다. Community에 자신을 소개하려는 새 developer가 원하는 반응을 얻기 어려운 방법이다.
Andrew Morton은 모든 kernel 초보자의 첫 번째 project는 손에 넣을 수 있는 모든 machine에서 kernel이 항상 완벽히 동작하도록 만드는 일이어야 한다고 조언한다. 보통 다른 사람과 협력해 문제를 고쳐야 하고 끈기가 필요할 수 있지만, 그것 자체가 kernel development의 일부다.
당장 명확한 문제를 찾지 못했다면 current regression 목록과 일반 open bug를 살펴보는 것이 좋다. 고칠 issue는 항상 충분히 많으며, 이를 해결하면서 절차를 익히고 community의 신뢰도 쌓을 수 있다.
개발 절차가 필요한 이유
2.Process.rst:3-111990년대 초 Linux 커널 개발에는 비교적 적은 사용자와 개발자가 참여했고 절차도 느슨했다. 이후 사용자는 수백만 명으로 늘고 1년 동안 약 2,000명의 개발자가 참여하는 규모가 되면서, 개발이 원활하게 이어지도록 여러 절차를 발전시켜야 했다.
커널 개발에 효과적으로 참여하려면 단순히 코드를 작성하는 방법뿐 아니라 변경이 언제, 누구를 거쳐, 어떤 tree로 이동하는지를 이해해야 한다.