SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
Linux Device Drivers 
Sarah Sharp 
Dec 6, 2014
Sarah Sharp 
● USB 3.0 host controller driver author 
● Linux kernel developer for 9 years 
● Worked in Intel's Open Source 
Technology Center (OTC) for 7 years 
● Driver maintainer for 5 years
How did I get into 
open source? 
● Didn't program until college 
● Portland State University 
● My boyfriend introduced me to 
– open source, Linux, rockets
Portland State Aerospace Society
Rockets and Open Source
How did I get into 
Linux kernel development? 
● Professor Bart Massey 
introduced me to 
– The local Linux kernel community 
– Greg Kroah-Hartman 
● Greg suggested usbfs2 project 
● Bart helped me get: 
– College credit for kernel project 
– Intel undergraduate research grant
How did I get a 
job in open source? 
● Bart encouraged me to present at 
OSCON on usbfs2 
● Kristin Accardi was on 
OSCON paper selection 
committee 
● Through network 
(Bart → Greg → Kristen) 
I got a job
Sarah Sharp: Linux kernel 
USB 3.0 driver developer 
● Hired by Intel in July 2007 
● USB 3.0 specification draft 
● FPGA prototypes 
● Driver merged in April 2009
What is it like to be a 
Linux kernel developer? 
● very tight-knit group, very slow turn over 
● 80% of kernel developers are paid 
● 20% are volunteers and students 
● all work done through mailing lists 
● a few IRC channels 
● rarely get together in person
Linux kernel subsystems 
● Many different parts of the kernel 
● Broken into subsystems 
● Each has a maintainer 
● Most have a mailing list 
● MAINTAINERS file 
● scripts/get_maintainer.pl
What Do 
Subsystem Maintainers Do? 
● Experts in their particular field 
● Usually 5-20 years of experience 
● Approve changes to their area 
● Often have 1-4 sub-maintainers 
● This is how Linux scales trust
Intel 
Linux Kernel Maintainers 
● ACPI - Rafael Wysocki, Zhang Rui 
● Bluetooth - Marcel Holtmann 
● NFC - Samuel Ortiz 
● USB 3.0 - Mathias Nyman 
● Intel graphics - Daniel Vetter 
● EFI - Matt Fleming 
● x86 - H. Peter Anvin, Peter Z 
● RAS, machine check - Tony Luck 
● Code ellision - Andi Kleen 
● NVMe - Matthew Wilcox 
● IOMMU - Dave Woodhouse 
● Temperature - Fenghua Yu 
● DMA offload - Vinod Koul 
● Wimax - Inaky Perez-Gonzalez 
● Intel wifi - Johannes Berg 
● Intel idle - Len Brown 
● Intel ethernet - Jeff Kirsher, Jesse 
Brandeburg, Carolyn Wyborny 
● Intel C600 SAS, IOAT - Dan 
Williams 
● Serial, GMA500/600/3600, misc - 
Alan Cox
What is Being a 
Linux Kernel Maintainer Like? 
● Hundreds of emails a day 
● 1:Many relationship with 
contributors 
● Rapid development cycle 
● Looking at long-term health 
of the project 
● Maintains code for 3 - 20 years 
● Reputation is on the line for 
each patch
“Meritocracy” 
● Maintainers are vested 
● Developers will come and go 
● Long-standing contributors gain trust 
● Easier for them to do complex things 
● Harder for newcomers
Community Trust and 
Social Engineering 
● Build a trust relationship with maintainers 
– Review patches 
– Ask intelligent questions 
– Submit small bug fixes 
● Learn community norms 
– Email format 
– Coding style 
– Testing
Tips for 
Asking Intelligent Questions 
● Always Cc the maintainer 
● Do your research 
● Document where you looked 
● Be concise and precise 
● Ask a question you know the 
answer to, then one you don't
Tips for 
Bug Reporting 
● Always Cc the maintainer 
● System information is crucial 
– What hardware? 
– What kernel, what distro 
– 32-bit vs 64-bit 
– lspci, lsusb, acpidump 
● Reproducibility thinking 
● Be responsive 
● Hold onto hardware
Linux Kernel 
Quality Assurance 
● Regressions are not tolerated 
● Buggy new code is fixed or reverted 
● Shifting towards static analysis tools 
– sparse, smatch, Coccinelle 
● 0-day testing infrastructure 
● kselftest
Getting into Linux kernel 
development 
● Read the code, review other people's patches 
● Participate and ask questions on the mailing list 
● First patch tutorial 
– http://kernelnewbies.org/FirstKernelPatch 
● Staging cleanup patches 
– http://kernelnewbies.org/CheckpatchTips 
● Linux kernel exercises 
– http://eudyptula-challenge.org/
Leveling Up in 
Linux Kernel Development 
● Larger patchsets 
● Use complex tools (sparse, Coccinelle) 
● Find an area you're passionate about 
● Look for todos, bugzilla entries 
● Before starting a large task: 
– Always ask the maintainer 
– build trust with the maintainer
Tips for Code Review 
● Keep a list of the feedback 
● Address ALL feedback in revisions 
● Track changes in your cover letter 
● If you disagree with a maintainer, 
back yourself up with facts 
● Maintainers don't care about your deadline 
● Code must be complete and clean 
● Duplicate code or drivers won't be accepted
More Linux Kernel Resources 
● Linux Device Drivers book: 
http://lwn.net/Kernel/LDD3 
● Linux Device Driver tutorial: 
https://github.com/gregkh/kernel-tutorial 
● FOSS Outreach Program for Women (OPW) 
(paid open source and Linux kernel internships) 
http://gnome.org/opw
Photo Attribution 
● Tux: 
http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/NewTux.svg/400px- 
NewTux.svg.png 
● Jamey and Sarah Sharp: https://www.flickr.com/photos/igalko/7570033604 
● Sarah Sharp and PSAS photos CC BY-SA-NC Sarah Sharp 
● Bart Massey: https://www.flickr.com/photos/reidab/9326868060 
● OSCON sign: https://www.flickr.com/photos/kubina/912778997 
● USB 3.0 host PCI card: https://www.flickr.com/photos/hades2k/9069181710 
● Logitech webcam: https://www.flickr.com/photos/bshunrichs/162199777 
● Greg Kroah-Hartman: https://www.flickr.com/photos/tian2992/6208491794 
● David Brownell: 
https://www.flickr.com/photos/13825348@N03/sets/72157608741347102/detail/
Photo Attribution 
● Computer guts: https://www.flickr.com/photos/orijinal/4832982682 
● Kernel Summit: https://www.flickr.com/photos/linuxfoundation/2987611750 
● Mail: 
https://www.flickr.com/photos/donebythehandsofabrokenartist/1502717818 
9 
● Nerd merit badge: https://www.flickr.com/photos/momentum/4203541703 
● Trust: https://www.flickr.com/photos/dobs/10726756606 
● Question: https://www.flickr.com/photos/marcobellucci/3534516458 
● Bug: https://www.flickr.com/photos/103499652@N04/14232715868 
● Quality: https://www.flickr.com/photos/dieselbug2007/414348333 
● Editing: https://www.flickr.com/photos/nics_events/2349631515

