CLOSE ENCOUNTERS OF THE UPSTREAM RESOURCE

Similar documents
Are you Really Helped by Upstream Kernel Code?

Long Term Support Initiative

Digitalization of Kernel Diversion from the Upstream

Sony s Open Devices Project. Goals Achievements. What went right? What went wrong? Lessons learned

How to cook the LTSI kernel with Yocto recipe

Embedded Linux Now and the future with LTSI. Hisao Munakata, Renesas Tsugikazu SHIBATA, NEC 27. March 2014 CollaboraDon Summit

OpenEmbedded in the Real World

Learning to Provide Modern Solutions

The Embedded Linux Problem

Kernel driver maintenance : Upstream vs. Industry

Keeping up with LTS Linux Kernel Functional Testing on Devices

How to decide Linux Kernel for Embedded Products. Tsugikazu SHIBATA NEC 20, Feb Embedded Linux Conference 2013 SAN FRANCISCO

Git and Gerrit Workflows. Enforcing Manual & Automated Review

Mesa i965 Scenes from a Quiet Revolution

The Anatomy of A FOSS Project

RED HAT ENTERPRISE LINUX. STANDARDIZE & SAVE.

Using GitHub to Share with SparkFun a

UTILIZING A BIG.LITTLE TM SOLUTION IN AUTOMOTIVE

SOFTWARE CONFIGURATION MANAGEMENT

Mike McQuaid INCLUDES 66 TECHNIQUES. Foreword by Scott Chacon MANNING

Unification of embedded CPU variants

CSC D84 Assignment 2 Game Trees and Mini-Max

Git Workflows. Sylvain Bouveret, Grégory Mounié, Matthieu Moy

IJTAG Compatibility with Legacy Designs - No Hardware Changes

Git. all meaningful operations can be expressed in terms of the rebase command. -Linus Torvalds, 2015

LTSI Project update Long Term Support Ini0a0ve. Tsugikazu SHIBATA, NEC 21, February 2017 Embedded Linux Conference Hilton Portland, OR

TDDC88 Lab 4 Software Configuration Management

LTSI Project Update. LTSI Kernel, How We Can Help Automotive Industries. Hisao Munakata, Tsugikazu Shibata

LTSI Project update. Hisao Munakata, Renesas Tsugikazu SHIBATA, NEC 29. April 2014 Embedded Linux Confenrece

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

THOMAS LATOZA SWE 621 FALL 2018 DESIGN ECOSYSTEMS

Q&A Session for Connect with Remedy - CMDB Best Practices Coffee Break

Source control with Subversion A user perspective

SCAP Security Guide Questions / Answers. Ján Lieskovský Contributor WorkShop November 2015

August 22, New Views on your History with git replace. Christian Couder

Speech 2 Part 2 Transcript: The role of DB2 in Web 2.0 and in the IOD World

LTSI : Status update and discussion. Long Term Support Ini1a1ve

Design Better. Reduce Risks. Ease Upgrades. Protect Your Software Investment

Comments on the document ENTR/02/21-IDA/MIDDLEWARE-XML: Comparative assessment of Open Documents Formats Market Overview as submitted by Valoris

TDF Infra Overview. from developers' perspective

Portable Lunch/Scaling Problem. Android-Linux kernel Architect February 2013

Two years of ARM SoC support mainlining: lessons learned

Case study on PhoneGap / Apache Cordova

LTSI Project update Long Term Support Ini0a0ve. Tsugikazu SHIBATA, NEC 23, Oct Embedded Linux Conference Europe Hilton Prague

REPORT MICROSOFT PATTERNS AND PRACTICES

Continuous Integration / Continuous Testing

S1000D Style Guides for Effective Content Reuse in Fault Isolation Manuals

IT Project Management Challenges with Open Source. George A Pace

The Cost of Going it Alone Dave Neary

Categorizing Migrations

The HiKey AOSP collaborative experience

THINGS YOU NEED TO KNOW ABOUT USER DOCUMENTATION DOCUMENTATION BEST PRACTICES

