[PATCH/RFC] readahead applet

Rob Landley rob at landley.net
Mon Aug 21 18:10:56 UTC 2006


On Monday 21 August 2006 12:35 pm, Bernhard Fischer wrote:
> On Mon, Aug 21, 2006 at 12:18:07PM -0400, Rich Felker wrote:
> >On Sun, Aug 20, 2006 at 11:53:09AM +0200, Bernhard Fischer wrote:
> >> On Sat, Aug 19, 2006 at 07:01:13PM +0200, Michael Opdenacker wrote:
> >> >Hello,
> >> >
> >> >The attached patch against busybox 1.2.1 adds a new "readahead" applet.
> >> 
> >> Sounds useful to me.
> >
> >It does? Anyone care to explain how this is different/better than:
> 
> Well, it does, conceptually.
> >
> >'nice -n 20 cat "$file" > /dev/null &'
> 
> Whether you cat or dd likely is a mere implementation detail ;)
> 
> PS: nice -n 20 cat $* > /dev/null ;# to allow for lists

I thought readahead wouldn't load more into memory than there's room for (and 
thus wouldn't evict other things to make room for the new pages in the page 
cache), and also wouldn't perform an unnecessary copy into a userspace 
buffer.

Why else bother to make a syscall for it?

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list