Contenu connexe

Tendances

Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoSherif Mousa
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixSherif Mousa
 
Towards a Census of Free and Open Source Licenses
Towards a Census of Free and Open Source LicensesTowards a Census of Free and Open Source Licenses
Towards a Census of Free and Open Source Licensesdmgerman
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
What is Linux, Ubuntu and Open Source?
What is Linux, Ubuntu and Open Source?What is Linux, Ubuntu and Open Source?
What is Linux, Ubuntu and Open Source?Jose Kont
 
Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel DevelopmentPriyank Kapadia
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingDonnie Berkholz
 
Linux Simple Introduction
Linux Simple IntroductionLinux Simple Introduction
Linux Simple IntroductionJohnMihaya
 

Tendances (20)

Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
linux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrixlinux minimal os tutorial - by shatrix
linux minimal os tutorial - by shatrix
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Towards a Census of Free and Open Source Licenses
Towards a Census of Free and Open Source LicensesTowards a Census of Free and Open Source Licenses
Towards a Census of Free and Open Source Licenses
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
What is Linux, Ubuntu and Open Source?
What is Linux, Ubuntu and Open Source?What is Linux, Ubuntu and Open Source?
What is Linux, Ubuntu and Open Source?
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel Development
 
Linux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platformLinux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platform
 
