Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxÖеÄÄÚ´æ·ÖÅäºÍÊÍ·ÅÖ®__free_pages()º¯Êý·ÖÎö

  ¼ÇµÃÎÒÃÇÔÚÉÏƪÎÄÕÂmem_init()·ÖÎöÖÐÌáµ½__free_page()º¯ÊýÂð£¿ÎÒÃÇÏÖÔÚÀ´ÍêÉÆËü¡£ËüµÄµ÷Óùý³ÌÊÇÕâÑùµÄ£ºmem_init()->free_all_bootmem_node():ÎÒÃÇÖªµÀÕâ¸öº¯ÊýÊÇͳ¼ÆÒ»¹²ÊÍ·ÅÁ˶àÉÙ¿ÕÏÐÒ³¡£->free_all_bootmem_core()¾ÍÊÇÔÚÕâ¸öº¯ÊýÀïÃæÏȺó¶à´Îµ÷ÓÃ__free_pages()º¯Êý¡£Ä¿µÄ¾ÍÊÇΪÁËÊÍ·Åÿ¸öÄÚ´ænodeÀïÃæÎÞÓõÄÄÚ´æ¿×¶´Ò³¡£ÎÒÃÇÏÖÔÚ¾ÍÀ´ºÃºÃ̽ÌÖÕâ¸öº¯Êý¡£
  fastcall void __free_pages(struct page *page, unsigned int order)
{
   if (!PageReserved(page) && put_page_testzero(page)) {
       if (order == 0)
          free_hot_page(page);//ÎÒÃÇÏÈÀ´¿´¿´Õâ¸öº¯Êý¡£
   else
      __free_pages_ok(page, order);//ÎÒÃÇ×îºó²ÅÀ´ÌÖÂÛÕâ¸öº¯Êý¡£
   }
}
 
  void fastcall free_hot_page(struct page *page)
{
   free_hot_cold_page(page, 0);
}
  static void fastcall free_hot_cold_page(struct page *page, int cold)//Èç¹ûcoldÊÇ0µÄ»°£¬±íʾҪ°ÑpageËùÖ¸ÏòÄÚ´æÒ³Êͷŵ½
                                                                  //ÆäËùÔÚÄÚ´æÒ³ÇøÖе±Ç°´¦ÀíÆ÷µÄ“ÈÈÇø”ÄÚ´æÖУ¬Èç¹ûΪ1µÄ»°£¬¾ÍÊͷŵ½ÕâÒ³ËùÔÚÒ³Çø
                                                              //Öе±Ç°´¦ÀíÆ÷µÄ“ÀäÇø”¸ßËÙ»º´æÄÚ´æÖС£ÔÚÕâÀï¿Ï¶¨Óв»ÉÙÈ˲»Ì«Á˽âlinuxÔÚÆô¶¯ºóÊÇ
     &nbs


Ïà¹ØÎĵµ£º

LinuxÏÂApache2+MySQL5+PHP5°²×°

°²×°»·¾³£ºVMware Workstation 5.5.0 build-18463
Linux°æ±¾£ºRed Hat Enterprise Linux AS (2.6.9-42.EL)
Èí¼þ°æ±¾£ºMySQL5 - mysql-5.0.37.tar.gz
¡¡¡¡¡¡¡¡¡¡Apache2 - httpd-2.2.4.tar.gz
¡¡¡¡¡¡¡¡¡¡PHP5 - php-5.2.1.tar.gz
¡¡¡¡¡¡¡¡¡¡(½«ÒÔÉÏÎļþ±£´æÖÁ/home/tmpĿ¼)
[MySQL]
# cd /home/tmp (½øÈëѹËõ°ü ......

linuxÎļþϵͳÌåϵ½á¹¹ ºÍ ÐéÄâÎļþϵͳ(VFS)

ͼ 1. Linux Îļþϵͳ×é¼þµÄÌåϵ½á¹¹
 
Óû§¿Õ¼ä°üº¬Ò»Ð©Ó¦ÓóÌÐò£¨ÀýÈ磬ÎļþϵͳµÄʹÓÃÕߣ©ºÍ GNU C ¿â£¨glibc£©£¬ËüÃÇΪÎļþϵͳµ÷Ó㨴ò¿ª¡¢¶ÁÈ¡¡¢Ð´ºÍ¹Ø±Õ£©ÌṩÓû§½Ó¿Ú¡£ÏµÍ³µ÷ÓýӿڵÄ×÷ÓþÍÏñÊǽ»»»Æ÷£¬Ëü½«ÏµÍ³µ÷ÓôÓÓû§¿Õ¼ä·¢Ë͵½Äں˿ռäÖеÄÊʵ±¶Ëµã¡£
VFS ÊǵײãÎļþϵͳµÄÖ÷Òª½Ó¿Ú¡£Õâ¸ö×é¼þµ¼³öÒ» ......

linux 2.6 ÄÚºËѧϰС½á Ó²¼þÏà¹Ø¸ÅÄî

1¡¢ÌØȨ¼¶
¡¡¡¡IntelÌåϵ½á¹¹ÒýÈëÌØȨ¼¶ÊÇΪÁËʵÏÖ±£»¤¡£Ëùν386±£»¤Ä£Ê½¾ÍÊÇÔÚ´Ë»ù´¡ÉϽ¨Á¢ÆðÀ´µÄ¡£ÏµÍ³ÖÐÿ¸ö¶Î£¨CS¡¢DS¡¢SS£©¶¼ÓÐ×Ô¼ºµÄÌØȨ¼¶£¬ÏµÍ³ÖÐÿ¸öÈÎÎñ»ò³ÌÐòÒ²¶¼ÓÐ×Ô¼ºµÄÌØȨ¡£
¡¡¡¡2¡¢²Ù×÷ģʽ
¡¡¡¡´¦ÀíÆ÷¼Óµç»òÖØÆôºó£¬Ê×ÏȽøÈëʵģʽ£¬²Ù×÷ϵͳ³õʼ»¯²¿·Ö¸ºÔð´Óʵģʽµ½±£»¤Ä£Ê½µÄÇл»¡£
¡¡¡¡3¡¢¶Î¡¢¶Îà ......

LinuxÏ´´½¨Óë½âѹzip, tar, tar.gzºÍtar.bz2Îļþ ת

ÔÚLinuxÏÂÃæȥѹËõÎļþ»òÕßĿ¼¡£ÎÒÃǽ«Ñ§Ï°zip, tar, tar.gzºÍtar.bz2µÈѹËõ¸ñʽµÄ»ù±¾Ó÷¨¡£
zip¸ñʽÒѳÉΪѹËõÎļþµÄ±ê׼ѡÔñ£¬¶øÇÒËüÔÚwindowsÉÏÒ²ÄÜʹÓá£
¾­³£ÓÃzip¸ñʽѹËõÄÇЩÐèÒª¹²Ïí¸øwindowsÓû§µÄÎļþ¡£
Èç¹ûÖ»Êǹ²Ïí¸ølinuxÓû§»òÕßMacÓû§£¬Æ«ÏòÓÚÑ¡Ôñtar.gz¸ñʽ¡£
ZIP
zip¿ÉÄÜÊÇĿǰʹÓõÃ×î¶àµÄÎĵµÑ¹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