LAS16-106: GNU Toolchain Development Lifecycle

64
GNU Toolchain Lifecycle Ryan S. Arnold

Transcript of LAS16-106: GNU Toolchain Development Lifecycle

GNU Toolchain LifecycleRyan S. Arnold

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

A man builds a fine house; and now he has a master, and a task for life; he is to furnish,

watch, show it, and keep it in repair, the rest of his days

- Ralph Waldo Emerson

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Wrong!

ENGINEERS AND DEVICESWORKING TOGETHER

GNU/Linux Distribution : (Distro) is a formally supported collection of interoperable

programs.

These programs have been quality and integration tested in order to guarantee that

they are compatible.

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

http://www.ubuntu.com/info/release-end-of-lifehttps://wiki.ubuntu.com/LTS

ENGINEERS AND DEVICESWORKING TOGETHER

http://www.ubuntu.com/info/release-end-of-lifehttps://wiki.ubuntu.com/LTS

ENGINEERS AND DEVICESWORKING TOGETHER

https://access.redhat.com/articles/3078https://access.redhat.com/support/policy/updates/errata/

RHEL6.0 GA 2010-11-09RHEL6.8 - 2016-05-10RHEL7.0 GA - 2014-06-09RHEL7.2 - 2015-11-19 (AArch64)

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Protip: Submit Early & Submit Often

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Toolchain Lifecycle - Linear Progression●Idea conception (micro-

architecture)●ISA●KABI (contract with user-space)●Kernel enablement●Platform identification●KABI implementation●Kernel upstreaming●ABI (binary contract between

programs)

●GNU Toolchain Implementation●Platform identification●ASM Instruction support●Codegen●Optimization●GNU Toolchain Upstreaming●Linux Distribution Adoption●Customer’s Hands●Linux Distro updates.

ENGINEERS AND DEVICESWORKING TOGETHER

Wrong!

ENGINEERS AND DEVICESWORKING TOGETHER

Idea Conception

Distro Adoption

KernelEnablement

CompilerEnablement

ToolchainUpstreaming

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Phases●Phase 0 - Legal & Branding●Phase 1 - Platform Enablement●Phase 2 - ABI Enablement●Phase 3 - Optimization●Phase 4 - Distro Adoption

ENGINEERS AND DEVICESWORKING TOGETHER

Phase 0 - Legal and Branding

ENGINEERS AND DEVICESWORKING TOGETHER

Danger! If your legal dept is dragging their feet on approving upstream contribution your

schedule is in jeopardy.

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Phase 1 - Platform Enablement

ENGINEERS AND DEVICESWORKING TOGETHER

ISA - Instruction Set Architecture

ENGINEERS AND DEVICESWORKING TOGETHER

It is a cardinal sin to not implement all required parts of the ISA

ENGINEERS AND DEVICESWORKING TOGETHER

Models

ENGINEERS AND DEVICESWORKING TOGETHER

Linux Kernel Platform Enablement

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

www.kernel.org/category/releases.html

ENGINEERS AND DEVICESWORKING TOGETHER

Assembler, Linker & Compiler Microarch Identification

ENGINEERS AND DEVICESWORKING TOGETHER

GCC Instruction-Set & Cost Model

ENGINEERS AND DEVICESWORKING TOGETHER

Danger! Sometimes early enablement might give away details of the processor, such as information about the pipeline bandwidth.

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Glibc Platform Identification

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

Protip: Get the KABI enablement code upstream as soon as possible!

ENGINEERS AND DEVICESWORKING TOGETHER

Rev 1 Hardware

ENGINEERS AND DEVICESWORKING TOGETHER

Phase 3 - ABI Enablement

ENGINEERS AND DEVICESWORKING TOGETHER

Using The Existing ABI

ENGINEERS AND DEVICESWORKING TOGETHER

Danger! You implemented all required parts of the ISA right? If not, you’ve defined a new ABI

that you have to implement.

ENGINEERS AND DEVICESWORKING TOGETHER

Protip: Don’t use an ABI change as a way to squeeze out more performance (unless it

benefits all microarch variants)

ENGINEERS AND DEVICESWORKING TOGETHER

New ABI? Really?

ENGINEERS AND DEVICESWORKING TOGETHER

It is a cardinal sin to release binaries compiled with a pre-release ABI into the wild.

ENGINEERS AND DEVICESWORKING TOGETHER

Danger! Just because you proposed the change doesn’t mean you get to own the ABI.

ENGINEERS AND DEVICESWORKING TOGETHER

GCC, Linker, and Assembler ABI Changes

ENGINEERS AND DEVICESWORKING TOGETHER

Listen to your patch reviewers and implement changes requested or your update patches will

be ignored.

ENGINEERS AND DEVICESWORKING TOGETHER

Danger! If you don’t respect the opinion of the person who will be maintaining your software,

then your contribution isn’t going to be respected.

ENGINEERS AND DEVICESWORKING TOGETHER

Protip: Drop what you’re doing and turn around a patch re-spin as soon as possible

after a maintainer has reviewed your patch.

ENGINEERS AND DEVICESWORKING TOGETHER

Protip: You might be asked to implement a generic solution in place of a number of arch-

specific implementations. Do it!

ENGINEERS AND DEVICESWORKING TOGETHER

Glibc ABI Changes

ENGINEERS AND DEVICESWORKING TOGETHER

If you’re implementing a glibc ABI change/addition you need a complete release

cycle for evaluation.

ENGINEERS AND DEVICESWORKING TOGETHER

Phase 3 - Upstreaming Optimizations

ENGINEERS AND DEVICESWORKING TOGETHER

GCC Optimizations

ENGINEERS AND DEVICESWORKING TOGETHER

Glibc Optimizations & IFUNC

ENGINEERS AND DEVICESWORKING TOGETHER

Phase 4 - Distro Adoption

ENGINEERS AND DEVICESWORKING TOGETHER

ENGINEERS AND DEVICESWORKING TOGETHER

A man builds a fine house; and now he has a master, and a task for life; he is to furnish,

watch, show it, and keep it in repair, the rest of his days

- Ralph Waldo Emerson

Thank You#LAS16

For further information: www.linaro.orgLAS16 keynotes and videos on: connect.linaro.org