Embedded Linux - Building toolchain
Embedded Linux - Building toolchainEmbedded Linux - Building toolchain
Embedded Linux - Building toolchain
 
GNU Linux Introduction
GNU Linux IntroductionGNU Linux Introduction
GNU Linux Introduction
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Gentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile EverythingGentoo Linux, or Why in the World You Should Compile Everything
Gentoo Linux, or Why in the World You Should Compile Everything
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
Making Gentoo Tick
Making Gentoo TickMaking Gentoo Tick
Making Gentoo Tick
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
Linux Simple Introduction
Linux Simple IntroductionLinux Simple Introduction
Linux Simple Introduction
 
Linux Kernel - An Engineering marvel
Linux Kernel - An Engineering marvelLinux Kernel - An Engineering marvel
Linux Kernel - An Engineering marvel
 
Eclipse - Installation and quick start guide
Eclipse - Installation and quick start guideEclipse - Installation and quick start guide
Eclipse - Installation and quick start guide
 

En vedette

Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modulesdibyajyotig
 
LCA13: Why I Don't Want Your Code
LCA13: Why I Don't Want Your CodeLCA13: Why I Don't Want Your Code
LCA13: Why I Don't Want Your CodeLinaro
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Toursamrat das
 
OpenStack for Beginners
OpenStack for BeginnersOpenStack for Beginners
OpenStack for BeginnersJesse Proudman
 
Linux Kernel Input: mouse, teclado, joystick
Linux Kernel Input: mouse, teclado, joystickLinux Kernel Input: mouse, teclado, joystick
Linux Kernel Input: mouse, teclado, joystickMarcos Paulo de Souza
 
Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009James Morris
 
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...Anne Nicolas
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelAnne Nicolas
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionHemanth Venkatesh
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semSagun Baijal
 
Linux kernel code
Linux kernel codeLinux kernel code
Linux kernel codeGanesh Naik
 
Linuxdd[1]
Linuxdd[1]Linuxdd[1]
Linuxdd[1]mcganesh
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introductionvijay selva
 
Device Drivers in Linux
Device Drivers in LinuxDevice Drivers in Linux
Device Drivers in LinuxShreyas MM
 
brief intro to Linux device drivers
brief intro to Linux device driversbrief intro to Linux device drivers
brief intro to Linux device driversAlexandre Moreno
 
Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and CompilationBud Siddhisena
 
Raspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiRaspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiMohamed Abdallah
 

En vedette (20)

Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modules
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
LCA13: Why I Don't Want Your Code
LCA13: Why I Don't Want Your CodeLCA13: Why I Don't Want Your Code
LCA13: Why I Don't Want Your Code
 
Linux Kernel Tour
Linux Kernel TourLinux Kernel Tour
Linux Kernel Tour
 
Linux device drivers
Linux device driversLinux device drivers
Linux device drivers
 
OpenStack for Beginners
OpenStack for BeginnersOpenStack for Beginners
OpenStack for Beginners
 
Linux Kernel Input: mouse, teclado, joystick
Linux Kernel Input: mouse, teclado, joystickLinux Kernel Input: mouse, teclado, joystick
Linux Kernel Input: mouse, teclado, joystick
 
Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009Linux Kernel Security Overview - KCA 2009
Linux Kernel Security Overview - KCA 2009
 
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...
Kernel Recipes 2014 - The Linux Kernel, how fast it is developed and how we s...
 
Kernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernelKernel Recipes 2013 - ARM support in the Linux kernel
Kernel Recipes 2013 - ARM support in the Linux kernel
 
Linux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emptionLinux Device Driver parallelism using SMP and Kernel Pre-emption
Linux Device Driver parallelism using SMP and Kernel Pre-emption
 
Gnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-semGnubs-pres-foss-cdac-sem
Gnubs-pres-foss-cdac-sem
 
Linux kernel code
Linux kernel codeLinux kernel code
Linux kernel code
 
