Linux Tiny Test Project

Description
This is a project to implement an automated test framework for finding the specific sub-patches or configuration options (in the total set of Linux tiny sub-patches) which yeild the biggest size improvements.

The main motivation for this is the (overwhelming) number of sub-patches in the linux-tiny patchset. In order to avoid doing a manual test of each sub-patch, this framework was conceived as a method of isolate the most important sub-patches of the patchset, in order to focus our attention on those.

The basic idea is that an automated script will run which will test each configuration option provided by the Linux-tiny patchset. For each one, the script will measure the reduction in size of the Linux kernel that results from turning that option on. From this, a list of the 'top-10' configuration options will be made. Subsequently, patches to support those top-10 configuration options will be ported and analyzed on non-x86 processor platforms.

This will give us a starting point to determine the most beneficial parts of the linux-tiny patchset.

''It is recognized that some parts of Linux-tiny are tools for size evaluation. Some parts affect dynamic memory size, rather than the static size from the kernel compilation. While the technique described here is crude and ignores these parts, it's at least a starting point for evaluating and analyzing Linux-tiny.''

Linux-tiny specific core member

 * Classified by Name
 * Chihiro Morita(Mitsubishi) / Step 3
 * Richard Griffiths(intel) / Step 1 and 2
 * M Ranga Swami Reddy(sankhya) / Step 1
 * Keijiro Yano(Toshiba) / Step 3
 * Masahiro Fukuda(NEC Electronics) / Step 2
 * Shuduo Sang(Monta Vista) / Step 1, 2 and 3
 * Classified by Steps
 * Step 1 Richard Griffiths(intel), M Ranga Swami Reddy(sankhya),ShuduoSang(MontaVista)
 * Step 2 Richard Griffiths(intel), Masahiro Fukuda(NEC Electronics), ShuduoSang(MontaVista)
 * Step 3 Chihiro Morita(Mitsubishi), Keijiro Yano(Toshiba), ShuduoSang(MontaVista)

Step1
Scope and objective Specification on the framework(tentative)
 * Step1 is to develop automated testing (config-->build-->capture size) framework on PC/Linux platform.
 * given the following directory structure:
 * = input directory = environment var INPUT_DIR
 * has  file
 * = kernel source directory = environment var KERN_SRC
 * = output directory = environment var RESULT_DIR


 * variable iteration:
 * for CONFIG_VAR in `cat $(INPUT_DIR)/varlist`; do ; done


 * Automated flow control for the following operation assuming individual CONFIG vars are given by Step2.
 * copy baseline_config to .config
 * turn on that variable in the .config file
 * may need to strip current definition of CONFIG_FOO from .config file)
 * make sure configuration is consistent (turn on dependent configuration options)
 * yes  | make oldconfig
 * save a diff between .config and baseline_config
 * build kernel image
 * make vmlinux
 * save results
 * echo $(CONFIG_VAR) >>../$(RESULT_DIR)/size_results
 * size vmlinux >>../$(RESULT_DIR)/size_results
 * (sub-system size measurements from linux-tiny presentation by Matt Mackall)
 * cleanup for next loop iteration, if necessary
 * (is this needed?)
 * repeat
 * cleanup for next loop iteration, if necessary
 * (is this needed?)
 * repeat
 * repeat

Step2

 * pre-requisite (manual tasks):
 * 1) build a list of individual CONFIG vars to test
 * 2) create a baseline_config file
 * 3) kernel source for your platform
 * 4) provide environment to run automated script, consisting of:
 * directories mentioned above:
 * environment variables for script:
 * environment variables for kernel building:
 * 1) measure size of kernel compiled with baseline_config
 * 2) if the build is cleaned out between every compile, it may be desirable to have ccache installed - see http://ccache.samba.org/
 * step2 script [[Image:tiny-step2script.tgz|tiny-step2script]]
 * result

Rationale
[This feature is important because ...]

Projects

 * see the Linux Tiny page

Specifications
None

Patch

 * See Patch Archive

Utility programs
[other programs, user-space, test, etc. related to this technology]

Linux Tiny Kernel Size Script

Sample Results
[Examples of use with measurement of the effects.]

Case Study 1
On RBTX4938 board (MIPS architecture):



Case Study 2
= Future Work/Action Items = Here is a list of things that could be worked on for this feature: ??