Ç°¼¸ÌìÔÚ LinuxFab É쵀 [QA ÌØËÑ] ¿´µ½´ò¿ª DMA µÄ·½·¨£¬ÆȲ»¼°´ýÄÃÀ´Ò»ÊÔ£¬Ê×ÏÈÏÂÖ¸Áî :
hdparm -Tt /dev/hda
²â²âÄ¿Ç°µÄËٶȣ¬ ͬÑùÖ¸Áî¶àÅܼ¸´ÎÇóÒ»¸öƽ¾ùÖµ, È»ºóÓà :
hdparm -d 1 /dev/hda
°Ñ DMA ¹¦ÄÜ´ò¿ª£¬ÔÙ²âÒ»´ÎËٶȣ¬ÍÛ ! ¹ûÈ»¾ÍÊDz»Ò»Ñù£¬Timing Buffer disk reads µÄЧÂÊ×ã×ãÌáÉýÁËËı¶ÒÔÉÏ !
µ±È»²âÊÔµÄÊý¾Ý²»ÊÇÄÃÀ´¿´Ë¬µÄ£¬ÕæÕýÅܳÌÐòµÄʱºòÒªÓÐЧ¹û²ÅËãÊý£¬ ¨ß.....˵ÕæµÄ£¬¿ªÁËDMAÖ®ºó£¬ÕÕÍù³£µÄÏ°¹ß´ò¿ª Xwindow£¬¿ª¸ö Netscape À´ÉÏÍø£¬¶¼»¹ÊÇÒª¶Á¸öÒ»Õó×Ó£¬ºÃÏóûÓиоõ¿ì¶àÉÙÀÕ ? ¸É´àÄøö±íÀ´¼ÆʱºÃÁË£¬½á¹û¹ûÈ»ÁîÈËʧÍû£¬¿ª²»¿ª DMA£¬½á¹û¶¼Ò»Ñù¡£
°¡....Ôõô»áÕâÑù£¬ºÃ°É£¬¸É´àÄóöÌغÄÓ²Å̵ÄÖ¸Áî locate -u ºÃºÃµÄ¸øËü²Ùһϣ¬ÕâÏÂ×ܸÿ´µÄ³ö²î¾àÁË°É£¬àÅ.....û¿ª DMA »¨ÁË1·Ö22Ã룬Ϊ±ÜÃâÓÐЩ×ÊÁÏ cache ÔÚ RAM ÀïÃæÓ°Ïì²âÊÔ½á¹û£¬ÖØ¿ª»ú´ò¿ª DMA ÔÙÅÜÒ»´Î£¬àÅ.....1 ·Ö 22 Ã룬Ìì°¡£¬ÓÖÊÇͬµÆͬ·Ö !
ÄѵÀ DMA ÊÇûÓõÄÂð ? »¹ÊÇ hdparm ¸ù±¾Ã»Óû¹Ðã¸ö¼ÙÊý¾ÝÀ´ÆÈË ? Ôõô»áÕâÑù ? àÅ.....»¹ºÃÒÔÇ°ÉÏ¿Îû´òî§Ë¯£¬¶Ô DMA ÕⶫÎ÷»¹ÉÔÓиÅÄÔÚÕâÀï¸ú´ó¼Ò½âÊÍһϡ£
Ó²ÅÌÉϵĶ«Î÷£¬Ò»¶¨ÒªÏÈ°áµ½RAMÀïÃæ²ÅÄÜÄÃÀ´Ö´ÐУ¬ÔçÆÚ°Ñ×ÊÁÏÓÉ Hard Disk °áµ½ RAM µÄ¹¤×÷£¬ÊÇÓÉ CPU À´Ö´Ðеģ¬¶øÕâÏ×÷¿É²»ÈçÏëÏóÖеÄÇáËÉ£¬×ÊÁÏÊÇÒÔ 1 byte Ϊµ¥Î»À´°áµÄ£¬ËùÒÔÒª¶ÁÈ¡ 1 MBµÄ×ÊÁÏ£¬CPUÒª´ÓÓ²ÅÌ°á 1 byte µ½ CPUµÄ»º´æÆ÷£¬È»ºóÔÙ´Ó CPU °áµ½ RAM£¬Öظ´ÕâÑùµ¥µ÷¶øÎÞÁĵĶ¯×÷ 1048576 ´Î¡£
ɱ¼¦ÑÉÓÃÅ£µ¶£¬ÒÔÒ»¸ö¸ß¼Ûλ¶øÇÒ¶àÓÃ;µÄ CPU À´×öÕâÑùµÄ¿à¹¤£¬ÊµÔÚÓеã¿Éϧ£¬ÓÚÊÇ DMA(direct-memory-access) controller ±ãµ®ÉúÁË£¬CPU Ö»Òª¸æËßËü "Çë°ïÎÒ°á 1MBµÄ×ÊÁϵ½ÄÚ´æ" £¬DMA controller ¾Í»á¿ªÊ¼×öÕâ·Ý¿à¹¤£¬Í¬Ê±¼ä CPU ±ã¿ÉÒÔÈ¥×ö±ðµÄ¹¤×÷£¬µÈµ½×ÊÁÏ°áºÃ£¬DMA controller »á֪ͨ CPU£¬CPU ¾ÍÓÐÏֳɵÄ×ÊÁÏ¿ÉÒÔÓÃÁË¡£
Á˽â DMA µÄÔË×÷ÔÀí£¬¾Í²»ÄÑÏëÏóΪʲô֮ǰµÄ²âÊÔ½á¹û¶¼Ïàͬ¡£ÒòΪ´¦Àí locate ÕâÒ»¼þ¼òµ¥µÄÊ£¬¶Ô CPU À´ËµÊÇÓÎÈÐÓÐÓàµÄ£¬Ã»ÓÐ DMA ×ö°ïÊÖ£¬ÕÕÑù´¦ÀíµÄºÜÍ×µ±¡£ËùÒÔÄØ£¬µ±ÄãÐèÒª´ÓÓ²ÅÌ´æÈ¡´ó±ÊµÄ×ÊÁÏ£¬Í¬Ê±¼ä CPU loading ÓÖÖصÄʱºò£¬DMA µÄ¼ÛÖµ¾Í»áÏÔÏÖ³öÀ´¡£
ÖØÐÂÉè¼Æ²âÊԵķ½Ê½£¬Òª loading ÖضøÇÒ´æÈ¡ÓÖ¶àµÄ£¬¾ÍÊôѹ mp3 Õâ¼þÊÂÁË£¬ÓÚÊÇ×¥ÁË NotLame À´£¬Õë¶ÔÒ»¸ö 53.8 MB µÄ wav µµ×öѹËõ£¬àÅ.....ûÓÐ DMA »¨ÁË 1 ·Ö 52 Ã룬ÖØ¿ª»ú´ò¿ª DMA ÔÙÊÔÒ»´Î£¬¹þ¹þ ! 1 ·Ö 37 Ã룬¹ûÈ»ÓбȽϿ졣
ÒÔÄ¿Ç°µÄÓ²Å̸úÖ÷»ú°åÀ´Ëµ£¬ºÜÉÙûÓÐÖ§³Ö DMA µÄ£¬´ò¿ª DMA£¬¶à¶àÉÙÉÙ¶¼»áÔö½øÄãµÄЧÄÜ£¬ÓÈÆäÔÚ High Loading µÄʱºòÌرðÏÔ³ö¼ÛÖµ£¬²»ÒªÓÌÔ¥ÁË£¬´ò¿ªÄãµÄ DMA °É!
Õª×Ô£ºhttp://linuxfab.cx