Linux Kernel
Search documents
4000万行的Linux怎么管?Linus爆料:两周合并1.2万次提交、7周专门抓Bug,“我不是世界之王,只能给内核定规矩”
猿大侠· 2026-01-04 04:11
整理 | 屠敏 出品 | CSDN(ID:CSDNnews) 今年年初,Linux 内核的代码行数突破了 4000 万行。而作为这个庞大项目的掌舵者,Linus Torvalds 对外宣称自己"已经不再是程序员"、"不再编 程"了,那么,他在整个项目中到底负责什么?又是如何把控、维护这个项目的?他会用 AI 来做内核工作吗? 近日, Linus Torvalds 出席了 Linux 基金会在日本举办的开源峰会,与 Verizon 开源项目办公室负责人 Dirk Hohndel 展开了第 29 次对谈( https://www.youtube.com/watch?v=yEzdHYjY_RU )。其二人聊到了 Linux 内核维护的高密度节奏、合并窗口期的挑战,以及 AI 在代码中可能扮演的角 色。 Linus 表示,在 Linux 内核的世界里,没有捷径可走,他们每 9 周发布一个版本,一个合并窗口期里,自己 通常要处理大约 12,000 次提交 ,算上合 并后的提交大约在 11,000 到 13,000 次之间。其中,他会花两周时间用来合并代码,接下来的七周则用于查找并修复 bug。 值得关注的是,Linux ...
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].
5 年了!Rust 终于在 Linux 内核中“转正”了
程序员的那些事· 2025-12-18 01:41
Core Viewpoint - The introduction of Rust into the Linux kernel has transitioned from an experimental phase to being recognized as a long-term component, marking a significant shift in the kernel's development approach [2][6]. Group 1: Historical Context and Development - The Rust for Linux project began in 2020, aiming to assess whether Rust could justify the additional complexity it brings to kernel development [4]. - Initially, Rust code was limited and marked as "experimental," indicating a cautious approach to its integration into the kernel [4]. Group 2: Key Developments and Milestones - Over 20,000 lines of Rust code have been merged into the Linux upstream kernel since 2022, indicating a shift from mere proof of concept to real engineering progress [5]. - Rust-written kernel drivers are now running in real-world environments, such as in Google Pixel devices, demonstrating Rust's practical safety benefits [5]. - The ecosystem around Rust in the kernel is maturing, with foundational libraries and tools being developed, making it more accessible for developers [5]. Group 3: Official Recognition and Future Directions - The "experimental phase" of Rust support in the Linux kernel was officially declared over at the 2025 Linux Kernel Maintainers Summit, signaling a commitment to its long-term use [6]. - Despite the end of the experimental phase, significant work remains to adapt Rust for various architectures and configurations within the kernel [6]. - The transition to Rust is seen as a long-term investment, encouraging companies and hardware manufacturers to consider Rust for future driver development [8]. Group 4: Coexistence with C - The Linux kernel will continue to primarily use C, but the focus has shifted to how Rust can coexist and complement C within the kernel [9].