Git Branching for Agile Teams

Overview. 1. Install git and create a Github account 2. What is git? 3. How does git work? 4. What is GitHub? 5. Quick example using git and GitHub

Software Evolution. Dr. James A. Bednar. With material from

CS 390 Software Engineering Lecture 3 Configuration Management

Kernel maintainership: an oral tradition

Using the SDACK Architecture to Build a Big Data Product. Yu-hsin Yeh (Evans Ye) Apache Big Data NA 2016 Vancouver

Crash Course in Modernization. A whitepaper from mrc

Belle II - Git migration

LTSI Project Update. for LTSI-3.10 and shared kernel test trial (part 2) Tsugikazu Shibata, Hisao Munakata

Working in Teams CS 520 Theory and Practice of Software Engineering Fall 2018

What is version control? (discuss) Who has used version control? Favorite VCS? Uses of version control (read)

[RFC] Obtaining Management Buy-in for Mainline Development

OPEN SOURCE TESTING IN SAUDI ARABIA 1

Embedded Kernel Back-Porting

Device Tree as a stable ABI: a fairy tale?

Software Project (Lecture 4): Git & Github

Thread Affinity Experiments

Git. Ľubomír Prda. IT4Innovations.

Newspilot: A print focused, digital enabled, CMS for the news industry

Happy Birthday, Ajax4jsf! A Progress Report

Software Engineering 2 A practical course in software engineering. Ekkart Kindler

Contribute To Linux Mainline

Helping Developers Help You. Tom Caputi

CESSDA Expert Seminar 13 & 14 September 2016 Prague, Czech Republic

Software Revision Control for MASS. Git Basics, Best Practices

There Should be One Obvious Way to Bring Python into Production. Sebastian Neubauer

UP B03 - Don't expire: Simplify Your Windows Migration Patrick Tyler - Distinguished System Engineer Mike Holmes IT HQ Department of the US Army

Git with It and Version Control!

Software Error Correction Support Policy

How to: Improve Agency Communication

White Paper(Draft) Continuous Integration/Delivery/Deployment in Next Generation Data Integration

Helping the Compiler Help You. Thomas Dy

Topics covered. Introduction to Git Git workflows Git key concepts Hands on session Branching models. Git 2

Software Development I

Understanding the Open Source Development Model. » The Linux Foundation. November 2011

Still All on One Server: Perforce at Scale

Software Reuse and Component-Based Software Engineering

Disclaimer. This talk vastly over-simplifies things. See notes for full details and resources.

WebRTC: Possible? Don McGregor Research Associate MOVES Institute.

Software Continuous Integration & Delivery INCREASING SOFTWARE DEVELOPMENT AGILITY TO SPEED TIME TO MARKET

Intro Technical details Using vcsh Outlook Outro. vcsh. manage config files in $HOME via fake bare git repositories

Laboratorio di Programmazione. Prof. Marco Bertini

Configuration. Monday, November 30, :28 AM. Configuration

The Challenges for Software Developers with Modern App Delivery

You Can t Move Forward Unless You Can Roll Back. By: Michael Black

ARWINSS. The new Windows subsystem for ReactOS / Windows

Common Git Commands. Git Crash Course. Teon Banek April 7, Teon Banek (TakeLab) Common Git Commands TakeLab 1 / 18

Chapter 6 Architectural Design. Chapter 6 Architectural design

Transcription:

CLOSE ENCOUNTERS OF THE UPSTREAM RESOURCE HISAO MUNAKATA RENESAS SOLUTIONS CORP hisao.munakata.vt(at)renesas.com

who am I Work for Renesas (semiconductor provider) Over 15 years real embedded Linux business field experience Providing free Linux starter code (BSP) We help our important customers who are Linux newbie's. ( They ask anything about Linux to us. ) Over 5 years experience working with the community Linux Foundation CEWG Architecture group co-chair I am leading Linux core technology team in Renesas that develops upstream Linux code. As this team consisted of several community developers we had chance to work closely with Linux upstream. 2 We are learning how to work with the Linux community