Linuxdd[1]
Linuxdd[1]Linuxdd[1]
Linuxdd[1]
 
Device drivers Introduction
Device drivers IntroductionDevice drivers Introduction
Device drivers Introduction
 
Device Drivers in Linux
Device Drivers in LinuxDevice Drivers in Linux
Device Drivers in Linux
 
brief intro to Linux device drivers
brief intro to Linux device driversbrief intro to Linux device drivers
brief intro to Linux device drivers
 
Kernel Configuration and Compilation
Kernel Configuration and CompilationKernel Configuration and Compilation
Kernel Configuration and Compilation
 
Raspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry PiRaspberry Pi - Lecture 6 Working on Raspberry Pi
Raspberry Pi - Lecture 6 Working on Raspberry Pi
 

Similaire à Linux Kernel Introduction

LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101Linaro
 
Upstreaming 1013
Upstreaming 1013Upstreaming 1013
Upstreaming 1013Linaro
 
LCA13: Upstreaming 101
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101Linaro
 
Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Linaro
 
BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101 BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101 Linaro
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...dmgerman
 
SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101Linaro
 
Building Better FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FBBuilding Better FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FBDavide Cavalca
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The UniversityDominique Cimafranca
 
Building Better FLOSS Community Relationships @ FB
Building Better  FLOSS Community Relationships @ FBBuilding Better  FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FBDavide Cavalca
 
Debian general presentation
Debian general presentationDebian general presentation
Debian general presentationDing Zhou
 
Ceph Day SF 2015 - Keynote
Ceph Day SF 2015 - Keynote Ceph Day SF 2015 - Keynote
Ceph Day SF 2015 - Keynote Ceph Community
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primerDrew Fustini
 
HKG15-901: Upstreaming 101
HKG15-901: Upstreaming 101HKG15-901: Upstreaming 101
HKG15-901: Upstreaming 101Linaro
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxplarsen67
 
Free and Open Source Sofware in the Herbarium
Free and Open Source Sofware  in the HerbariumFree and Open Source Sofware  in the Herbarium
Free and Open Source Sofware in the HerbariumVidyaratha Kissoon
 
RootStack - Devfactory
RootStack - DevfactoryRootStack - Devfactory
RootStack - DevfactoryKangaroot
 
Up and Running with Freebsd
Up and Running with FreebsdUp and Running with Freebsd
Up and Running with FreebsdGLC Networks
 

Similaire à Linux Kernel Introduction (20)

LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101
 
Upstreaming 1013
Upstreaming 1013Upstreaming 1013
Upstreaming 1013
 
LCA13: Upstreaming 101
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101
 
Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02Upstreaming 101 - SFO17-TR02
Upstreaming 101 - SFO17-TR02
 
BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101 BUD17-TR02: Upstreaming 101
BUD17-TR02: Upstreaming 101
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101
 
Building Better FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FBBuilding Better FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FB
 
Teaching Open Source In The University
Teaching Open Source In The UniversityTeaching Open Source In The University
Teaching Open Source In The University
 
Building Better FLOSS Community Relationships @ FB
Building Better  FLOSS Community Relationships @ FBBuilding Better  FLOSS Community Relationships @ FB
Building Better FLOSS Community Relationships @ FB
 
Debian general presentation
Debian general presentationDebian general presentation
Debian general presentation
 
Ceph Day SF 2015 - Keynote
Ceph Day SF 2015 - Keynote Ceph Day SF 2015 - Keynote
Ceph Day SF 2015 - Keynote
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primer
 
HKG15-901: Upstreaming 101
HKG15-901: Upstreaming 101HKG15-901: Upstreaming 101
HKG15-901: Upstreaming 101
 
Software maintenance PyConPL 2016
Software maintenance PyConPL 2016Software maintenance PyConPL 2016
Software maintenance PyConPL 2016
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Free and Open Source Sofware in the Herbarium
Free and Open Source Sofware  in the HerbariumFree and Open Source Sofware  in the Herbarium
Free and Open Source Sofware in the Herbarium
 
RootStack - Devfactory
RootStack - DevfactoryRootStack - Devfactory
RootStack - Devfactory
 
