SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
Contributing to Xen
An Introduction
We want your patches!
Why do we want your patches?
• Individually: Feels good to know our work is useful

• But of course, we’re not paid to feel good — our employers want your
patches too

• Mindshare and “Brand"

• May want to use your code someday
“Free software” is free as in…
• “Free” as in “free speech”

• Often “Free” as in “free beer”

• But for a maintainer, open source is often…
“Free” as in “free puppy”
“Free” as in “free puppy”
• Every extra line of code means:

• More difficult to change or refactor

• More chance a bug needs to be fixed

• Submitter often disappears after the code is
accepted, leaving the maintainer to take
care of it

• Keep that tension in mind as you contribute
How does any patch get in?
Maintainers
• Nobody has a full understanding of the entire codebase

• The “One Little Change” problem

• Role: Long-term investment in keeping the code “clean”

• xen.git/MAINTAINERS
• xen.git/scripts/get_maintainer.pl
• Nested maintainership

• THE REST
Checking in a patch: When
• Approval from all maintainers whose code the patch touches

• Approval or acquiescence from everyone who has raised issues
Committers
• “Secretarial” role: Determine proper acks and apply patch

• “Final authority” / “Elder Council” role
Conflict resolution
• Try to achieve consensus

• Maintainers can overrule non-maintainers

• “Nested” maintainers can overrule (or stand-in for) lower-level maintainers

• Majority vote of committers can overrule a maintainer
Expect Iteration
Very low probability for version 1 of any series to be checked in
The Development Cycle
Three Phases
• Development window

• Any patch can be checked in

• “Last posting date” (+2 weeks):

• Patches checked in if first version posted already

• Feature freeze (~6 weeks)

• Only bug fixes checked in

• Two releases per year (June and December) WARNING This may change soon
Writing a good patch (series)
A thousand unwritten rules
(You’re not going to get it right)
Consider three audiences
• The Reviewer(s)

• People looking for patches of interest

• The Archaeologist
Audience:
The Reviewer
• Is this patch necessary?

• Is this patch the right way to solve the problem?

• Is this patch correct?
Audience:
Someone looking for someting
• Patches to backport

• A patch that may have broken something

• Or a patch which fixes something
Audience:

The Archaeologist
–“Chesterton’s Fence”
“Don’t ever take a fence down until you
know why it was put up.”
Template for a changelog
• What does the current code do?

• Why is that a problem?

• How does this patch fix it?

• Any other changes the patch is making
One-line summary
• Give the general area of the code

• “credit2:” “vvmx:”

• Hint of what is changed to know whether it’s worth looking further into
Making a series
• A full change may require multiple independent changes

• All changes: A1 B1 A2 C1 C2 B2 D1 A3

• Break down into logical chunks:

• A1 A2 A3

• B1 B2

• C1 C2

• D1
Making a series: Bisectibility
• Bisection is a powerful tool to find when something broke

• But it only works if every changset works

• Break down your series into logical chunks, but:

• Don’t break existing functionality

• Don’t introduce bugs in one patch and fix them in another

• Can introduce code that isn’t used

• Don’t introduce code that doesn’t build
Coding Style
• Follow the coding style

• xen.git/CODING_STYLE
• xen.git/tools/libxl/CODING_STYLE
Mechanics
• git send-email
• --- line

• CC:
What [not] to put in a changelog
• References to already-public commits

• Short hash + short title

• 5d3214c (“xen/ept: Rename ept_invalidate_emt*”)
• References to previous discussions

• Summarize in changelog

• Include ref to longer discussion below --- line

• Referencing manuals 

• Intel / AMD manuals ‘references’ don’t change

• e.g., Volume 3, 4.4.1
Reposting
• Version number (“v2”)

• --version=2
• List the changes
All-purpose pass: RFC
• Means “Request For Comments”

• Makes it clear you don’t expect this to be checked in as-is
Design Documents
Dealing with maintainers
• Communication style

• Unusual but OK: Short and direct

• Not OK: Demeaning

• Judgement call: Being unreasonable

• If you have a problem, contact the community manager

• ‘Pinging’

• If you haven’t heard anything in 2 weeks, reply to your own patch
Questions?

Weitere ähnliche Inhalte

Mehr von The Linux Foundation

Mehr von The Linux Foundation (20)

XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information SecurityXPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
XPDDS19: Implementing AMD MxGPU - Jonathan Farrell, Assured Information Security
 
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSEXPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
XPDDS19: Support of PV Devices in Nested Xen - Jürgen Groß, SUSE
 
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
XPDDS19: Application Agnostic High Availability Solution On Hypervisor Level ...
 
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, AmazonXPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
XPDSS19: Live-Updating Xen - Amit Shah & David Woodhouse, Amazon
 
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
XPDDS19:   Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...XPDDS19:   Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
XPDDS19: Xen API Archaeology: Creating a Full-Featured VMI Debugger for the...
 
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARMXPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
XPDDS19: Secure Unikraft Applications with Solo5 - Haibo Xu, ARM
 
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
XPDDS19: The Xen-Blanket for 2019 - Christopher Clark and Kelli Little, Star ...
 
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
XPDSS19: Improve the Reliability and Efficiency of Late Microcode Update - Ch...
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