MY FINDINGS

production team vs. evolution team community, long-term, reusable code, no appointed date of delivery red party product developer utopia 4 blue party upstream developer upstream community office business budget, mass production, competition

Each party aims different goal 5 too short focused easy solution A code reuse rate is low No intention for open source contribution lack of feedback ( requirement, bug info ) random requirements development takes too long time maybe lack of stabilization hard to make product differentiator can not help today s release unclear support scheme Each party aims different goal and it seems very hard to share it. However red party s (future) work depends on blue party anyway.

Red team development system at the time of binary-only world 6 authorized integrator binary code delivery license fee contract based paid support There were no chance (demand) to access source code. They could ask paid support to get workaround, but it was not a true solution.

Red team development system at the time of start using Linux for CE products 7 source code embedded Linux distribution almost no interaction source code integrated BSP paid support Industry developers were mainly supported by embedded Linux distribution and/or integrator company. Due to kernel version gap, there were very limited connection to the upstream community.

Red team development system at today ( start adopting community framework ) 8 upstream community They work closely industry consortium Industry developers have started to adopt relatively new kernel that have been integrated in software platform. However they are not familiar with working with the upstream development community.

STRUGGLES OF PRODUCTION TEAM

struggles 1 tend to develop own unique kernel 10 upstream community hard x to mainline too unique code You are allowed to modify source code as you like, BUT

struggles 2 incorrect way of patch creation 11 Linux has been constructed as accumulation of a degradable small patches. Driver code for specific environment that is not abstracted. Does not work with SMP incorrect use of kernel API non-portable coding too big piece hard to merge duplication of code missing git log information wrong patch format Locally developed large & irregular patch can not be integrated

struggles 3 lack of elemental modern OS understanding 12 everyday till mid-night # kernel panic!! # crush dump XXXX # segmentation fault When they faced a problem of the Linux origin, they think they can be settled in oneself. However,...

struggles 4 emergency support request may not work 13 pointless log gathering log non-essential guide

struggles 5 re-inventing already created bug-fix 14 bug fix bug fix fix already exist in new kernel code creating in-house fix upstream community

struggles 6 mindless patch merging without inspection 15 incompatible code binary driver code that include bug They really do not understand the role of tree maintainer

struggles 7 long term maintenance of in-house orphan tree 16 locally developed in-house code, that could not be merged back to the upstream It costs enormous expenses for the lone tree maintenance.

DO THE RIGHT THING WITH THE COMMUNITY RESOURCE

As you start using fresh kernel, community became close 18 Linux 2.6.32 They had been completely isolated (due to the kernel version gap) getting closer 2.6.18 upstream community Linux 3.3 Linux 3.0 Resources of the upstream community are more available till now.

Even if you are not a upstream developer,. I know production developers are extremely busy with their own target development, and I do not demand the following thing. check all community ML discussion relating to your topic create patch against current upstream development kernel negotiate in ML discussion to merge your patch to the upstream If you can pay more attention to existing open source community resources like git, BTS, ML and others, you may utilize them to make your development more efficient and clean. So this is the right time to breakout to the open source arena. 19

Breakout to the community resource! developer network upstream community 20 code repository ML archives consortium code archives Even without direct contribution, red team developer can utilize various open resources to manage better work!!

several recommendations 21

recommendation 1 correct use and utilization of git Git is extremely powerful code management tool. Correct and efficient use of git is essential to improve your development. 22 You should add correct git log message to all codes you add. Source code must be tie with.git repo management information. This will dramatically reduce future debug and maintenance cost. If you develop Linux/Android code, you can always compare your code and current latest community code. It will show how community modified (polished) the upstream code. And their code might already include the code you need to develop. You can create any experimental branch with git. And you can merge it to the original tree when it is enough verified. Creation of random experimental branch without git use easily makes spaghetti code.