Up and Running with Freebsd
Up and Running with FreebsdUp and Running with Freebsd
Up and Running with Freebsd
 

Plus de Sage Sharp

Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome cultureSage Sharp
 
Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome cultureSage Sharp
 
Herding cats with django
Herding cats with djangoHerding cats with django
Herding cats with djangoSage Sharp
 
Open source 101 for students
Open source 101 for studentsOpen source 101 for students
Open source 101 for studentsSage Sharp
 
Vampire Mice: How USB PM Impacts You
Vampire Mice: How USB PM Impacts YouVampire Mice: How USB PM Impacts You
Vampire Mice: How USB PM Impacts YouSage Sharp
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git TutorialSage Sharp
 

Plus de Sage Sharp (6)

Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome culture
 
Countering impostor syndrome culture
Countering impostor syndrome cultureCountering impostor syndrome culture
Countering impostor syndrome culture
 
Herding cats with django
Herding cats with djangoHerding cats with django
Herding cats with django
 
Open source 101 for students
Open source 101 for studentsOpen source 101 for students
Open source 101 for students
 
Vampire Mice: How USB PM Impacts You
Vampire Mice: How USB PM Impacts YouVampire Mice: How USB PM Impacts You
Vampire Mice: How USB PM Impacts You
 
Advanced Git Tutorial
Advanced Git TutorialAdvanced Git Tutorial
Advanced Git Tutorial
 

Dernier

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 

Dernier (20)

Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 

