Compiler
Search documents
4000 万行的 Linux 内核怎么管?Linus 爆料:两周合并 1.2 万次提交、7 周专门抓 Bug
程序员的那些事· 2025-12-29 03:27
Core Viewpoint - Linus Torvalds emphasizes the importance of maintaining stability and backward compatibility in the Linux kernel, asserting that there are no shortcuts in the development process and that AI should be viewed as a tool rather than a revolutionary change in programming [2][4][25]. Group 1: Linux Kernel Development Process - The Linux kernel codebase has surpassed 40 million lines, with a release cycle of approximately 9 weeks, during which around 12,000 submissions are processed [2][14]. - During the merge window, Torvalds typically spends two weeks merging code and the following seven weeks identifying and fixing bugs, ensuring the kernel is in optimal condition before release [16][17]. - The principle of "no regressions" is strictly enforced, meaning that new code must not introduce bugs or break backward compatibility [3][23]. Group 2: Role of AI in Development - Torvalds expresses skepticism towards the hype surrounding AI, stating that while he dislikes the term, he recognizes the potential of AI as a valuable tool in code maintenance and review processes [25][26]. - AI tools are being explored to assist in code reviews and to prevent problematic code from being submitted, which could streamline the development workflow [26][27]. - The comparison is made between AI and the advent of compilers, suggesting that while AI may enhance efficiency, it is ultimately just another tool in the developer's toolkit [28][29]. Group 3: Challenges in Kernel Development - The difficulty of maintaining the "no regressions" rule is highlighted, as changes may not be immediately apparent and can lead to issues for users who upgrade to newer kernel versions [31][32]. - Developers often face the temptation to introduce new features that may disrupt existing functionality, complicating the maintenance of stability [33][34]. - Torvalds emphasizes the need for a careful balance between innovation and maintaining a reliable codebase, advocating for the use of new interfaces for new features while keeping old ones functional [34][35].