Lines Matching refs:alloc_hint
114 int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin) in sbitmap_get() argument
119 index = SB_NR_TO_INDEX(sb, alloc_hint); in sbitmap_get()
124 SB_NR_TO_BIT(sb, alloc_hint), in sbitmap_get()
133 alloc_hint = index << sb->shift; in sbitmap_get()
137 alloc_hint = 0; in sbitmap_get()
145 int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint, in sbitmap_get_shallow() argument
151 index = SB_NR_TO_INDEX(sb, alloc_hint); in sbitmap_get_shallow()
156 SB_NR_TO_BIT(sb, alloc_hint), true); in sbitmap_get_shallow()
164 alloc_hint = index << sb->shift; in sbitmap_get_shallow()
168 alloc_hint = 0; in sbitmap_get_shallow()
314 sbq->alloc_hint = alloc_percpu_gfp(unsigned int, flags); in sbitmap_queue_init_node()
315 if (!sbq->alloc_hint) { in sbitmap_queue_init_node()
322 *per_cpu_ptr(sbq->alloc_hint, i) = prandom_u32() % depth; in sbitmap_queue_init_node()
331 free_percpu(sbq->alloc_hint); in sbitmap_queue_init_node()
377 hint = this_cpu_read(*sbq->alloc_hint); in __sbitmap_queue_get()
381 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get()
387 this_cpu_write(*sbq->alloc_hint, 0); in __sbitmap_queue_get()
393 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get()
408 hint = this_cpu_read(*sbq->alloc_hint); in __sbitmap_queue_get_shallow()
412 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get_shallow()
418 this_cpu_write(*sbq->alloc_hint, 0); in __sbitmap_queue_get_shallow()
424 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get_shallow()
523 *per_cpu_ptr(sbq->alloc_hint, cpu) = nr; in sbitmap_queue_clear()
561 seq_printf(m, "%u", *per_cpu_ptr(sbq->alloc_hint, i)); in sbitmap_queue_show()