2011年1月25日 星期二

加快linux開機速度

ELC-E 2010: The Right Approach to Minimal Boot Times
http://www.slideshare.net/andrewmurraympc/elce-the

加快linux開機速度
http://blog.roodo.com/thinkingmore/archives/14947055.html

* 使用 Arjan van de Ven 對 kernel aync 的 patch
* 把不重要的 module 改成 loadable
* 修改init/do_mounts.c以提早mount root
* 修改init/main.c裡的init_post,看了以後,我想應該是避免掉open /dev/console還有移掉不必要的步驟以提速。
* improve memcpy (這我不知道是哪裡的,要再查看看)
* reduce kernel size:這可以加快 u-boot 載入時間。一般手段就移掉不必要的driver/module。
* reduce u-boot delay time:u-boot 預設有 delay time,這可以改掉
* kernel 壓縮或不壓縮:用zImage的話可以減少kernel大小,可是要評估解壓縮時間跟載入時間的平衡來決定壓縮或不壓縮。
* 利用 gcc 的 --finstrument-functions --function-sections 去 profile function 的時間 (簡報說加了這兩個 argument,就可以在 __cyg_profile_func_enter/__cyg_profile_func_exit 裡放 code,這個要鑽研 gcc 試試看。)
* 利用ubootchart/bootchart.org工具來測時間。

沒有留言: