Linux之父Linus首次亮相香港都讲了啥?安全、Rust、AI 以及最重要的Kernel
2024年8月23日,在香港举行的 Linux 基金会的 OpenSource Summit China 大会上,Linus Torvalds 和他的好友 Dirk Hohndel(Verizon 开源项目办公室负责人)再次就 Linux 开发及相关议题进行了交流。笔者在此期间正好在度假,特别从三亚前往香港参加此次大会,结合一些媒体报道,做一篇分享。
首先是开场,中国开源爱好者看到Linus真人登场时还是很激动的,可以从下面的一段视频感受下:
用外媒的描述是:"在周五的早上,香港时间,一群维护者和开发者在一个挤满了人的礼堂中,做出了在中国文化中不常见的行为——当他们看到一个优雅的芬兰美国人上台时,他们大声欢呼表示赞同。"
因此,香港迎来了Linux之父Linus Torvalds,他在KubeCon和CloudNativeCon的活动上发表了演讲——尽管他承认自己是来参加这个活动中排名第三的会议:OpenSource Summit。当主持人特别欢迎他参加KubeCon时,他开玩笑说:“我之前不知道我是要来参加一个KubeCon。” 这是Linus第一次访问香港,但不是第一次访问中国。
当被问到在场的观众中,有多少人的年龄比Linux还要小时,大约三分之一的人举起了手。因此,对这部分人来说,Torvalds被视为一个传奇人物:是他们所热爱的行业的传奇人物。
像往常一样,两人讨论了 Linux 内核的现状及其未来。他们的对话特别涉及了Linux开发的多个方面,包括内核发布流程、安全性问题、Rust语言在Linux内核中的集成,以及人工智能在软件开发中所扮演的角色。
顺带一提:负责Linux内核安全的团队每周都会发布大约60个CVE(常见漏洞和暴露)信息,但大家不必过分担忧。
首先,Torvalds 遗憾地宣布,sched_ext,一种用于利用 eBPF 构建调度策略的可扩展调度器,将不会被包含在下一个 Linux 内核版本中。不过,他确实希望——他甚至敲了敲木头以示好运——它能在即将发布的 Linux 6.12 版本中出现。
在讨论未来版本时,Hohndel向Torvalds询问了关于Linux内核的发展计划。他特别提到,按照当前内核版本的发布频率,“Linux内核8.7可能会在你60岁生日时发布(笑),你对这个版本有什么期望呢?” Torvalds回答道:“我真的不知道。”
Torvalds接着解释说,他更注重短期目标。“真正的开发工作在于确保所有细节都正确无误。为此,你不会去考虑五年后的事情,而是关注接下来的一两个版本。”
I don't really have this policy; it's the details that really matter. We have big-picture ideas of where we want to go in the long range, but most of the real development is about getting all the details right. You don't look five years ahead for that. You look one or two releases ahead at most.
——Linus Torvalds原话
在最初阶段,Linux内核的开发过程非常混乱。Torvalds回忆说,当他最初提出不再每一年或两年发布一个大版本,而是每六周发布一个小版本时,大家都对此表示了嘲笑。
“Good code is good code, but I keep very strict rules on release management. So, if your code is not ready by the time the merge window opens, I will not take it, because I don't want the kind of pain that we had 20-plus years ago. So, today we have a very reliable release process, even if the individual features may not always be released when we would like them to be.”
——Linus Torvalds原话
此外,Hohndel指出,当涉及到修补非常古老的内核时,Linux内核团队可能只能表示:“很抱歉,我们无法为您提供帮助。那已经是很久以前的事情了,我们甚至不记得如何解决那个问题。”
随后,两位转向了一个更现代的话题,即关于Rust语言被引入Linux的情况,Torvalds对其采用速度感到失望。“我原本期望更新能更快进行,但部分问题在于资深的内核开发者习惯了C语言,对Rust并不熟悉。他们对于学习一种在某些方面截然不同的新语言并不感到兴奋。因此,对Rust的引入产生了一些阻力。”
The very slowly increased footprint of Rust has been a bit frustrating. I was expecting uptake to be faster, but part of it – a large part of it, admittedly – has been a lot of old-time kernel developers are so used to C and really don't know Rust, so they're not excited about having to learn a whole new language that is, in some respects, fairly different. So, there's been some pushback for that reason.
——Linus Torvalds原话
此外,Torvalds指出:“另一个原因是Rust的基础设施本身还不够稳定。”
Another reason has been the Rust infrastructure itself has not been super stable. So, in the last release I made, we finally got to the point where the Rust compiler that we can use for the kernel is the standard upstream Rust compiler, so we don't need to have extra version checks and things like that.
I'm hoping that we're over some of the initial problems, but it has taken us one or two years and we're not there yet.
——Linus Torvalds原话
总的来说,Torvalds对像云和Kubernetes这样的新技术并不特别关注,他说“唯一重要的就是内核。” Hohndel对此开玩笑说:“你这肯定会被人断章取义!”
Torvalds回应说,虽然他知道这些技术非常有用,但是“集群、云和Kubernetes对我来说并不是问题。开源的魅力在于每个人都可以专注于自己感兴趣的部分。”
One of the things that makes me enjoy open source so much is obviously just the community. Being involved and having lots of different people to communicate with, that's what really keeps me going. But the thing that makes it all practical is that people specialize in what they're interested in. So, when I say no, it's because it's just not my interest area. So, when it comes to things like Cloud, Kubernetes, or AI, to pick the hot topic of the day, I see myself as a kernel person who wants to support that, but I don't see myself as a person who is at all interested in the end result!
——Linus Torvalds原话
最后放几张和Linus的大合影照片~
(个人合影照片就不放文章里了,发我朋友圈了哈哈)