/* *pcpu_block_mdisthemetadatablockstruct. *Eachchunk'sbitmapissplitintoanumberoffullblocks. *Allunitsareintermsofbits. * *Thescanhintisthelargestknowncontiguousareabeforethecontighint. *Itisnotnecessarilytheactuallargestcontighintthough.Thereisan *invariantthatthescan_hint_start>contig_hint_startiff *scan_hint==contig_hint.Thisisnecessarybecausewhenscanningforward, *wedon'tknowifanewcontighintwouldbebetterthanthecurrentone.
*/ struct pcpu_block_md { int scan_hint; /* scan hint for block */ int scan_hint_start; /* block relative starting
position of the scan hint */ int contig_hint; /* contig hint for block */ int contig_hint_start; /* block relative starting
position of the contig hint */ int left_free; /* size of free space along
the left side of the block */ int right_free; /* size of free space along
the right side of the block */ int first_free; /* block position of first free */ int nr_bits; /* total bits responsible for */
};
void *data; /* chunk data */ bool immutable; /* no [de]population allowed */ bool isolated; /* isolated from active chunk
slots */ int start_offset; /* the overlap with the previous regiontohaveapagealigned
base_addr */ int end_offset; /* additional area required to havetheregionendpage
aligned */ #ifdef NEED_PCPUOBJ_EXT struct pcpuobj_ext *obj_exts; /* vector of object cgroups */ #endif
int nr_pages; /* # of pages served by this chunk */ int nr_populated; /* # of populated pages */ int nr_empty_pop_pages; /* # of empty populated pages */ unsignedlong populated[]; /* populated bitmap */
};
staticinlinebool need_pcpuobj_ext(void)
{ if (IS_ENABLED(CONFIG_MEM_ALLOC_PROFILING)) returntrue; if (!mem_cgroup_kmem_disabled()) returntrue; returnfalse;
}
struct percpu_stats {
u64 nr_alloc; /* lifetime # of allocations */
u64 nr_dealloc; /* lifetime # of deallocations */
u64 nr_cur_alloc; /* current # of allocations */
u64 nr_max_alloc; /* max # of live allocations */
u32 nr_chunks; /* current # of live chunks */
u32 nr_max_chunks; /* max # of live chunks */
size_t min_alloc_size; /* min allocation size */
size_t max_alloc_size; /* max allocation size */
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.