Lines Matching refs:bucket
29 struct mm_bucket bucket[MM_NUM_BUCKETS]; member
90 return &cache->bucket[MAX2(order, MM_MIN_ORDER) - MM_MIN_ORDER]; in mm_bucket_by_order()
160 struct mm_bucket *bucket; in nouveau_mm_allocate() local
165 bucket = mm_bucket_by_size(cache, size); in nouveau_mm_allocate()
166 if (!bucket) { in nouveau_mm_allocate()
177 if (!LIST_IS_EMPTY(&bucket->used)) { in nouveau_mm_allocate()
178 slab = LIST_ENTRY(struct mm_slab, bucket->used.next, head); in nouveau_mm_allocate()
180 if (LIST_IS_EMPTY(&bucket->free)) { in nouveau_mm_allocate()
183 slab = LIST_ENTRY(struct mm_slab, bucket->free.next, head); in nouveau_mm_allocate()
186 LIST_ADD(&slab->head, &bucket->used); in nouveau_mm_allocate()
199 LIST_ADD(&slab->head, &bucket->full); in nouveau_mm_allocate()
213 struct mm_bucket *bucket = mm_bucket_by_order(slab->cache, slab->order); in nouveau_mm_free() local
219 LIST_ADDTAIL(&slab->head, &bucket->free); in nouveau_mm_free()
223 LIST_ADDTAIL(&slab->head, &bucket->used); in nouveau_mm_free()
251 LIST_INITHEAD(&cache->bucket[i].free); in nouveau_mm_create()
252 LIST_INITHEAD(&cache->bucket[i].used); in nouveau_mm_create()
253 LIST_INITHEAD(&cache->bucket[i].full); in nouveau_mm_create()
280 if (!LIST_IS_EMPTY(&cache->bucket[i].used) || in nouveau_mm_destroy()
281 !LIST_IS_EMPTY(&cache->bucket[i].full)) in nouveau_mm_destroy()
285 nouveau_mm_free_slabs(&cache->bucket[i].free); in nouveau_mm_destroy()
286 nouveau_mm_free_slabs(&cache->bucket[i].used); in nouveau_mm_destroy()
287 nouveau_mm_free_slabs(&cache->bucket[i].full); in nouveau_mm_destroy()