[PATCH/RFC] readahead applet

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


Hello,

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: 
http://packages.ubuntulinux.org/dapper/admin/readahead

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!

    Cheers,

    Michael.

N.B. the patch is also available on 
http://free-electrons.com/pub/patches/busybox/1.2.1/patch-busybox-1.2.1-readahead

-- 
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://lists.busybox.net/pipermail/busybox/attachments/20060819/45b7ca23/attachment.diff 


More information about the busybox mailing list