Example 1 kernel bug-fix patch cherry picking 1. Determine potential problematic area by locating commonly used functions in function call history included in error log messages 2. Use git to check which bug fix commits that are included in latest stable tree update for the problematic area http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary 3. Use git to check new commits in latest upstream tree for the problematic area, maybe bug fixes are missing from stable? http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary 23 4. If no potential fixes exist in stable or latest upstream then give up 5. If fixes exist then create custom back port with multiple commits covering the problematic

Example 1 kernel bug-fix patch cherry picking (cont d) 6. Test the custom back port and keep your fingers crossed 7. If problem disappears then adjust back port to become smaller to work towards locating actual fixes 8. If problem still exists then make back port larger to cover greater area to include more potential fixes 9. Repeat testing and adjustment of back port until satisfied or giving up 10.Contact stable maintainer to discuss inclusion of fix in next stable release 24

Example 2 Android version comparison 25 You can download Android platform source code (except 3.x series) from AOSP repository. And fortunately AOSP code includes git management information, you can compare your code and AOSP latest code pretty easily. So if you are stuck with any Android platform related problem, it is good idea to check this first to notice Android upstream work result as it may already include solution for your problem. Furthermore, you can compare the cord of the latest Android 4.0.x series with the cord of the Android 2.3.x series. This may help you when you want to add SMP support upon 3.2.x environment. You need to become professional user of repo and git command to perform efficient code comparison.

Example 2 Android version comparison (cont d) You can compare OLD and NEW with following repo command. This will show anything modified from OLD -> NEW and newly added stuff on NEW. 26 Sample to compare android-4.0.1_r1 and android-4.0.3_r1

Example 2 Android version comparison (cont d) To deep dive into each change, initially you need to move to each source directory and use git log command with appropriate option. Here listed some useful git log option. --grep= 'keyword Set to find log including keyword You can find patch including the work LTE by setting --grep='lte' --author='author Set to find log that has author in Author You can find commit made by Samsung with setting author='@samsung.com' -p : generate patch form output -E : accept Extended regular expression 27

Example 2 Android version comparison (cont d) If you want to find the change between android-2.3.7_r1 to android-4.0.1_r1 that include keyword LTE, you can use following command. 28 Last example is a bit advanced one. This will show android enhancement between 2.3.7_r1 (GB) to 4.0.1_r1 (ICS) to add support for SMP processor.

recommendation 2 Placing maintainer who owns strong practice authority All patches must be investigated thoroughly before merging it, and this is the process that is essential to avoid tree confusion. The tree maintainer needs to block all inappropriate code. Therefore he must have strong authority. It may be too hard for junior engineer. in-house tree maintainer 29 ugly patch Maintainer need to reject any request that include bad code.

recommendation 3 red team and blue team coordination 30 The perspective of the blue team is totally different from the red team. However, it is useful for both sides to share the demand of the red team. This can be a trigger to add industry demand into future kernel. demand list upstream task list production task list Red team can share production team demands to Blue team

recommendation 4 Disclosure of red team BTS contents 31 Community development takes time as it will require coordination. Product development always requires immediate bug-fix. Therefore it does not make sense to use single BTS for both party However, The same problem will occur again if they do not add bug-fix code to the community upstream. So bug information share between production(red) and upstream(blue) team would be beneficial way. bug report production BTS

recommendation 5 LTSI as common ground upstream latest upstream long-term 4way merge process needed Project code AOSP etc. 32 SoC vendor in-house tree Champagne 17:15 Wednesday, February 15 th On The Road: To Provide the Long-Term Stable Linux For The Industry LTSI is Linux Foundation project to provide integrated stable kernel

Conclusion 33 It is a very good trends that product development team come to use relatively new kernel because it shorten the distance to the upstream community. However, it does not seem to be able to be understood how the production developer can utilize the published community resources. It is understandable that production development team prefer their own way of development. However it is essentially important to study and adopt already proven open source development process, e.g. full utilization of git, adoption of Linux upstream code review process.