5.4 初始化内存管理区列表
回到start_kernel函数,569行的build_all_zonelists()函数,来自mm/page_alloc.c:
2815void build_all_zonelists(void) 2816{ 2817 set_zonelist_order(); 2818 2819 if (system_state == SYSTEM_BOOTING) { 2820 __build_all_zonelists(NULL); 2821 mminit_verify_zonelist(); 2822 cpuset_init_current_mems_allowed(); 2823 } else { 2824 /* we have to stop all cpus to guarantee there is no user 2825 of zonelist */ 2826 stop_machine(__build_all_zonelists, NULL, NULL); 2827 /* cpuset refresh routine should be here */ 2828 } 2829 vm_total_pages = nr_free_pagecache_pages(); 2830 /* ……一大堆注释*/ 2837 if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES)) 2838 page_group_by_mobility_disabled = 1; 2839 else 2840 page_group_by_mobility_disabled = 0; |