linuxÍøÂçѧϰ±Ê¼Ç Íø¿¨Çý¶¯Êý¾Ý½ÓÊÕ[zz]
ת×Ôhttp://blog.chinaunix.net/u3/105004/showart_2088056.html
Êý¾Ý½ÓÊÕ
Íø¿¨Çý¶¯µÄÊý¾Ý½ÓÊÕ£¬Êµ¼ÊÉÏÊÇÒ»¸öÉú²úÕß/Ïû·ÑÕßÄ£ÐÍ¡£ºËÐÄÊÇÊäÈë¶ÓÁУ¨È«¾ÖµÄ£¬»òÕßÍø¿¨Ë½Óеģ©¡£Íø¿¨ÊÕµ½Êý¾Ýʱ£¬´¥·¢Öжϡ£ÔÚÖжÏÖ´ÐÐÀý³ÌÖУ¬°Ñskb¹ÒÈëÊäÈë¶ÓÁУ¬²¢³ö·¢ÈíÖжϡ£ÉÔºóµÄij¸öʱ¿Ì£¬µ±ÈíÖжÏÖ´ÐÐʱ£¬ÔٴӸöÓÁÐÖаÑskbÈ¡ÏÂÀ´£¬Í¶µÝ¸øÉϲãÐÒé¡£
Ò» ÈíÖжÏ
2.6°æÖеÄÊý¾Ý´«ÊäÊÇͨ¹ýÈíÖжÏsoftirqÀ´ÊµÏֵġ£ËüÊÇÒÔǰbhµÄÒ»¸öÌæ´úÆ·¡£ÔÀíÉϺÍbh²î²»¶à£¬¶¼ÊÇÉèÖÃÒ»¸öÈ«¾ÖµÄÏòÁ¿softirq_vec£¬²¢ÔÚÄں˳õʼ»¯Ê±£¬µ÷ÓÃnet_dev_init£º
open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL);
open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL);
°Ñ´«ÊäºÍ·¢ËÍÊý¾ÝµÄÈíÖжÏÖжϺ¯ÊýÉèÖÃΪnet_tx_actionºÍnet_rx_action¡£ÐèÒª·¢ËͺͽÓÊÕÊý¾Ýʱ£¬Ö»Òª´¥·¢ÏàÓ¦µÄÈíÖжϣ¬Èç__raise_softirq_irqoff(NET_RX_SOFTIRQ)¡£Äں˾ͻáÔÚÊʵ±Ê±»úÖ´ÐÐdo_softirqÀ´´¦ÀípendingµÄÈíÖжϡ£
¹ØÓÚsoftirqϸ½Ú£¬¿É²Î¿¼" LinuxÄں˵ÄSoftirq»úÖÆ"¡£¹Ø¼üµãÊÇË·¢Æð£¬ËÖ´ÐС£
¶þ softnet_data½á¹¹
ΪÁË·¢»Ó¶àcpuµÄÓÅÊÆ£¬ÒýÈëÁËsoftnet_data½á¹¹¡£
struct softnet_data
{
int throttle;
int cng_level;
int avg_blog;
struct sk_buff_head input_pkt_queue;
struct list_head poll_list;
struct net_device *output_queue;
struct sk_buff *completion_queue;
struct net_device backlog_dev;
}
ÿ¸öcpu¶¼ÓÐ×Ô¼ºµÄsoftnet_data½á¹¹¡£
ǰÈý¸ö±äÁ¿ÓÃÓÚÓµÈû¿ØÖÆ¡£
input_pkt_queue µ±Çý¶¯²»ÊÊÓÃNAPIʱ£¬ÊÕµ½Êý¾Ýºó£¬»á°ÑskbÖ±½Ó¹Òµ½¸Ã¶ÓÁС£¸Ã¶ÓÁÐÊÇËùÓÐÍø¿¨¹²ÏíµÄ¡£Èç¹ûʹÓÃNAPIµÄ»°£¬¾ÍʹÓÃ×Ô¼ºµÄ¶ÓÁС£
poll_list ÓÐÊý¾ÝÒª½ÓÊÕµÄÉ豸¶ÓÁС£Èç¹ûʹÓÃnon NAPI£¬Ôò±»¹ÒÉÏÈ¥µÄÊÇblacklog_dev¡£
output_queue ÓÐÊý¾ÝÒª·¢Ë͵ÄÉ豸¶ÓÁС£
backlog_dev non NAPI·½Ê½Ï£¬Ê¹ÓõÄĬÈÏÉ豸¡£ÆäʵÖ÷ÒªÊÇʹÓÃËüµÄpoll·½·¨¡£¸Ã½á¹¹ÊÇÔÚÄÚºËÆô¶¯ÎªÃ¿¸öcpu³õʼ»¯softnet_data½á¹¹Ê±£¬µ÷ÓÃnet_dev_init½øÐгõʼ»¯µÄ£º
set_bit(__LINK_STATE_START, &queue->backlog_dev.state);
queue->backlog_dev.weight = weight_p;
queue->backlog_dev.poll = process_backlog;
ÆäÖÐprocess_backlog¾ÍÏ൱ÓÚÇý¶¯ÖеÄpoll·
Ïà¹ØÎĵµ£º
1. HCI²ãÐÒé¸ÅÊö£º
HCIÌṩһÌ×ͳһµÄ·½·¨À´·ÃÎÊBluetoothµ×²ã¡£ÈçͼËùʾ£º
´ÓͼÉÏ¿ÉÒÔ¿´³ö£¬Host Controller Interface(HCI) ¾ÍÊÇÓÃÀ´¹µÍ¨HostºÍModule¡£Hostͨ³£¾ÍÊÇPC£¬ ModuleÔòÊÇÒÔ¸÷ÖÖÎïÀíÁ¬½ÓÐÎʽ£¨USB,serial,pc-cardµÈ£©Á¬½Óµ½PCÉϵÄbluetooth Dongle¡£
ÔÚHostÕâÒ»¶Ë£ºapplication,SDP,L2capµÈÐÒé ......
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌá¹©ÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
»·¾³±äÁ¿ÊǺÍShell½ôÃÜÏà¹ØµÄ£¬Óû§µÇ¼ϵͳºó¾ÍÆô¶¯ÁËÒ»¸öShell¡£¶ÔÓÚLinuxÀ´ËµÒ»°ãÊÇbash£¬µ«Ò²¿ÉÒÔÖØÐÂÉ趨»òÇл»µ½ÆäËüµÄ Shell¡£¶ÔÓÚUNIX£¬¿ÉÄÜÊÇCShelll¡£»·¾³±äÁ¿ÊÇͨ¹ýShellÃüÁîÀ´ÉèÖõģ¬ÉèÖúõĻ·¾³±äÁ¿ÓÖ¿ÉÒÔ±»ËùÓе±Ç°Óû§ËùÔËÐеijÌÐòËùʹÓ᣶ÔÓÚbashÕâ¸öShell³ÌÐòÀ´Ëµ£¬¿ÉÒÔͨ¹ý±äÁ¿ÃûÀ´·ÃÎÊÏàÓ¦µÄ»·¾³±äÁ¿ ......
Èç¹ûÄãÕýÔÚѧϰLinux²Ù×÷ϵͳ£¬²»Öª´ÓÄÄÀïÈëÊÖ£¬¿ÉÒԲο¼ÏÂÃæ¸ø³öµÄ9µã½¨Ò飬»¹ÓÐÒ»µãÊDZ¾È˸½¼ÓµÄ£¬Linux³ÌÐò¹¤³Ìʦ·Ç³£³ÔÏ㣬ÒÔºó¿Ï¶¨ÊǸö»ðºìÖ°Òµ¡£²»¹ÜÔõÑù£¬Ö»ÒªÅ¬Á¦µÄѧ£¬ºó¹ûºÜÃÀºÃ¡£
1.ÕÆÎÕÖÁÉÙ50¸öÒÔÉϵij£ÓÃÃüÁî¡£
±ÈÈ磺°²×°ºÍµÇ¼ÃüÁlogin¡¢ shutdown¡¢ halt¡¢ reboot ¡¢mount¡¢umount ¡¢chsh
Îļþ´¦ÀíÃü ......
LinuxÒÆÖ²¿ª·¢ ×¼±¸¹¤×÷£º ×¼±¸½»²æ±àÒ빤¾ßÁ´£ºÕâÀïÎÒÃÇÑ¡ÔñDENXÈí¼þ¹¤³ÌÌṩµÄELDK½»²æ±àÒë»·¾³£¬²Î¿¼µØÖ·£ºhttp://ftp.denx.de/pub/eldk/4.2/£¬ÎÒÃÇʹÓÃÆäÖеÄÒ»Ì×¹¤¾ß¡£×¼±¸¹¤×÷²½ÖèÈçÏ£º 1. ½¨Á¢¹¤×÷Îļþ¼ÐNewMsg2410,²¢½¨Á¢×ÓĿ¼sources works tools mkdir NewMsg2410 mkdir sources works tools 2. ×¼±¸arm- ......