Difference between revisions of "System Size Auto-Reduction"
(→global constraints) |
(→LTO: add bullets to LTO section) |
||
Line 4: | Line 4: | ||
== Research Areas == | == Research Areas == | ||
=== LTO === | === LTO === | ||
+ | * What is it? | ||
+ | * what was required to get it to work? | ||
+ | * Andi Kleen's patch set | ||
+ | ** what do they do? | ||
+ | ** how big are they? | ||
+ | ** mainline status? | ||
+ | * what is the size gain (see ELC poster) | ||
+ | * what can be done with it? | ||
+ | * long-term possibilities for LTO | ||
+ | |||
=== global constraints === | === global constraints === | ||
* overall idea: create constraints external to code, and use for optimization | * overall idea: create constraints external to code, and use for optimization |
Revision as of 11:48, 8 April 2013
This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.
Contents
Research Areas
LTO
- What is it?
- what was required to get it to work?
- Andi Kleen's patch set
- what do they do?
- how big are they?
- mainline status?
- what is the size gain (see ELC poster)
- what can be done with it?
- long-term possibilities for LTO
global constraints
- overall idea: create constraints external to code, and use for optimization
- rationale: can't maintain in-tree - too many config items
- make the application of constraints automatic
- use existing constraints to generate new constraints
- constraints can flow between user-space and kernel
- example: uid=0
- constraint language
- application by commenting out references (replace with 0 constant)
- use compiler to find code references (via error messages)
- eliminates problem with duplicate names (uid in different structure)
- use compiler to find code references (via error messages)
- constant propagation (by, e.g. LTO) reduces code
syscall elimination
- scan file system
- create report of used and unused system calls
- mark syscalls unused in kernel
- arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S
- make sure unused syscalls are not __attribute__(externally_visible)
- technique of asmlinkage_<syscall>
- use LTO to eliminate calls
- results: 50K-90K
ARM stack reduction
- 4k stacks
- stack extensions
cold code compression
Report existing research
link-time rewriting
Report existing research
Talk outline
This talk will be presented at LinuxCon Japan 2013:
Title
Self-Introduction
- I am Tim Bird
- Now working at Sony Mobile
- Researching system size for many years
- Long background in extremely small systems
- NetWare Lite - file and print server on DOS in 50K (in 1991)
The problem of Bloat
- Software bloat occurs because systems are built with more software than is really needed for a given task
- Open Source software meets the needs of thousands of different systems
- Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)
- Linux supports many, many features, only some of which are configurable
- Software must be generalized for many use cases
Bloat (cont.)
- In desktop or server, virtual memory makes this not so important (for user-space programs)
- Only working set of program is loaded - pages are loaded on demand
- For kernel, all pages are always loaded
Tiny Distribution
- poky-tiny distribution (yocto project)
- see
- Good for testing and further research