/* * Multi-range support. This can be useful if the size of the allocation * is not expected to be larger than the alignment (like with hugetlb_cma), * and the total amount of memory requested, while smaller than the total * amount of memory available, is large enough that it doesn't fit in a * single physical memory range because of memory holes. * * Fields: * @base_pfn: physical address of range * @early_pfn: first PFN not reserved through cma_reserve_early * @count: size of range * @bitmap: bitmap of allocated (1 << order_per_bit)-sized chunks.
*/ struct cma_memrange { unsignedlong base_pfn; unsignedlong count; union { unsignedlong early_pfn; unsignedlong *bitmap;
}; #ifdef CONFIG_CMA_DEBUGFS struct debugfs_u32_array dfs_bitmap; #endif
}; #define CMA_MAX_RANGES 8
struct cma { unsignedlong count; unsignedlong available_count; unsignedint order_per_bit; /* Order of pages represented by one bit */
spinlock_t lock; struct mutex alloc_mutex; #ifdef CONFIG_CMA_DEBUGFS struct hlist_head mem_head;
spinlock_t mem_head_lock; #endif char name[CMA_MAX_NAME]; int nranges; struct cma_memrange ranges[CMA_MAX_RANGES]; #ifdef CONFIG_CMA_SYSFS /* the number of CMA page successful allocations */
atomic64_t nr_pages_succeeded; /* the number of CMA page allocation failures */
atomic64_t nr_pages_failed; /* the number of CMA page released */
atomic64_t nr_pages_released; /* kobject requires dynamic object */ struct cma_kobject *cma_kobj; #endif unsignedlong flags; /* NUMA node (NUMA_NO_NODE if unspecified) */ int nid;
};
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.