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

LinuxÄÚ´æ¹ÜÀíÖ®slab·ÖÅäÆ÷·ÖÎö(ÐøËÄ)


Æߣºkmem_cache_free£¨£©µÄʵÏÖ
kmem_cache_freeÓÃÓÚ°Ñ´ÓslabÖзÖÅäµÄ¶ÔÏóÊͷŵô£¬Í¬·ÖÅäÒ»Ñù£¬ËüÊ×ÏÈ»á°ÑËü·Åµ½ACÖУ¬Èç¹ûACÂúÁË£¬Ôò°Ñ¶ÔÏóÊͷŵ½shareÁ´ÖУ¬Èç¹ûshareÒ²ÂúÁË£¬Ò²¾Í°ÑËüÊÍ·ÅÖÁslab¡£À´¿´¾ßÌåµÄ´úÂ룺
void kmem_cache_free (kmem_cache_t *cachep, void *objp)
{
     unsigned long flags;
 
     local_irq_save(flags);
     __cache_free(cachep, objp);
     local_irq_restore(flags);
}
º¯Êýµ÷ÓÃ__cache_free(),´úÂëÈçÏ£º
static inline void __cache_free (kmem_cache_t *cachep, void* objp)
{
     struct array_cache *ac = ac_data(cachep);
 
     check_irq_off();
     //DEBUGÓ㬺öÂÔ
     objp = cache_free_debugcheck(cachep, objp, __builtin_return_address(0));
     //Èç¹ûACÖеĶÔÏñûÓг¬¹ýÏÞÖÆ£¬ÄǾͰÑËüÊͷŵ½ACÖС£
     if (likely(ac->avail < ac->limit)) {
         STATS_INC_FREEHIT(cachep);
         ac_entry(ac)[ac->avail++] = objp;
         return;
     } else {
         //Èç¹ûACÖжÔÏóÊýÄ¿µ½ÁËÏÞÖµ£¬Ôòcache_flusharray£¨£©ºó£¬ÔٰѶÔÏñ¼ÓÈëACÖÐ
         STATS_INC_FREEMISS(cachep);
         cache_flusharray(cachep, ac);
         ac_entry(ac)[ac->avail++] = objp;
     }
}
Èç¹ûµ±Ç°ACÖжÔÏóÊýÒѾ­µ½´ïÏÞÖµ£¬¾Í»áµ÷ÓÃcache_flusharray()½«ÀïÃæµÄ¶ÔÏó“ˢД³öÈ¥¡£´úÂëÈçÏ£º
static void cache_flusharray (kmem_cache_t* cachep, struct array_cache *ac)
{
     int batchcount;
    


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

LinuxϵͳÏÂʹÓÃUSBת´®¿ÚÁ¬½Ó¹¤ÒµÉ豸

 
LinuxϵͳÏÂʹÓÃUSBת´®¿ÚÁ¬½Ó¹¤ÒµÉ豸 ÔÚWindowsÏ¿ÉÒÔʹÓ󬼶ÖÕ¶ËÀ´Á¬½Ó½»»»»úºÍ·ÓÉÆ÷µÈ¹¤ÒµÉ豸£¬¶øÇÒÔÚWindowsÏÂʹÓÃusbת´®¿ÚµÄÏßÒ²ÓÐÏàÓ¦µÄÇý¶¯£¬µ«ÊÇÈçºÎÔÚLinuxÏÂʹÓÃÄØ£¿
¡¡¡¡Ê×ÏÈÒªÓÐÒ»¸öLinuxϵÄÖÕ¶ËÈí¼þ½ÐminicomÈç¹ûûÓÐ×°Õâ¸öµÄÅóÓÑ¿ÉÒÔµ½×Ô¼ºµÄÔ´ÖÐÈ¥ÏÂÔØ£¬È»ºóÄã¾ÍÒª²åÉÏÄãµÄusbת´®¿ÚµÄÏߣ¬ÔÚ ......

Linux²é¿´ºÍÌÞ³ýµ±Ç°µÇ¼Óû§

ÈçºÎÔÚlinuxϲ鿴µ±Ç°µÇ¼µÄÓû§£¬²¢ÇÒÌßµôÄãÈÏΪӦ¸ÃÌßµôµÄÓû§£¿
¿´ÁËÍøÂçÖеÄһЩÀý×Ó.ÔÚÕâÀï×ܽáÒ»ÏÂ.Ö÷ÒªÓõ½µÄÃüÁîÓÐ,w,who,ps,kill,pkill
²é¿´µ±Ç°µÇ¼Óû§:
node8:/home # who
root     :0           2009-11-04 16:26
root     pts/0       &n ......

linux»ñÈ¡ÎļþµÄ·¾¶Ãû¼°ÆäÎļþÃûµÄ·½·¨

1¡¢¼òµ¥²âÊÔʵÀý
 for i in `find . -type f -name "*.c"`
do
  echo $i
  basename $i    »ñÈ¡*.cÎļþÃû
  dirname $i        »ñÈ¡*.c¶ÔÓ¦µÄĿ¼Ãû
done
2¡¢Êµ¼ÊÓ¦ÓÃ
diff LinuxÔ´Â룬²¢½«Óв»Ò»ÑùµÄÔ´ÂëÕûÀíÔÚÒ»Æð£¬ÒªÇó£ºÎļþ ......

Linuxϵͳ³ÌÐòÆô¶¯Òýµ¼¹ý³ÌÏêϸÆÊÎö

 LinuxµÄÒ»¸öÎüÒýÈ˵ÄÌØÐÔ¾ÍÊÇÓû§¿ÉÒÔ×ÔÐж¨ÖÆÕû¸öϵͳ£¬Äã¿ÉÊÇÔËÐÐÒ»¸öÖ»ÓÐ1MµÄ“ÃÔÄã”Linux£¬Ò²¿ÉÒÔÔËÐÐÒ»¸ö¼¸GµÄÇ¿´óLinux¡£¶øÎÞÂÛÄãÔËÐÐÔõÑùµÄLinux£¬Ä㶼ÊÇÏÈ´ÓÒýµ¼³ÌÐò¿ªÊ¼ÔËÐеġ£¶ÔÓÚÆÕͨÓû§£¬´ó¶à¶¼ÊÇÔÚ¸öÈ˵çÄÔÉÏÔËÐÐLinuxµÄ¡£
¡¡¡¡¸öÈ˵çÄÔ£¬ÓÖ½ÐPC»ú£¬ÊÇÎÒÃdz£¼ûµÄʹÓÃIntel»òAMDµÄоƬµÄµç ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