The Pragmatic Engineer

How Linux is built with Greg Kroah-Hartman

· Summarized

Share this episode
Anyone with this link can open it.
Share Link
Start at 0:00

Key takeaways

  • Linux is the most widely used operating system globally, operating in countless devices, from Android phones to embedded systems.
  • The kernel is a complex yet cohesive unit, comprised of approximately 40 million lines of code, managing device interactions and memory.
  • Linux development operates on a strict nine-week cycle, ensuring timely updates and a clear workflow for incorporating new features and fixes.
  • Trust among developers is foundational within the Linux community, facilitating collaborative contributions and maintenance.
  • Contributing to open source projects like Linux builds valuable skills, enhances credibility, and can significantly boost career development.
  • Both Rust and AI tools represent the future of Linux, with a focus on enhancing safety and efficiency in the development process.

Summary

The Ubiquity of Linux

Linux operates as the backbone of numerous devices, including Android phones, servers, embedded systems, and even air traffic control systems. With four billion Linux users globally, the platform's reach extends beyond what most people realize. Greg discusses the broad impact Linux has and its critical role in various industries, highlighting its status as the world's most widely used operating system.

Understanding the Linux Kernel

The Linux kernel serves as a monolithic core that interacts with hardware and provides services to user space applications. Greg explains how the kernel functions, underscoring its complexity, with around 40 million lines of code. He details how Linux's design supports various hardware through drivers while ensuring a consistent interface for software developers to work with. Greg clarifies the kernel's role compared to user space and how it is primarily responsible for memory management and device communication.

Linux Development Workflow

Linux development follows a nine-week release cycle. During the first two weeks, new features are merged, and for the remaining seven weeks, only bug fixes are allowed. The episode dives into the hierarchy within the Linux development community where maintainers oversee various subsystems and the communication model relies heavily on email exchanges. Greg walks through the process of how a patch progresses from an initial contributor to final inclusion in the kernel.

Dynamic Collaboration and Trust at Linux

One of the most intriguing aspects of Linux's development is the trust model that fosters collaboration among thousands of contributors across organizations. Greg describes how maintainers trust the developers from whom they accept patches, and the dynamics of human interaction play a critical role in quality assurance.

Career Development Through Open Source Contribution

Greg underscores the professional advantages of contributing to open source, citing the credibility it builds when job hunting. Contributions demonstrate an engineer's ability to collaborate, work with existing code bases, and gain exposure to top-tier talents in the field. He encourages listeners to participate in the Linux community, emphasizing the learning opportunities it presents and the potential career benefits.

The Future of Linux: Incorporating Rust and AI Tools

The episode concludes with discussions on innovation within Linux development, especially the possibility of integrating Rust into the kernel. While C remains the primary language, Greg acknowledges that Rust is gradually making its way into the kernel for better memory safety. He also touches on AI tools like Large Language Models (LLMs) assisting in the coding and bug-fixing processes.

Sponsors

  • WorkOS · If you're building a SaaS app, at some point, your customers will start asking for enterprise features like Samo Hub vacation, skin provisioning, and find great authorization. That's where WorkOS comes in, making it fast and painless to add enterprise features to your app.
  • Vanta · Vanta can help you start your security program by connecting with auditors and experts to conduct your audit and set up your security program quickly. Plus with automation and AI throughout the platform, Vanta gives your time back, so you can focus on building your company.

Show notes

Supported by Our Partners

• WorkOS — The modern identity platform for B2B SaaS.

• Vanta — Automate compliance and simplify security with Vanta.

—

Linux 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:

• How widespread is Linux?

• What is the Linux kernel responsible for – and why is it a monolith?

• How does a kernel change get merged? A walkthrough

• The 9-week development cycle for the Linux kernel

• Testing the Linux kernel

• Why is Linux so widespread?

• The career benefits of open-source contribution

• And much more!

—

Timestamps

(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

—

The Pragmatic Engineer deepdives relevant for this episode:

What TPMs do and what software engineers can learn from them

The past and future of modern backend practices

Backstage: an open-source developer portal

—

See the transcript and other references from the episode at ⁠⁠https://newsletter.pragmaticengineer.com/podcast⁠⁠

—

Production and marketing by ⁠⁠⁠⁠⁠⁠⁠⁠https://penname.co/⁠⁠⁠⁠⁠⁠⁠⁠. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.



Get full access to The Pragmatic Engineer at newsletter.pragmaticengineer.com/subscribe

Follow this show on AudioBrevity and new episodes get summarized for you. Create a free account

Couldn't load the audio. A blocker may be stopping the show's tracking links. Open the file