LinuxÄÚºËVmallocÇøÓò´óСµÄ¼ÆËã
ÒÔÇ°×Ô¼º¸ú×ÅÄÚºËÄÚ´æ¹ÜÀíµÄһЩºê¶¨Ò廹ýÄÚ´æ·Ö²¼Í¼
±ÈÈçVMALLOC_START, VMALLOC_END, FIXADDR_STARTµÈµÈ
Ò»Ö±ÒÔΪÕâЩֵÔÚʵ¼ÊÄÚºËÖжà¶àÉÙÉÙ»áÓÐÎó²î£¬Ã»Ï뵽ǰ¼¸Ìì¿´ÁËÒ»ÏÂ
¾ÓÈ»ÍêÈ«ÎǺϡ£
À´ÊÔ׿ÆËãÒ»ÏÂVmallocµÄ×Ü´óС£¬ÎªÁ˱ãÓÚ¼ÆËãÎÒÃÇÈÏΪ1GµÄÄں˿ռä´Ó0µØÖ·¿ªÊ¼¡£
Ê×ÏÈÎÒµÄÎïÀíÄڴ泬¹ýÁË896M£¬Òò´Ëhigh_memory¾ÍÊÇ896M
ÆäÉÏÊÇ8MµÄ¿Õ¶´ÓÃÓÚ²¶×½Ô½½çµÄÄÚ´æ·ÃÎÊ£¬ÓÚÊÇVMALLOC_STARTÔÚ896M+8M = 904M
ÏÂÃæÔÙÀ´¼ÆËãVMALLOC_END¡£
×ÉÏÊÇÒ»¸öÄÚ´æ¿Õ¶´£¬È»ºóÊǹ̶¨Ó³ÉäµÄÇøÓò£¬Õâ¸öÇøÓòµÄ·Ö²¼¿ÉÒԲο¼ÏÂÃæÕâ¸öö¾Ù
enum fixed_addresses {
FIX_HOLE,
FIX_VDSO,
FIX_DBGP_BASE,
FIX_EARLYCON_MEM_BASE,
#ifdef CONFIG_X86_LOCAL_APIC
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
#endif
#ifdef CONFIG_X86_IO_APIC
FIX_IO_APIC_BASE_0,
FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
#endif
#ifdef CONFIG_X86_VISWS_APIC
FIX_CO_CPU, /* Cobalt timer */
FIX_CO_APIC, /* Cobalt APIC Redirection Table */
FIX_LI_PCIA, /* Lithium PCI Bridge A */
FIX_LI_PCIB, /* Lithium PCI Bridge B */
#endif
#ifdef CONFIG_X86_F00F_BUG
FIX_F00F_IDT, /* Virtual mapping for IDT */
#endif
#ifdef CONFIG_X86_CYCLONE_TIMER
FIX_CYCLONE_TIMER, /*cyclone timer register*/
#endif
FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
#ifdef CONFIG_PCI_MMCONFIG
FIX_PCIE_MCFG,
#endif
#ifdef CONFIG_PARAVIRT
FIX_PARAVIRT_BOOTMAP,
#endif
__end_of_permanent_fixed_addresses,
/*
* 256 temporary boot-time mappings, used b
Ïà¹ØÎĵµ£º
hiphop_linux
linux´ÅÅÌIO²é¿´(iostat)
##############
#
# ²Ù×÷
#
##############
# iostat -x 1 10
Linux 2.6.18-92.el5xen 02/03/2009
avg-cpu: %user %nice %system %iowait %steal %idle
......
ʹÓÃvmstatÃüÁîÀ´²ì¿´ÏµÍ³×ÊÔ´Çé¿ö
ÔÚÃüÁîÐз½Ê½Ï£¬ÈçºÎ²é¿´CPU¡¢ÄÚ´æµÄʹÓÃÇé¿ö£¬ÍøÂçÁ÷Á¿ºÍ´ÅÅÌI/O£¿
Q: ÔÚÃüÁîÐз½Ê½Ï£¬ÈçºÎ²é¿´CPU¡¢ÄÚ´æµÄʹÓÃÇé¿ö£¬ÍøÂçÁ÷Á¿ºÍ´ÅÅÌI/O£¿
A: ÔÚÃüÁîÐз½Ê½Ï£¬
1. ²é¿´CPUʹÓÃÇé¿öµÄÃüÁî
""ÿ5ÃëË¢ÐÂÒ»´Î£¬×îÓÒ²àÓÐCPUµÄÕ¼ÓÃÂʵÄÊý¾Ý
$ vmstat 5
""top È»ºó°´Shift+P£¬°´ÕÕ½ ......
µ±Éϲã×¼±¸ºÃÒ»¸ö°üÖ®ºó£¬½»¸øÏÂÃæÕâ¸öº¯Êý´¦Àí
int dev_queue_xmit(struct sk_buff *skb)
{
struct net_device *dev = skb->dev;
struct netdev_queue *txq;
struct Qdisc *q;
int rc = -ENOMEM;
/* GSO will handle the following emulations directly. */
if (netif_needs_gso(dev, skb))
goto gso; ......
Èç¹ûÄãÄÜÕýÈ·»Ø´ðÒÔÏÂÎÊÌâ²¢Éî¿ÌÀí½âÏà¹Ø֪ʶµãÔÀí£¬ÄÇôÄã¿ÉÒÔËãµÃÉÏ»ù±¾ºÏ¸ñµÄLinuxÄں˿ª·¢¹¤³Ìʦ£¬ÊÔÊÔ¿´£¡
1)LinuxÖÐÖ÷ÒªÓÐÄļ¸ÖÖÄÚºËËø£¿
2)LinuxÖеÄÓû§Ä£Ê½ºÍÄÚºËģʽÊÇʲôº¬Ò⣿
3)ÔõÑùÉêÇë´ó¿éÄÚºËÄڴ棿
4)Óû§½ø³Ì¼äͨÐÅÖ÷ÒªÄļ¸ÖÖ·½Ê½£¿
5)ͨ¹ý»ï°éϵͳÉêÇëÄÚºËÄÚ´æµÄº¯ÊýÓÐÄÄЩ£¿
6)Í ......
probeÊÇusb×Óϵͳ×Ô¶¯µ÷ÓõÄÒ»¸öº¯Êý£¬ÓÐUSBÉ豸½Óµ½Ó²¼þ¼¯ÏßÆ÷ʱ£¬usb×Óϵͳ»á¸ù¾Ýproduction IDºÍvendor IDµÄ×éºÏ»òÕßÉ豸µÄclass¡¢subclass¸úprotocolµÄ×éºÏÀ´Ê¶±ðÉ豸µ÷ÓÃÏàÓ¦Çý¶¯³ÌÐòµÄprobe£¨Ì½²â£©º¯Êý£¬¶ÔÓÚskeletonÀ´Ëµ£¬¾ÍÊÇskel_probe¡£ÏµÍ³»á´«µÝ¸ø̽²âº¯ÊýÒ»¸öusb_interface *¸úÒ»¸östruct usb_device_id *×÷Î ......