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

linux 2.6Ô´´úÂëÇé¾°·ÖÎö±Ê¼ÇÖ®ÄÚ´æ6

µ±ramСÓÚ896mbʱµÄ×îÖÕÄÚºËÒ³±í
ÓÉÄÚºËÒ³±íËùÌṩµÄ×îÖÕÓ³Éä±ØÐë°Ñ´Ó0xc0000000¿ªÊ¼µÄÏßÐÔµØַת»¯Îª´Ó0¿ªÊ¼µÄÎïÀíµØÖ·¡£
#define __pa(x)   ((unsigned long)(x)-PAGE_OFFSET)½«´Ópage_offset¿ªÊ¼µÄÏßÐÔµØַת»»³ÉÏàÓ¦µÄÎïÀíµØÖ·¡£
#define __va(x)   ((void *)((unsigned long)(x)+PAGE_OFFSET))ÓëÉÏÃæµÄ·´Ïò¡£
void __init paging_init(void)
{
#ifdef CONFIG_X86_PAE
        set_nx();
        if (nx_enabled)
                printk("NX (Execute Disable) protection: active\n");
#endif
        pagetable_init();
        load_cr3(swapper_pg_dir);
#ifdef CONFIG_X86_PAE
        /*We will bail out later - printk doesn't work right now so the user would just see a hanging kernel.*/
        if (cpu_has_pae)
                set_in_cr4(X86_CR4_PAE);
#endif
        __flush_tlb_all();
        kmap_init();
        zone_sizes_init();
}
¿´Õâ¸öº¯ÊýÖÐ×î»ù±¾µÄһЩ³ÌÐòÐУ¬ÊÝÉíºóµÄº¯Êý£º
¼¸¸ö±äÁ¿£ºpgd_tÃèÊöҳȫ¾ÖĿ¼Ïpmd_tÃèÊöÒ³ÖмäÏpud_tÒ³Éϼ¶Ä¿Â¼£¬pte_tÒ³±íÏî¡£
#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))ÕÒµ½ÏßÐÔµØÖ·address¶ÔÓ¦µÄĿ¼ÏîÔÚҳȫ¾ÖĿ¼ÖеÄË÷Òý£¨Ïà¶ÔλÖã©
ͨ¹ýºêÓëpgd_baseÏà¼Ó£¬µÃµ½µ±Ç°pgd¡£ÔÚÍâ²ãÑ­»·ÖбéÀú£¬Ñ­»·ÖкêµÄ×÷ÓÃÊDZíʾҳȫ¾ÖĿ¼±íÖбíÏî¸öÊý¡£½øº¯Êýone_md_table_init¡£
pud = pud_offset(pgd, 0);½ÓÊÕÖ¸Ïòҳȫ¾ÖĿ¼ÏîµÄÖ¸ÕëpgdºÍÏßÐÔµØÖ·addr×÷Ϊ²ÎÊý¡£Õâ¸öºê²úÉúÒ³Éϼ¶Ä¿Â¼ÖÐĿ¼Ïîaddr¶ÔÓ¦µÄÏßÐÔµØÖ·¡£ÔÚÁ½¼¶»òÕßÈý¼¶·ÖҳϵͳÖУ¬²úÉúpgd,Ò»¸öҳȫ¾ÖĿ¼ÏîµÄµØÖ·¡£
pmd_table = pmd_offset(pud, 0);²úÉúÁËĿ¼ÏîaddrÔÚÒ³ÖмäĿ¼ÖеÄÆ«ÒƵØÖ·£¬ÔÚÁ½¼¶»òÕßÈ


Ïà¹ØÎĵµ£º

LinuxÖеĵØÖ·¿Õ¼ä

LinuxÖеĵØÖ·¿Õ¼ä
ÓÐÕâôһϵÁеÄÎÊÌ⣬ÊÇ·ñÔÚÀ§ÈÅ×ÅÄ㣺Óû§³ÌÐò±àÒëÁ¬½ÓÐγɵĵØÖ·¿Õ¼äÔÚʲô·¶Î§ÄÚ£¿Äں˱àÒëºóµØÖ·¿Õ¼äÔÚʲô·¶Î§ÄÚ£¿Òª¶ÔÍâÉè½øÐзÃÎÊ£¬I/OµÄµØÖ·¿Õ¼äÓÖÊÇʲôÑùµÄ£¿
ÏȻشðµÚÒ»¸öÎÊÌâ¡£Linux×î³£¼ûµÄ¿ÉÖ´ÐÐÎļþ¸ñʽΪelf(Executable and Linkable Format)¡£ÔÚelf¸ñʽµÄ¿ÉÖ´ÐдúÂëÖУ¬ld×ÜÊÇ´Ó0x ......

¼àÊÓLinuxϵͳ¸ºÔØ×´¿öµÄ¼¸¸ö¹¤¾ß

1. vmstat
Õâ¸ö¹¤¾ß¿ÉÒÔÈÃÄãÁ˽⵽ϵͳ×ÊÔ´µ±Ç°µÄ¸ºÔØÂÊ£¬°üÀ¨CPU£¬Äڴ棬swap¿Õ¼ä£¬ioµÈµÈ¡£
»ù±¾Ó÷¨
$ vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r  b   swpd   free   buff  cache   si   so&n ......

LinuxÏÂscpµÄÓ÷¨


scp¾ÍÊÇsecure copy£¬Ò»¸öÔÚlinuxÏÂÓÃÀ´½øÐÐÔ¶³Ì¿½±´ÎļþµÄÃüÁî¡£
ÓÐʱÎÒÃÇÐèÒª»ñµÃÔ¶³Ì·þÎñÆ÷ÉϵÄij¸öÎļþ£¬¸Ã·þÎñÆ÷¼ÈûÓÐÅäÖÃftp·þÎñÆ÷£¬Ò²Ã»ÓÐ×ö¹²Ïí£¬ÎÞ·¨Í¨¹ý³£¹æ;¾¶»ñµÃÎļþʱ£¬Ö»ÐèҪͨ¹ý¼òµ¥µÄscpÃüÁî±ã¿É´ïµ½Ä¿µÄ¡£
Ò»¡¢½«±¾»úÎļþ¸´ÖƵ½Ô¶³Ì·þÎñÆ÷ÉÏ
#scp /home/administrator/news.txt root@192.168.6.12 ......

linux 2.6Ô´´úÂëÇé¾°·ÖÎö±Ê¼ÇÖ®ÄÚ´æ3

¹ØÓÚe820
   e820ÊÇBIOSµÄ£¨int 0x15£©ÖжϹØÁªµÄ¡£ÔÚʹÓôËÖжÏʱ£¬axÖбØÐëÊÇe820(ireg.ax=0xe820;)¡£Í¨¹ý´ËÖжϿÉÒԵõ½ÄÚ´æµÄϵͳ²¼¾Ö¡£Í¨¹ýdoÑ­»·£¬Ã¿´ÎµÃµ½Ò»¶Î¡£
/linux32/arch/x86/include/asm/e820.h
ºêE820_MAPÊÇstruct e820entryÊý¾Ý½á¹¹µÄÖ¸Õ룬´æ·ÅÔÚ²ÎÊý¿éÖÐλÒÆΪ0x2d0µÄµØ·½¡£
#define E820M ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