/* * While the block is allocated by the user through drm_buddy_alloc*, * the user has ownership of the link, for example to maintain within * a list, if so desired. As soon as the block is freed with * drm_buddy_free* ownership is given back to the mm.
*/ struct list_head link; struct list_head tmp_link;
};
/* Order-zero must be at least SZ_4K */ #define DRM_BUDDY_MAX_ORDER (63 - 12)
/* * Binary Buddy System. * * Locking should be handled by the user, a simple mutex around * drm_buddy_alloc* and drm_buddy_free* should suffice.
*/ struct drm_buddy { /* Maintain a free list for each order. */ struct list_head *free_list;
/* * Maintain explicit binary tree(s) to track the allocation of the * address space. This gives us a simple way of finding a buddy block * and performing the potentially recursive merge step when freeing a * block. Nodes are either allocated or free, in which case they will * also exist on the respective free list.
*/ struct drm_buddy_block **roots;
/* * Anything from here is public, and remains static for the lifetime of * the mm. Everything above is considered do-not-touch.
*/ unsignedint n_roots; unsignedint max_order;
/* Must be at least SZ_4K */
u64 chunk_size;
u64 size;
u64 avail;
u64 clear_avail;
};
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.