Linux Kernel Introduction

  • 1. Linux Device Drivers Sarah Sharp Dec 6, 2014
  • 2. Sarah Sharp ● USB 3.0 host controller driver author ● Linux kernel developer for 9 years ● Worked in Intel's Open Source Technology Center (OTC) for 7 years ● Driver maintainer for 5 years
  • 3. How did I get into open source? ● Didn't program until college ● Portland State University ● My boyfriend introduced me to – open source, Linux, rockets
  • 6. How did I get into Linux kernel development? ● Professor Bart Massey introduced me to – The local Linux kernel community – Greg Kroah-Hartman ● Greg suggested usbfs2 project ● Bart helped me get: – College credit for kernel project – Intel undergraduate research grant
  • 7. How did I get a job in open source? ● Bart encouraged me to present at OSCON on usbfs2 ● Kristin Accardi was on OSCON paper selection committee ● Through network (Bart → Greg → Kristen) I got a job
  • 8. Sarah Sharp: Linux kernel USB 3.0 driver developer ● Hired by Intel in July 2007 ● USB 3.0 specification draft ● FPGA prototypes ● Driver merged in April 2009
  • 9. What is it like to be a Linux kernel developer? ● very tight-knit group, very slow turn over ● 80% of kernel developers are paid ● 20% are volunteers and students ● all work done through mailing lists ● a few IRC channels ● rarely get together in person
  • 10. Linux kernel subsystems ● Many different parts of the kernel ● Broken into subsystems ● Each has a maintainer ● Most have a mailing list ● MAINTAINERS file ● scripts/get_maintainer.pl
  • 11. What Do Subsystem Maintainers Do? ● Experts in their particular field ● Usually 5-20 years of experience ● Approve changes to their area ● Often have 1-4 sub-maintainers ● This is how Linux scales trust
  • 12. Intel Linux Kernel Maintainers ● ACPI - Rafael Wysocki, Zhang Rui ● Bluetooth - Marcel Holtmann ● NFC - Samuel Ortiz ● USB 3.0 - Mathias Nyman ● Intel graphics - Daniel Vetter ● EFI - Matt Fleming ● x86 - H. Peter Anvin, Peter Z ● RAS, machine check - Tony Luck ● Code ellision - Andi Kleen ● NVMe - Matthew Wilcox ● IOMMU - Dave Woodhouse ● Temperature - Fenghua Yu ● DMA offload - Vinod Koul ● Wimax - Inaky Perez-Gonzalez ● Intel wifi - Johannes Berg ● Intel idle - Len Brown ● Intel ethernet - Jeff Kirsher, Jesse Brandeburg, Carolyn Wyborny ● Intel C600 SAS, IOAT - Dan Williams ● Serial, GMA500/600/3600, misc - Alan Cox
  • 13. What is Being a Linux Kernel Maintainer Like? ● Hundreds of emails a day ● 1:Many relationship with contributors ● Rapid development cycle ● Looking at long-term health of the project ● Maintains code for 3 - 20 years ● Reputation is on the line for each patch
  • 14. “Meritocracy” ● Maintainers are vested ● Developers will come and go ● Long-standing contributors gain trust ● Easier for them to do complex things ● Harder for newcomers
  • 15. Community Trust and Social Engineering ● Build a trust relationship with maintainers – Review patches – Ask intelligent questions – Submit small bug fixes ● Learn community norms – Email format – Coding style – Testing
  • 16. Tips for Asking Intelligent Questions ● Always Cc the maintainer ● Do your research ● Document where you looked ● Be concise and precise ● Ask a question you know the answer to, then one you don't
  • 17. Tips for Bug Reporting ● Always Cc the maintainer ● System information is crucial – What hardware? – What kernel, what distro – 32-bit vs 64-bit – lspci, lsusb, acpidump ● Reproducibility thinking ● Be responsive ● Hold onto hardware
  • 18. Linux Kernel Quality Assurance ● Regressions are not tolerated ● Buggy new code is fixed or reverted ● Shifting towards static analysis tools – sparse, smatch, Coccinelle ● 0-day testing infrastructure ● kselftest
  • 19. Getting into Linux kernel development ● Read the code, review other people's patches ● Participate and ask questions on the mailing list ● First patch tutorial – http://kernelnewbies.org/FirstKernelPatch ● Staging cleanup patches – http://kernelnewbies.org/CheckpatchTips ● Linux kernel exercises – http://eudyptula-challenge.org/
  • 20. Leveling Up in Linux Kernel Development ● Larger patchsets ● Use complex tools (sparse, Coccinelle) ● Find an area you're passionate about ● Look for todos, bugzilla entries ● Before starting a large task: – Always ask the maintainer – build trust with the maintainer
  • 21. Tips for Code Review ● Keep a list of the feedback ● Address ALL feedback in revisions ● Track changes in your cover letter ● If you disagree with a maintainer, back yourself up with facts ● Maintainers don't care about your deadline ● Code must be complete and clean ● Duplicate code or drivers won't be accepted
  • 22. More Linux Kernel Resources ● Linux Device Drivers book: http://lwn.net/Kernel/LDD3 ● Linux Device Driver tutorial: https://github.com/gregkh/kernel-tutorial ● FOSS Outreach Program for Women (OPW) (paid open source and Linux kernel internships) http://gnome.org/opw
  • 23. Photo Attribution ● Tux: http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/NewTux.svg/400px- NewTux.svg.png ● Jamey and Sarah Sharp: https://www.flickr.com/photos/igalko/7570033604 ● Sarah Sharp and PSAS photos CC BY-SA-NC Sarah Sharp ● Bart Massey: https://www.flickr.com/photos/reidab/9326868060 ● OSCON sign: https://www.flickr.com/photos/kubina/912778997 ● USB 3.0 host PCI card: https://www.flickr.com/photos/hades2k/9069181710 ● Logitech webcam: https://www.flickr.com/photos/bshunrichs/162199777 ● Greg Kroah-Hartman: https://www.flickr.com/photos/tian2992/6208491794 ● David Brownell: https://www.flickr.com/photos/13825348@N03/sets/72157608741347102/detail/
  • 24. Photo Attribution ● Computer guts: https://www.flickr.com/photos/orijinal/4832982682 ● Kernel Summit: https://www.flickr.com/photos/linuxfoundation/2987611750 ● Mail: https://www.flickr.com/photos/donebythehandsofabrokenartist/1502717818 9 ● Nerd merit badge: https://www.flickr.com/photos/momentum/4203541703 ● Trust: https://www.flickr.com/photos/dobs/10726756606 ● Question: https://www.flickr.com/photos/marcobellucci/3534516458 ● Bug: https://www.flickr.com/photos/103499652@N04/14232715868 ● Quality: https://www.flickr.com/photos/dieselbug2007/414348333 ● Editing: https://www.flickr.com/photos/nics_events/2349631515