How Linux is built with Greg Kroah-Hartman
How Linux is built with Greg Kroah-HartmanGreg Kroah-Hartman, a longtime Linux kernel maintainer, breaks down the inner workings of Linux development, from its unique trust model to the benefits of open-source contribution.
Stream the Latest EpisodeListen and watch now on YouTube, Spotify and Apple. See the episode transcript at the top of this page, and a summary at the bottom. Brought to You By• WorkOS — The modern identity platform for B2B SaaS. • Vanta — Automate compliance and simplify security with Vanta. — In This EpisodeLinux is the most widespread operating system, globally – but how is it built? Few people are better to answer this than Greg Kroah-Hartman: a Linux kernel maintainer for 25 years, and one of the 3 Linux Kernel Foundation Fellows (the other two are Linus Torvalds and Shuah Khan). Greg manages the Linux kernel’s stable releases, and is a maintainer of multiple kernel subsystems. We cover the inner workings of Linux kernel development, exploring everything from how changes get implemented to why its community-driven approach produces such reliable software. Greg shares insights about the kernel's unique trust model and makes a case for why engineers should contribute to open-source projects. We go into:
Takeaways1. Linux is the most widespread operating system globally. Linux runs on 4 billion Android devices – compared to which everything else is “a rounding error”. Still, Linux is the most popular operating system for servers and embedded devices. It’s also used on many smart TVs, air traffic control systems, and even on the International Space Station. Fun fact: Linux even runs inside many iPhones – as it is the firmware used for the Qualcomm 5G modems inside these devices! 2. Getting a change merged into the Linux kernel is surprisingly straightforward. Create the change (called a patch), test it locally, and send it to the right maintainer for review. The patch needs to go through a hierarchical tree of maintainers accepting it before it can make it into the kernel. We go through a specific change being merged up this tree. 3. Linux won because devs being “selfish” works! Developers contribute to Linux in a "selfish" way to solve their own problems. But turns out, many devs have the same problems: so every contribution makes Linux a better fit for other devs to use! Kernel maintainers only accept contributions that make sense for the whole project. For example, embedded device vendors helped make the Linux kernel more efficient. This efficiency later greatly helped Linux become the best choice for mobile OS on Android. 4. The Linux kernel is run in a very unique way – because the project is unique. The Linux kernel has 4,000 contributors per year, releases strictly every 9 weeks – and yet has practically no meetings, no project managers and uses email and git. This setup works because project management happens outside of the Linux kernel: contributors bring completed work. Also, the kernel team invests heavily in automation for e.g. triaging. And turns out, email scales really well – for this group, that is! (Note that other projects built on top of the Linux kernel – such as Linux distributions like Red Hat or Debian – all work differently. What works for the Linux kernel thanks to unique circumstances, won’t work for those projects). 5. Git was created as a solution for the Linux kernel’s source control needs. We talked about this story with Greg outside the podcast: it’s a fascinating story about how git was built and open-sourced after the Linux kernel group was unhappy with existing source control solutions. In what is amusing: git has become the de facto source control product across tech thanks to products like GitHub and GitLab. The Linux kernel does not use GitHub – don’t forget, they already solved their source control workflow problems by writing git! The Pragmatic Engineer deepdives relevant for this episodeTimestamps(00:00) Intro (02:23) How widespread is Linux? (06:00) The difference in complexity in different devices powered by Linux (09:20) What is the Linux kernel? (14:00) Why trust is so important with the Linux kernel development (16:02) A walk-through of a kernel change (23:20) How Linux kernel development cycles work (29:55) The testing process at Kernel and Kernel CI (31:55) A case for the open source development process (35:44) Linux kernel branches: Stable vs. development (38:32) Challenges of maintaining older Linux code (40:30) How Linux handles bug fixes (44:40) The range of work Linux kernel engineers do (48:33) Greg’s review process and its parallels with Uber’s RFC process (51:48) Linux kernel within companies like IBM (53:52) Why Linux is so widespread (56:50) How Linux Kernel Institute runs without product managers (1:02:01) The pros and cons of using Rust in Linux kernel (1:09:55) How LLMs are utilized in bug fixes and coding in Linux (1:12:13) The value of contributing to the Linux kernel or any open-source project (1:16:40) Rapid fire round A summary of the conversationThe Linux kernel
Linux kernel development process
QA and stable releases
Contributors
Rust support?
Why contribute to Linux, and how?
Where to find Greg Kroah-Hartman: • Social: https://social.kernel.org/gregkh • Website: http://www.kroah.com/log/about/ Mentions during the episode: • Linux Kernel Foundation: https://www.linuxkernelfoundation.com/ • International Space Station: https://www.nasa.gov/international-space-station/ • Raspberry Pi: https://www.raspberrypi.com/ • GitHub: https://github.com/ • Kernel CI: https://kernelci.org/ • Linus Torvalds on LinkedIn: https://www.linkedin.com/in/linustorvalds/ • Engineering Planning with RFCs, Design Documents and ADRs: https://newsletter.pragmaticengineer.com/p/rfcs-and-design-docs • A guide to the Kernel Development Process: https://docs.kernel.org/process/development-process.html • Rust: https://www.rust-lang.org/ • The Linux Kernel Maintainer Summit: https://events.linuxfoundation.org/linux-kernel-maintainer-summit/ • Linux Braille Console: https://www.kernel.org/doc/html/v4.16/admin-guide/braille-console.html • Code Complete: A Practical Handbook of Software Construction: https://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670 • Kernel Newbies: https://kernelnewbies.org/ — Production and marketing by Pen Name. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com. You’re on the free list for The Pragmatic Engineer. For the full experience, become a paying subscriber. Many readers expense this newsletter within their company’s training/learning/development budget. This post is public, so feel free to share and forward it. If you enjoyed this post, you might enjoy my book, The Software Engineer's Guidebook. Here is what Tanya Reilly, senior principal engineer and author of The Staff Engineer's Path said about it:
|
Comments
Post a Comment