A recent restructuring of source files for the sched_ext subsystem highlights the Linux kernel's firm stance on code maintainability. The reorganization was prompted by direct criticism from Linus Torvalds regarding the file layout for a major patchset merged for Linux 7.2.
The sched_ext framework allows user-space BPF programs to implement custom scheduling policies. While Torvalds did not object to the technical features, he was sharply critical of how the new C source files were arranged. In a public comment on the submission, he wrote, "please don't do this disgusting thing...proper hierarchical filesystems have been available since 1965."
The complaint was not about the scheduler's functionality but about adhering to the kernel's established conventions for code organization. For a project of the Linux kernel's scale, a logical, hierarchical file structure is a fundamental requirement for navigation and long-term maintainability. An ad-hoc layout creates friction for developers and sets a negative precedent.
In response, the sched_ext maintainers separated the work of fixing the structural issues from the ongoing functional development. This approach allowed them to resolve the organizational concern efficiently without delaying work on features like sub-scheduler support.
This incident demonstrates a key governance function in large open-source projects: the active enforcement of coding standards. Torvalds' intervention, while blunt, served to protect the project's long-term health by preventing the erosion of critical conventions. For major collaborative software, the organization of code is as vital as its function.
The episode also showcases a mature process for incorporating feedback. The developers acknowledged the architectural problem and addressed it independently of their feature work, providing a model for handling direct critique from project leadership.
For IT professionals and contributors, the lesson is clear: code structure is a core engineering discipline. Enforcing explicit guidelines for organization is essential for scalability and maintainability in projects of any size, a principle that applies well beyond the kernel.
近期針對排程器子系統的源碼檔案重組,突顯了Linux核心對代碼可維護性的堅定立場。此次調整源於Linus Torvalds對一個已併入Linux 7.2版本主要補丁集的檔案佈局所提出的直接批評。
sched_ext框架允許用戶空間的BPF程序實現自訂排程策略。儘管Torvalds未反對其技術功能,但他嚴厲批評了新增C源碼檔案的組織方式。他在提交代碼的公開評論中寫道:「請勿執行這種令人作嘔的行為……自1965年起,合乎層級結構的檔案系統便已存在。」
這項投訴並非針對排程器的功能,而是關於遵循核心既定的代碼組織規範。對於Linux核心這類規模的項目而言,合乎邏輯的層級式檔案結構是確保導航效率與長期可維護性的基本要求。臨時性佈局會增加開發者負擔,並開下不良先例。
作為回應,sched_ext維護者將結構問題的修復工作與持續進行的功能開發分離。此做法使他們能高效解決組織架構疑慮,同時避免延遲如子排程器支援等功能的開發進程。
此事件展示了大型開源項目中的一項關鍵治理功能:對編碼標準的積極落實。Torvalds的干預雖然直率,卻透過防止關鍵規範的弱化,守護了項目的長遠健康。對於重要的協作型軟件而言,代碼組織與其功能同樣至關重要。
此插曲亦展現了接納回饋的成熟流程。開發者承認架構問題,並獨立於功能開發工作之外予以處理,為回應項目領導層的直接批評提供了範本。
對IT專業人員及貢獻者而言,啟示清晰:代碼結構是核心工程學科。落實明確的組織規範,對於任何規模項目的可擴展性與可維護性皆至關重要——這項原則的適用範圍遠超出核心本身。