XPDDS18: How to Get Your Code Into Xen: The Xen Development Workflow - George Dunlap, Citrix

  • 1. Contributing to Xen An Introduction
  • 2. We want your patches!
  • 3. Why do we want your patches? • Individually: Feels good to know our work is useful • But of course, we’re not paid to feel good — our employers want your patches too • Mindshare and “Brand" • May want to use your code someday
  • 4. “Free software” is free as in… • “Free” as in “free speech” • Often “Free” as in “free beer” • But for a maintainer, open source is often…
  • 5. “Free” as in “free puppy”
  • 6. “Free” as in “free puppy” • Every extra line of code means: • More difficult to change or refactor • More chance a bug needs to be fixed • Submitter often disappears after the code is accepted, leaving the maintainer to take care of it • Keep that tension in mind as you contribute
  • 7. How does any patch get in?
  • 8. Maintainers • Nobody has a full understanding of the entire codebase • The “One Little Change” problem • Role: Long-term investment in keeping the code “clean” • xen.git/MAINTAINERS • xen.git/scripts/get_maintainer.pl • Nested maintainership • THE REST
  • 9. Checking in a patch: When • Approval from all maintainers whose code the patch touches • Approval or acquiescence from everyone who has raised issues
  • 10. Committers • “Secretarial” role: Determine proper acks and apply patch • “Final authority” / “Elder Council” role
  • 11. Conflict resolution • Try to achieve consensus • Maintainers can overrule non-maintainers • “Nested” maintainers can overrule (or stand-in for) lower-level maintainers • Majority vote of committers can overrule a maintainer
  • 12. Expect Iteration Very low probability for version 1 of any series to be checked in
  • 14. Three Phases • Development window • Any patch can be checked in • “Last posting date” (+2 weeks): • Patches checked in if first version posted already • Feature freeze (~6 weeks) • Only bug fixes checked in • Two releases per year (June and December) WARNING This may change soon
  • 15. Writing a good patch (series)
  • 16. A thousand unwritten rules (You’re not going to get it right)
  • 17. Consider three audiences • The Reviewer(s) • People looking for patches of interest • The Archaeologist
  • 18. Audience: The Reviewer • Is this patch necessary? • Is this patch the right way to solve the problem? • Is this patch correct?
  • 19. Audience: Someone looking for someting • Patches to backport • A patch that may have broken something • Or a patch which fixes something
  • 20.
  • 21. Audience:
 The Archaeologist –“Chesterton’s Fence” “Don’t ever take a fence down until you know why it was put up.”
  • 22. Template for a changelog • What does the current code do? • Why is that a problem? • How does this patch fix it? • Any other changes the patch is making
  • 23. One-line summary • Give the general area of the code • “credit2:” “vvmx:” • Hint of what is changed to know whether it’s worth looking further into
  • 24.
  • 25. Making a series • A full change may require multiple independent changes • All changes: A1 B1 A2 C1 C2 B2 D1 A3 • Break down into logical chunks: • A1 A2 A3 • B1 B2 • C1 C2 • D1
  • 26. Making a series: Bisectibility • Bisection is a powerful tool to find when something broke • But it only works if every changset works • Break down your series into logical chunks, but: • Don’t break existing functionality • Don’t introduce bugs in one patch and fix them in another • Can introduce code that isn’t used • Don’t introduce code that doesn’t build
  • 27. Coding Style • Follow the coding style • xen.git/CODING_STYLE • xen.git/tools/libxl/CODING_STYLE
  • 29.
  • 30. What [not] to put in a changelog • References to already-public commits • Short hash + short title • 5d3214c (“xen/ept: Rename ept_invalidate_emt*”) • References to previous discussions • Summarize in changelog • Include ref to longer discussion below --- line • Referencing manuals • Intel / AMD manuals ‘references’ don’t change • e.g., Volume 3, 4.4.1
  • 31. Reposting • Version number (“v2”) • --version=2 • List the changes
  • 32. All-purpose pass: RFC • Means “Request For Comments” • Makes it clear you don’t expect this to be checked in as-is
  • 34. Dealing with maintainers • Communication style • Unusual but OK: Short and direct • Not OK: Demeaning • Judgement call: Being unreasonable • If you have a problem, contact the community manager • ‘Pinging’ • If you haven’t heard anything in 2 weeks, reply to your own patch