Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "System Size Auto-Reduction"

From eLinux.org
Jump to: navigation, search
(add more)
(global constraints)
Line 5: Line 5:
 
=== LTO ===
 
=== LTO ===
 
=== global constraints ===
 
=== 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)
 +
* constant propagation (by, e.g. LTO) reduces code
 +
 
=== syscall elimination ===
 
=== syscall elimination ===
 
* scan file system
 
* scan file system

Revision as of 15:11, 6 April 2013

This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.


Research Areas

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)
  • 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