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·
Ïà¹ØÎĵµ£º
ÔÚLinuxÏ£¬ÎÒÃÇʹÓÃulimit -nÃüÁî¿ÉÒÔ¿´µ½µ¥¸ö½ø³ÌÄܹ»´ò¿ªµÄ×î´óÎļþ¾ä±úÊýÁ¿(socketÁ¬½ÓÒ²ËãÔÚÀïÃæ)¡£ÏµÍ³Ä¬ÈÏÖµ1024¡£
¶ÔÓÚÒ»°ãµÄÓ¦ÓÃÀ´Ëµ(ÏóApache¡¢ÏµÍ³½ø³Ì)1024ÍêÈ«×㹻ʹÓᣵ«ÊÇÈçºÎÏósquid¡¢mysql¡¢javaµÈµ¥½ø³Ì´¦Àí´óÁ¿ÇëÇóµÄÓ¦ÓÃÀ´Ëµ¾ÍÓеã×½½ó¼ûÖâÁË¡£Èç¹ûµ¥¸ö½ø³Ì´ò¿ªµÄÎļþ¾ä±úÊýÁ¿³¬¹ýÁËϵͳ¶¨ÒåµÄÖµ£¬¾Í ......
Ò»£® ÒÔrootÉí·Ý½¨Á¢tuxedoÓû§£¬²¢ÒÔtuxeduÓû§µÇ½£¬´ËÓû§½«×öΪÒÔºótuxedo¹ÜÀíÔ±,Óû§Ä¬ÈÏĿ¼Ϊ/home/tuxedo£»
¶þ£® ÓÃFTP°Ñ°²×°Îļþ£¨tuxedo81_linux.bin£©ºÍÓû§Ðí¿ÉÖ¤ÊéÎļþ£¨lic.txt£©´«µ½/home/tuxedoĿ¼ÖУ»
Èý. ÅäÖû·¾³±äÁ¿£¬.bash_profileÎļþ£¬¸½ÎÄÄ©£»
ËÄ£® ½øÈë/home/tuxedoĿ¼ÖУ¬Ö´ÐÐs ......
Linuxµç×ÓÊéÏÂÔØ——µÚÒ»²¿·Ö£º Linux»ù´¡Ó¦ÓÃ
µÚÒ»²¿·Ö£ºLinux»ù´¡Ó¦ÓÃ
1¡¢¡¶Linux´ÓÈëÃŵ½¾«Í¨¡·
http://www.gouhuo.com/study/linuxbook.zip
2¡¢ Linux ϵͳ°²È«ÓëÓÅ»¯ÖÐÎÄ°æ
Õâ±¾ÊéµÄÓ¢ÎÄ°æ“Get Acquainted with Linux Security and Optimization System”£¨¼ò³ÆLinuxSOS£©ÊÇLinuxÎĵµ¼Æ»®£¨ ......
Ò»¡¢¼à¿Øwindowsϵͳ£º
1¡¢¼àÊÓÁ¬½ÓÇ°µÄ×¼±¸¹¤×÷
1£©½øÈë±»¼àÊÓwindowsϵͳ£¬¿ªÆôÒÔ϶þ¸ö·þÎñRemote Procedure Call(RPC) ºÍRemote Registry Service (¿ªÊ¼—)ÔËÐÐ ÖÐÊäÈëservices.msc£¬¿ªÆô¶ÔÓ¦·þÎñ¼´¿É)¡£
2£©ÔÚ±»¼àÊÓµ ......