*/ static void __paginginit free_area_init_core(struct pglist_data *pgdat) { enum zone_type j; int nid = pgdat->node_id; int ret; /* 初始化pgdat->node_size_lock自旋锁 */ pgdat_resize_init(pgdat); #ifdef CONFIG_NUMA_BALANCING spin_lock_init(&pgdat->numabalancing_migrate_lock); p...
|--->pidhash_size =1<<pidhash_shift;| |--->for(i =0; i < pidhash_size; i++)| INIT_HLIST_HEAD(&pid_hash[i]); voidbuild_all_zonelists(void)|--->set_zonelist_order()|--->current_zonelist_order =ZONELIST_ORDER_ZONE;| |--->__build_all_zonelists(NULL);|Memory不支持热插...
在初始化内存结点和内存域之前, 内核首先通过setup_arch()-->bootmem_init()-->zone_sizes_init()来初始化节点和管理区的一些数据项, 其中关键的是初始化了系统中各个内存域的页帧边界,保存在max_zone_pfn数组. [zone_sizes_init](zone_sizes_init函数定义在arch/arm64/mm/init.c?v=4.7, line 92, 由于...
memset(rq, 0, sizeof(*rq)); INIT_LIST_HEAD(&rq->queuelist); INIT_LIST_HEAD(&rq->timeout_list); rq->cpu = -1; rq->q = q; rq->__sector = (sector_t) -1; INIT_HLIST_NODE(&rq->hash); RB_CLEAR_NODE(&rq->rb_node); ...
pgdat->split_queue_len =0;#endif/* 初始化pgdat->kswapd_wait等待队列 */init_waitqueue_head(&pgdat->kswapd_wait);/* 初始化页换出守护进程创建空闲块的大小 * 为2^kswapd_max_order */init_waitqueue_head(&pgdat->pfmemalloc_wait);#ifdefCONFIG_COMPACTIONinit_waitqueue_head(&pgdat->kcompactd_...
init_waitqueue_head(&proc->wait); proc->default_priority = task_nice(current); //binder同步锁 binder_lock(__func__); binder_stats_created(BINDER_STAT_PROC); hlist_add_head(&proc->proc_node, &binder_procs); proc->pid = current->group_leader->pid; ...
27 INIT_HLIST_HEAD(&css_set_table[i]);28 29 /* at bootup time, we don't worry about modular subsystems */30 for (i = 0; i < CGROUP_BUILTIN_SUBSYS_COUNT; i++) {31 struct cgroup_subsys *ss = subsys[i];32 33 BUG_ON(!ss->name);...
start_kernel()-->vfs_caches_init_early();-->dcache_init_early();-->staticstructhlist_head *dentry_hashtabl = alloc_large_system_hash("Dentry cache",sizeof(structhlist_head), dhash_entries,13, HASH_EARLY,&d_hash_shift,&d_hash_mask,0);-->inode_init_early();-->staticstructhlist_he...
static HLIST_HEAD(binder_deferred_list); static DEFINE_MUTEX(binder_deferred_lock); @@ -6203,7 +6223,29 @@ static int __init binder_init(void) return ret; } #ifdef REDROID static void __exit binder_exit(void) { struct binder_device *device; struct hlist_node *tmp; binderfs_exit()...
All it does is initialize the lists, just move the INIT_HLIST_HEAD() into the one caller. Signed-off-by: Jens Axboe <axboe@kernel.dk>master axboe committed Oct 29, 2024 1 parent ba4366f commit 8abf47a Showing 3 changed files with 3 additions and 10 deletions. Whitespace Ignore whitesp...