Kernel development: How things go wrong (And why you should - - PowerPoint PPT Presentation

kernel development how things go wrong
SMART_READER_LITE
LIVE PREVIEW

Kernel development: How things go wrong (And why you should - - PowerPoint PPT Presentation

Kernel development: How things go wrong (And why you should participate anyway) Jonathan Corbet LWN.net corbet@lwn.net Kernel development is a success ~5 releases/year > 10,000 changes/release > 1000 developers/release Linux is


slide-1
SLIDE 1

Kernel development: How things go wrong

(And why you should participate anyway) Jonathan Corbet LWN.net corbet@lwn.net

slide-2
SLIDE 2

Kernel development is a success

~5 releases/year > 10,000 changes/release > 1000 developers/release Linux is showing up in everything ...it works!

slide-3
SLIDE 3

Kernel development is a success

~5 releases/year > 10,000 changes/release > 1000 developers/release Linux is showing up in everything ...it works!

slide-4
SLIDE 4

So why talk about failure?

slide-5
SLIDE 5

High profile failures give the kernel a bad name.

slide-6
SLIDE 6

“A key Linux contributor has admitted the the developer community can be intimidating and hard to break into.”

slide-7
SLIDE 7

“A key Linux contributor has admitted the the developer community can be intimidating and hard to break into.” (Seen on slashdot - must be true)

slide-8
SLIDE 8

Failure can teach us things

slide-9
SLIDE 9

“It's fine to celebrate success, but it is more important to heed the lessons of failure.”

slide-10
SLIDE 10

“It's fine to celebrate success, but it is more important to heed the lessons of failure.”

  • -Bill Gates
slide-11
SLIDE 11

“A bridge, under its usual conditions of service, behaves simply as a relatively smooth level surface on which vehicles can move. Only when it has been

  • verloaded do we learn the physical

properties of the materials from which it is built.”

  • - Herbert Simon
slide-12
SLIDE 12

One note

The kernel community does not lack for clowns.

slide-13
SLIDE 13

One note

The kernel community does not lack for clowns. I am not talking about them.

slide-14
SLIDE 14

This talk will be naming names Every developer I name has my respect!

slide-15
SLIDE 15

“Hey, all my other theories made sense

  • too. They just didn't work. But as Edison

said: I didn't fail, I just found three other ways not to fix your bug.”

  • - Linus Torvalds
slide-16
SLIDE 16

Photo: fireflythegreat

slide-17
SLIDE 17

Tux3

A next-generation filesystem by Daniel Phillips

2008-07-23 Initial announcement 2008-11-25 Booting as root filesystem 2009-08-16 Last commit

slide-18
SLIDE 18

“Do NOT fall into the trap of adding more and more stuff to an out-of-tree project. It just makes it harder and harder to get it

  • merged. There are many examples of

this.”

  • - Andrew Morton
slide-19
SLIDE 19

Daniel kept adding features

...then lost interest

slide-20
SLIDE 20

“Anyway, Andrew Morton was right, we should have merged into mainline as soon as Tux3 was booting as root.”

  • - Daniel Phillips
slide-21
SLIDE 21

Lessons

Out-of-tree code is nearly invisible

Few users Few contributors Little momentum

slide-22
SLIDE 22

Photo: Team Traveller

slide-23
SLIDE 23

Lessons

Get it into the mainline early!

slide-24
SLIDE 24

em28xx

...a video4linux driver

2005-11-08 Initial driver merge ... 2008-01-05 Markus Rechberger's final em28xx patch 2008-11-02 Replacement patch rejected 2009-08-09 Markus's final kernel patch

slide-25
SLIDE 25

“Companies should be aware that if they try to submit any code to you they will loose the authority over _their_ work.”

  • - Markus Rechberger
slide-26
SLIDE 26

Another example

May, 2004

Hans Reiser tries to block the addition of new functionality to reiserfs.

slide-27
SLIDE 27

Lessons

Contributing means losing control Others will improve your code

slide-28
SLIDE 28

Photo: Yuliya Libkina

slide-29
SLIDE 29

“The fact is, maintainership does _not_ mean ownership. It means that you should be _responsible_ for the code, and you get credit for it, but if problems happen you do NOT “own” it. Not at all.”

  • - Linus Torvalds
slide-30
SLIDE 30

2.5.x IDE

2002-02-15 Martin Dalecki's first “IDE cleanup” patch 2002-03-08 IDE18, subsystem takeover 2002-08-09 IDE115 merged 2002-08-16 Martin quits, all IDE work reverted

slide-31
SLIDE 31

“Breakage is the price you have to pay for advancements”

  • - Martin Dalecki
slide-32
SLIDE 32

Lessons

Don't break things! Listen when people complain

slide-33
SLIDE 33

Deadline scheduler

Con Kolivas's scheduler rewrite

2007-03-04 First post 2007-03-05 Linus amenable to merging 2007-03-19 Linus gets irritated 2007-04-13 Molnar posts CFS 2007-07-10 CFS merged for 2.6.23 2007-07-25 Con leaves the kernel community

slide-34
SLIDE 34

“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.”

  • - Con Kolivas
slide-35
SLIDE 35

Lessons

Improve the kernel for everybody

...or at least don't make it worse

slide-36
SLIDE 36

Lessons

Some parts of the kernel are hard to change.

slide-37
SLIDE 37

Lessons

Participate in the wider discussion

  • ck list did not help
slide-38
SLIDE 38

Lessons

Aim for a solution to the problem

...rather than inclusion of specific code

slide-39
SLIDE 39

reiser4

2002-10-29 First code post 2003-07-24 2.6.0-test merge request 2004-08-19 Added to 2.6.8.1-mm2 2005-09-11 Push for 2.6.14 2006-07-20 Push for 2.6.19 2006-10-11 Hans Reiser arrested

slide-40
SLIDE 40

What were the problems?

Non-POSIX filesystem behavior Numerous technical difficulties Hard-to-reproduce benchmarks Antagonistic approach to others Memories of reiser3

slide-41
SLIDE 41

Lessons

Linux is not a research system

slide-42
SLIDE 42

Lessons

Visionary brilliance will not excuse a poor implementation

slide-43
SLIDE 43

Lessons

It's better not to accuse

  • thers of

conspiring against you

Photo: Rob!

slide-44
SLIDE 44

Lessons

The community remembers past actions

Developers also think far into the future

Photo: krupp

slide-45
SLIDE 45

SystemTap

2003-11 DTrace debuts 2005-10 RHEL4 introduces SystemTap 2008-07 FTrace merged 2009-06 Perf Events merged 2009-09-22 SystemTap 1.0 released ???? SystemTap merged

slide-46
SLIDE 46

2008 Kernel Summit

50% had tried to use SystemTap 20% succeeded

slide-47
SLIDE 47

“I thought everyone learned the lesson behind SystemTap's failure: when it comes to tooling/instrumentation we don't want to concentrate on the fancy complex setups and abstract requirements drawn up by CIOs as development isn't being done there. Concentrate on our developers today, and provide no-compromises usability to those who contribute stuff.”

  • - Ingo Molnar
slide-48
SLIDE 48

In other words...

If kernel developers don't see the value

...it won't go in.

slide-49
SLIDE 49

TALPA

Posted in August 2008

Never merged as such

The goal:

Provide hooks for virus scanners

slide-50
SLIDE 50

Problems with TALPA

Kernel developers disliked it

Why bother with broken security models?

Badly-expressed requirements

No threat model Solutions not needs

slide-51
SLIDE 51

fanotify

Merged in August, 2010 (2.6.36) Provides hooks for virus scanners

slide-52
SLIDE 52

What changed?

Featured a cleanup of file event notification

Replaced inotify and dnotify

Rephrased requirement:

“Enable virus scanners to hook into file

  • perations without using rootkit

techniques.”

slide-53
SLIDE 53

Lesson

Patches must be sold to developers

Not managers or customers

slide-54
SLIDE 54

Other examples

Android wakelocks Distributed storage TuxOnIce Wireless extensions CML2 msleep() Xen utrace ...

slide-55
SLIDE 55

Why bother?

slide-56
SLIDE 56

It's not as hard as it seems

slide-57
SLIDE 57

Fun!

Fun!

slide-58
SLIDE 58

A slightly elite club

“Well, you don't get to be a kernel hacker simply by looking good in speedos”

  • - Rusty Russell
slide-59
SLIDE 59

Jobs

If you show that you can get code into the kernel, you will get job offers.

slide-60
SLIDE 60

Influence

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

slide-61
SLIDE 61

“If we don't succeed we run the risk of failure”

  • - Dan Quayle
slide-62
SLIDE 62

Questions?