|
|
View Full Version : iLiad An idea to mitigate boot time (and app launch time) -- For future use
Antartica 11-02-2006, 11:00 AM Hi all. The idea follows:
1. Have all book-reading type apps cache not only one page, but five (the previous page, the current page, and the three next pages)
2. When you exit a book-reading app, write to disk a mng (png-multi-image file) with the 4-bit images of the cached pages.
3. The last viewer used app puts a file in /mnt/free/ whose contents specify the path and name of the saved mng file
4. Do a small kernel module that, at boot, as soon as the disk and the filesystem has been initialized (or reading it "by hand" --after all, it's FAT), reads the file and lets the user browse it with the flipbar (and in screen there would be no pageBar, no icon bar, just the text...) while the O.S. is finishing the initilization.
5. At viewer launch, if a corresponding mng file to the selected document exists, do the same, while the viewer is launching and loading the selected file.
With this in place, the slow startup would not be a problem for book-reading (although it doesn't resolve the usage scenarios of note-taking and of consulting a note).
I can volunteer for the kernel part, but we need the kernel sources and some way to update the kernel in the iliad...
scotty1024 11-02-2006, 03:07 PM My thoughts have been along these lines.
ContentLister needs to be the UI for paging/rotating/zooming/tabbing.
It has a plug in capability for: PDF, DJVU, HTML, TXT, File Selection (existing content lister function), etc...
You launch one app and it loads shared libraries as needed to render content. Content is tabbed.
The new app has a concept of "session" which is persistent. The page image cache could indeed be part of this persistent session state. But for file formats such as DJVU they can re-render a page faster than you can read it from the iLiad's slow storage.
The plugins would self configure via a defined API call: extensions, icons etc...
One big help on startup time would be to shoot X and use Pango/Cairo in a direct frame buffer mode. This would also reduce memory foot print in the new ContentLister and reduce screen update latency.
I would also eliminate the existing UDP service for erasing the screen. I'd just have ioctl calls into the kernel, extending /dev/fb0 sounds reasonable to me (I suspect it already is). One less service to start, one less set of sockets to open in each app, way less overhead in the communication of the erase requests.
Malder1 11-02-2006, 03:50 PM Yesterday I though about exactly similar idea!
Please write about your idea on iRex forum and send copy to techsupport@
scotty1024 11-02-2006, 04:04 PM iRex can polish the boot time with a few trivial changes.
in /home/root/start.sh:
Change "/usr/bin/do_updates.sh" to ". /usr/bin/do_updates.sh".
This removes the expense of launching another shell to run the do_updates.sh. (of course if you're running hacker mode, you've already commented it out :) )
iRex could also do a few things to speed up do_updates.sh.
Existing:
# Convert the sysset area (if needed)
sysset_layout=`sysset -r -b -a 0 -l 1 | cut -c '3-'`
if [ "$sysset_layout" = "01" ]
then
sysset_convert_01_02.sh
fi
sysset_layout=`sysset -r -b -a 0 -l 1 | cut -c '3-'`
if [ "$sysset_layout" = "02" ]
then
sysset_convert_02_03.sh
fi
Faster, removes launching 3 processes.
# Convert the sysset area (if needed)
sysset_layout=`sysset -r -b -a 0 -l 1`
if [ "$sysset_layout" = "0x01" ]
then
sysset_convert_01_02.sh
fi
if [ "$sysset_layout" = "0x02" ]
then
sysset_convert_02_03.sh
fi
scotty1024 11-02-2006, 04:31 PM They could also speed the boot with this change:
# Temporary fix to show the WiFi mac address to the user
if [ ! -e /mnt/free/wlan_mac.txt ]
then
modprobe cf8385 2>/dev/null
echo "WiFi card MAC address:" > /mnt/free/wlan_mac.txt
ifconfig wlan0 | awk '$4 ~ /HWaddr/ { mac = $5; gsub(/:/, "-", mac); print m
ac }' >> /mnt/free/wlan_mac.txt
/usr/bin/wireless.sh stop
fi
Malder1 11-02-2006, 05:07 PM Scotty,
Please can you say expected time before (40 seconds?) and after this optimization?
Also send it to iRex.
And please send them your finding about improvement of text rendering in PDF. I still should use my utility that renders text to bitmaps and then packs to PDFs.
arivero 11-02-2006, 05:30 PM One big help on startup time would be to shoot X and use Pango/Cairo in a direct frame buffer mode.
I'd vote for the survival of X. True, it has always been a performance eater, but its existence does the iLiad more valuable.
scotty1024 11-02-2006, 11:29 PM I'd vote for the survival of X. True, it has always been a performance eater, but its existence does the iLiad more valuable.
How about shoot X and only start it for things like the x48 calculator? :D
scotty1024 11-02-2006, 11:33 PM Scotty,
Please can you say expected time before (40 seconds?) and after this optimization?
Also send it to iRex.
And please send them your finding about improvement of text rendering in PDF. I still should use my utility that renders text to bitmaps and then packs to PDFs.
iRex is fully aware of everything I'm doing, well, they haven't heard about x48 yet... :)
In any case, they will do as they wish.
scotty1024 11-03-2006, 06:56 PM In case no one has seen it, this is what the iLiad's boot looks like from the system log perspective.
Oct 17 02:47:46 ereader syslog.info syslogd started: BusyBox v1.01 (2006.07.31-1
4:32+0000)
Oct 17 02:47:47 ereader daemon.info cardmgr[234]: executing: 'modprobe cf8385 2>
&1'
Oct 17 02:47:47 ereader daemon.info cardmgr[234]: + Using /lib/modules/2.4.19-rm
k7-pxa2-irex1/kernel/drivers/pcmcia/cfio.o
Oct 17 02:47:47 ereader user.warn kernel: Before calling register_pccard_driver
Oct 17 02:47:47 ereader user.warn kernel: After calling register_pccard_driver
Oct 17 02:47:47 ereader daemon.info cardmgr[234]: + Using /lib/modules/2.4.19-rm
k7-pxa2-irex1/kernel/drivers/pcmcia/cf8385.o
Oct 17 02:47:47 ereader user.warn kernel: Entering cf_attach()
Oct 17 02:47:47 ereader user.warn kernel: Before registering the client
Oct 17 02:47:47 ereader user.warn kernel: Resetting WLAN.
Oct 17 02:47:47 ereader user.warn kernel: BasePort1=0xf7000000, AssignedIRQ=68
Oct 17 02:47:48 ereader user.warn kernel: After calling wlan_add_card function
Oct 17 02:47:48 ereader user.warn kernel: Leaving cf_attach()
Oct 17 02:47:50 ereader daemon.info cardmgr[234]: executing: './network start wlan0 2>&1'
Oct 17 02:47:50 ereader daemon.info cardmgr[234]: + Default Config
Oct 17 02:47:50 ereader daemon.info cardmgr[234]: + /sbin/iwconfig wlan0 mode Managed
Oct 17 02:47:51 ereader daemon.info cardmgr[234]: + /sbin/iwconfig wlan0 rate auto
Oct 17 02:47:51 ereader daemon.info cardmgr[234]: + /sbin/iwconfig wlan0 essid "any"
Oct 17 02:47:54 ereader daemon.info cardmgr[234]: + Error for wireless request "Set ESSID" (8B1A) :
Oct 17 02:47:54 ereader daemon.info cardmgr[234]: + SET failed on device wlan0 ; Network is down.
Oct 17 02:47:54 ereader daemon.info cardmgr[234]: + Sample private network setup
Oct 17 02:47:58 ereader user.info kernel: hal_pxa250.c: 1362-hal Initialization Success
Oct 17 02:47:59 ereader user.warn kernel: td_cache = c02f59f0
Oct 17 02:47:59 ereader user.warn kernel: ed_cache = c02f5a60
Oct 17 02:47:59 ereader user.info kernel: usb.c: new USB bus registered, assigned bus number 1
Oct 17 02:47:59 ereader user.info kernel: hub.c: USB hub found
Oct 17 02:47:59 ereader user.info kernel: hub.c: 2 ports detected
Oct 17 02:47:59 ereader user.warn kernel: USB HAL: HC suspend
Oct 17 02:47:59 ereader user.info kernel: usb_phci.c: usb-phci Initialization Success
Oct 17 02:47:59 ereader user.info kernel: SCSI subsystem driver Revision: 1.00
Oct 17 02:47:59 ereader user.info kernel: Initializing USB Mass Storage driver...
Oct 17 02:47:59 ereader user.info kernel: usb.c: registered new driver usb-storage
Oct 17 02:47:59 ereader user.info kernel: USB Mass Storage support registered.
Oct 17 02:48:01 ereader user.warn kernel: VFS: busy inodes on changed media.
Oct 17 02:48:03 ereader user.warn kernel: MMC:Configured GPIO 07 (SDD) as input.
Oct 17 02:48:03 ereader user.warn kernel: MMC:Configured GPIO 73 (SDWP) as input.
Oct 17 02:48:03 ereader user.warn kernel: MMC:Configured GPIO 06 (SDCLK) to alternate function 1.
Oct 17 02:48:03 ereader user.warn kernel: MMC:Configured GPIO 08 (CS) as output.
Oct 17 02:48:03 ereader user.info kernel: mmca1
Oct 17 02:48:03 ereader user.warn kernel: MSDOS FS: IO charset utf8
Oct 17 02:48:04 ereader user.warn kernel: USB HAL: DC suspend
Oct 17 02:48:04 ereader user.info kernel: usb_pdc.c: usb-pdc Initialization Success
Oct 17 02:48:04 ereader user.info kernel: pdc_bus.c: Registered Driver devmscd
Oct 17 02:48:04 ereader user.info kernel: devmscd.c: devmscd Initialization Success
Oct 17 02:48:04 ereader user.err kernel: wlan0 (WE) : Buffer for request SIOCGIW
PRIV too small (16<75)
Oct 17 02:48:04 ereader user.err kernel: wlan0 (WE) : Buffer for request SIOCGIW
PRIV too small (32<75)
Oct 17 02:48:04 ereader user.err kernel: wlan0 (WE) : Buffer for request SIOCGIW
PRIV too small (64<75)
Oct 17 02:48:04 ereader user.warn kernel: Before calling wlan_remove function
Oct 17 02:48:04 ereader user.warn kernel: After calling wlan_remove function
Oct 17 02:48:05 ereader user.notice net.agent[688]: unregister event not handled
Oct 17 02:48:13 ereader user.warn kernel: einkfb: einkfb_ioctl enter[code]
The above log covers the time for the below code in the /home/root/start.sh to execute.
[code]/sbin/syslogd
export DISPLAY=:0
export LD_LIBRARY_PATH=/usr/lib/mozilla-minimo
export MOZILLA_FIVE_HOME=/usr/lib/mozilla-minimo
export HOME=/home/root
export MBPIXBUF_FORCE_32BPP_INTERNAL=1
/usr/bin/displayMgr -p -w /var/waveform.bin&
/usr/bin/erbusyd &
/usr/bin/Xfbdev -screen 768x1024x8 -3button -dpi 160 -ac &
/usr/bin/matchbox-window-manager -use_titlebar no -use_cursor no &
/usr/bin/pageBar&
# start toolbar and wait till it runs
/usr/bin/matchbox-panel --size 39 --no-menu --bgcolor White --no-session --default-apps mb-applet-icon-container &
app=mb-applet-icon-container
echo "Waiting for $app ..."
rip=10
while [ $rip -gt 0 ]
do
sleep 1
n=`ps | awk "BEGIN { n = 0 }
\\$5 == \\"$app\\" { n++ }
END { print n }"`
if [ $n -eq 0 ]
then
rip=$((rip-1))
else
rip=0
fi
echo -n .
done
echo "... wait done"
/usr/bin/contentLister --sync &
/usr/bin/powerMgr&
modprobe phci
modprobe usb-storage
/etc/init.d/hotplug start
modprobe mscd
msdisk &
# Temporary fix to show the WiFi mac address to the user
if [ ! -e /mnt/free/wlan_mac.txt ]
then
echo "WiFi card MAC address:" > /mnt/free/wlan_mac.txt
ifconfig wlan0 | awk '$4 ~ /HWaddr/ { mac = $5; gsub(/:/, "-", mac); print mac }' >> /mnt/free/wlan_mac.txt
fi
/usr/bin/wireless.sh stop
Total time roughly 25 seconds.
Out of that 25 seconds they spend at least 9 seconds powering up and shutting down the WLAN.
I don't know about all of you, but I'd like those 9 seconds back. :)
NatCh 11-03-2006, 07:47 PM Out of that 25 seconds they spend at least 9 seconds powering up and shutting down the WLAN.Wouldn't that pretty much garauntee that the FAA will never approve the thing for use on planes? Or am I mis-interpreting?
scotty1024 11-03-2006, 11:14 PM Just don't turn it on during take off. :D
Actually I think we can get this fixed, I don't see any reason why the radio has to be turned on. Or the card be disturbed at all for that matter.
BUt I have other fish to fry the next two days.
NatCh 11-03-2006, 11:20 PM I thought they'd be upset having a wifi blaring at any point in the flight .... :smile:
scotty1024 11-03-2006, 11:32 PM I'll admit I was a bit surprised when they told me it got turned on during the boot up and they then had to turn it back off.
RibRdb2 11-05-2006, 02:16 AM They're loading modules? Wouldn't it be faster to compile it in to the kernel? Or is that some proprietary binary only driver?
|