[PATCH/RFC] readahead applet

Michael Opdenacker michael-lists at free-electrons.com
Sat Aug 19 10:01:13 PDT 2006


The attached patch against busybox 1.2.1 adds a new "readahead" applet.

It should be useful in system startup scripts to preload files or 
executables in RAM cache before they are used. The typical use of this 
technique is to reduce system startup time. Reading a file ahead of time 
should be particularly effective while a CPU bound process is running 
and I/O activity is low. Of course, selecting the right places to add 
calls to this applet requires good system knowledge.

Of course, people can always use the readahead(2) system call in their C 
programs, but this applet is a convenient way to add readahead calls in 
shell scripts, without having to modify existing C programs.

Note that a standalone implementation already exists on 
http://freshmeat.net/projects/readahead-list/, and that a corresponding 
package exists in Ubuntu: 

It may make sense to rename this applet to "readahead-list", to have the 
same name as in the standalone implementation.

Your comments and suggestions are welcome! If people like it, it would 
be great if it could be part of one of the upcoming Busybox releases!



N.B. the patch is also available on 

Michael Opdenacker, Free Electrons
Free Embedded Linux Training Materials
on http://free-electrons.com/training
(More than 1000 pages!)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-busybox-1.2.1-readahead
Url: http://busybox.net/lists/busybox/attachments/20060819/45b7ca23/attachment.asc 

More information about the busybox mailing list