more craziness - pre-cache in init scripts.

Carsten Haitzler (The Rasterman) raster at openmoko.org
Fri May 16 03:05:26 CEST 2008


On Thu, 15 May 2008 15:18:08 +0200 "Alessandro Iurlano"
<alessandro.iurlano at gmail.com> babbled:

yes - just loads. yes i know shared libs are loaded once only - and only the
pages from them loaded as needed. sure if you want to do full block-analysis on
what pages are mapped in and just read those - wonderful. i'm going for a quick
and dirty solution. this does not SPEED up boot - not at ALL. it moves IO time
from later to earlier. it means that once the bootsplash goes away, X, WM<
application launcher and all that stuff come up much faster so the visible gap
between bootsplash and "i have a gui up i can now use" is much less. it avoids
filesystem IO to flash later while these are starting up :) so it's just
shuffling stuff. yes - even reading more data off disk than we need and it may
slow down the total boot time - but it will improves its look and feel. so this
is just to get the whole bootup looking slicker and polished and professional.

> This just loads the files from the flash memory into Neo's RAM.
> I had a look at GTA01 boot phase performance some time ago. I could
> not get I/O statistics from the flash memory because I used bootchart
> and /proc/partitions (IIRC) was not populated because the driver
> lacked this feature.
> But I had the impression that the bottleneck was the cpu and not the
> access to the flash memory.
> This could however be wrong for GTA02 as cpu is 400MHZ instead of 266MHZ.
> Anyone knows the speed of the internal flash memory? Just to have an idea.
> 
> Those files are shared libraries. Linux loads a shared library from
> the disk only the first time it is used. The next times it is mapped
> directly in the memory space of the process. So maybe running a
> program that links all those shared libraries and uses at least a
> function from each of them could be more useful than a simple cat.
> Also the prelink program could be useful here.

in my testing with prelink - it had no measurable effect with C libs and apps -
c++, i don't know, but my understanding is that due to the massive number of
symbols thanks to mangling of every permutation of class, method, virtual
method etc, the symbol lookups are much heavier and thus it helps.

> Just my 2c.
> Alessandro
> 
> On Thu, May 15, 2008 at 12:50 PM, The Rasterman Carsten Haitzler
> <raster at openmoko.org> wrote:
> >
> > ok - new idea to punt more time during the boot splash and less time during
> > the int of x gui apps. let's pre-cache files needed during bringup of X.
> > that means spend the cycles reading from flash while the splashscreen is
> > amusing the user with something like:
> >
> 


-- 
Carsten Haitzler (The Rasterman) <raster at openmoko.org>



More information about the distro-devel mailing list