struct mem_section { @@ -1183,8 +1201,7 @@ struct mem_section { */ unsigned long section_mem_map; /* See declaration of similar field in struct zone */ unsigned long *pageblock_flags; struct mem_section_usage *usage; #ifdef CONFIG_PAGE_EXTENSION /* * If SPARSEMEM, pgdat doesn't ...
1181 + struct mem_section_usage { 1182 + DECLARE_BITMAP(subsection_map, SUBSECTIONS_PER_SECTION); 1183 + /* See declaration of similar field in struct zone */ 1184 + unsigned long pageblock_flags[0]; 1185 + }; 1186 + 1169 1187 struct page; 1170 1188 struct page_ext; 11...
sparse_init_one_section(__nr_to_section(pnum), pnum, map, usage, SECTION_IS_EARLY);//【2.4】usage = (void*) usage +mem_section_usage_size(); } sparse_buffer_fini();//【2.5】return; failed:/*We failed to allocate, mark all the following pnums as not present*/for_each_present_s...
#ifdefCONFIG_TASK_XACCT/* Accumulated RSS usage: */u64 acct_rss_mem1;/* Accumulated virtual memory usage: */u64 acct_vm_mem1;/* stime + utime since last update: */u64 acct_timexpd;#endif #ifdefCONFIG_CPUSETS/* Protected by ->alloc_lock: */nodemask_t mems_allowed;/* Seqence num...
* scheduling-critical items should be added above here.*/randomized_struct_fields_startvoid*stack; refcount_t usage;/*Per task flags (PF_*), defined further below:*/unsignedintflags; unsignedint
#endif #ifdef CONFIG_TASK_XACCT /* Accumulated RSS usage: */ u64 acct_rss_mem1; /* Accumulated virtual memory usage: */ u64 acct_vm_mem1; /* stime + utime since last update: */ u64 acct_timexpd; #endif #ifdef CONFIG_CPUSETS /* Protected by ->alloc_lock: */ nodemask_t mems...
/* Usage count. *DO NOT USE DIRECTLY*. See page_ref.h */ atomic_t _refcount; #ifdef CONFIG_MEMCG structmem_cgroup*mem_cgroup; #endif /* * On machines where all RAM is mapped into kernel address space, * we can simply calculate the virtual address. On machines with ...
section:主要用于稀疏内存模型SPARSEMEM,可忽略。 node:NUMA节点号,标识该page属于哪一个节点。 zone:内存域标志,标识该page属于哪一个zone。 flag:page的状态标识,常用的有: PG_locked:page被锁定,说明有使用者正在操作该page。 PG_error:状态标志,表示涉及该page的IO操作发生了错误。
在Linux系统中, 进程在/linux/include/linux/sched.h 头文件中被定义为task_struct, 它是一个结构体, 一个它的实例化即为一个进程, task_struct由许多元素构成, 下面列举一些重要的元素进行分析。
* private allocations for its own usage. * 如果页面缓存页面包含文件系统特定数据(通常在page->private处), * 则设置PG_private位标志。它可以被私有分配用于自己的使用。 * * During initiation of disk I/O, PG_locked is set. This bit is set before I/O ...