Participating in the kernel development...

42
Participating in the kernel development process (With a minimum of pain) Jonathan Corbet LWN.net [email protected]

Transcript of Participating in the kernel development...

Page 1: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Participating in the kernel development process

(With a minimum of pain)

Jonathan CorbetLWN.net

[email protected]

Page 2: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

What we'll talk about

An introduction to the kernel communityWhy be a part of it?The Kernel ReportLicensing, copyright, and lawyersSome overall principlesThe mechanics of kernel contributionHints 1: ProcessHints 2: CodeToolsConclusion

Page 3: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Questions?

Ask anytime!

Page 4: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

About your speaker

Kernel hacker since 1980Linux since 1993Co-founded LWN in 1998Co-author of Linux Device DriversMaintainer: cafe-ccic, ov7670, and via-camera

driversAuthor: Documentation/development-processKernel Summit program committee memberLinux Foundation Technical Advisory Board memberWorldwide speaker on Linux kernel topics

Page 5: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

What is the kernel?

Page 6: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment
Page 7: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

The kernel...Makes the hardware workManages processesEnforces securityCommunicates with other systemsImplements filesystems...

Page 8: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Page 9: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Page 10: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Page 11: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Performance is critical

Page 12: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Performance is criticalHigh degree of concurrency

Page 13: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Performance is criticalHigh degree of concurrencyWide range of target platforms

SupercomputersDesktopsTelephones

Page 14: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Performance is criticalHigh degree of concurrencyWide range of target platforms

SupercomputersDesktopsTelephones

Large, complex code base (>8M lines of code)

Page 15: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Kernel programming is unique

Low-level programming environment(No C library)

Failures are catastrophicDeath of process at the minimumSystem failure or security breach often results

Performance is criticalHigh degree of concurrencyWide range of target platforms

SupercomputersDesktopsTelephones

Large, complex code base (>8M lines of code)Huge, active development community

Page 16: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Developers contributing to each kernel release

Release Developers2.6.33 1,1502.6.34 1,1102.6.35 1,1882.6.36 1,1762.6.37 1,2762.6.38 1,136

Page 17: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

2.6.34 through 2.6.38-rc7(Feb 25, 2010 to March 6, 2011)

Four major kernel releases (+ one in progress)

49,100 distinct changes merged(131 changes/day, every day)

1.3 million lines added(3,475 lines per day)

2,826 developers involved

Page 18: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

About those 2,826 developers

...they work for 326 companies that we have been able to identify.

Page 19: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Who those developers work for

nobody 17.6%Red Hat 11.7%unknown 7.7%Intel 6.7%Novell 4.8%IBM 3.7%Nokia 2.3%Consultants 2.2%Texas Inst. 2.2%Oracle 1.7%AMD 1.6%

Samsung 1.5%academics 1.4%Fujitsu 1.4%Renesas Tech. 1.4%Pengutronix 1.3%Google 1.2%Broadcom 1.1%Atheros 1.1%Analog Devices 1.1%Wolfson Micro 1.0%New Dream Net 1.0%

Page 20: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment
Page 21: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

In other words

Over 75% of kernel patches come from people paid for their work

Page 22: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

In other words

Over 75% of kernel patches come from people paid for their work

Linux is not the product of kids working in their parents' basements

Page 23: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

In other words

Over 75% of kernel patches come from people paid for their work

Linux is not the product of kids working in their parents' basements

These companies have solid reasons for contributing to the kernel

Page 24: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

In other words

Over 75% of kernel patches come from people paid for their work

Linux is not the product of kids working in their parents' basements

These companies have solid reasons for contributing to the kernel

They have found ways to contribute successfully.

Page 25: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

One other note

Very few kernel developers do it full time

Page 26: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

If development projects are communities...

...the kernel is a large city

Page 27: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Getting around in the city is not hard

...once you know how it works.

Page 28: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

28

Otherwise...

“So, I've had enough. I'm out of here forever. I want to leave before I get so disgruntled that I end up using Windows. I may play occasionally with userspace code but for me the kernel is a black hole that I don't want to enter the event horizon of again”

-- Con Kolivas

Page 29: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

29

So why bother?

Page 30: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

30

Why?

The kernel is the core of a Linux system

Page 31: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

31

Why?

It's how you get the kernel to meet your needs

“Well, this is open source... you don't get to request new features, you get to implement them”

-- James Bottomley

Page 32: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

32

Why?

Out-of-tree code is lower quality code

Page 33: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

33

Why?

In-tree code can be improved by others

Page 34: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Why?

You'll make your users and customers happy

Page 35: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

35

Why?

Out-of-tree code is expensive

Page 36: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment
Page 37: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment
Page 38: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Google's code costs

300,000 lines of code1200 patches30 full-time kernel engineers

http://lwn.net/Articles/357658/

Page 39: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Why so expensive?

The kernel is a moving target

Duplicated workOften incompatible with in-tree solutions

Nobody will help you maintain out-of-tree code

No design guidance from the community

...

Page 40: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Fun

Page 41: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

41

Why?

That is how our community works

Page 42: Participating in the kernel development processlwn.net/images/pdf/google-class/00-introduction.pdfDesktops Telephones. Kernel programming is unique Low-level programming environment

Questions?