Lines Matching refs:alloc_hint

140 				     unsigned int alloc_hint, bool round_robin)  in sbitmap_find_bit_in_index()  argument
146 sb->map[index].depth, alloc_hint, in sbitmap_find_bit_in_index()
157 int sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint, bool round_robin) in sbitmap_get() argument
162 index = SB_NR_TO_INDEX(sb, alloc_hint); in sbitmap_get()
170 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in sbitmap_get()
172 alloc_hint = 0; in sbitmap_get()
175 nr = sbitmap_find_bit_in_index(sb, index, alloc_hint, in sbitmap_get()
183 alloc_hint = 0; in sbitmap_get()
192 int sbitmap_get_shallow(struct sbitmap *sb, unsigned int alloc_hint, in sbitmap_get_shallow() argument
198 index = SB_NR_TO_INDEX(sb, alloc_hint); in sbitmap_get_shallow()
204 SB_NR_TO_BIT(sb, alloc_hint), true); in sbitmap_get_shallow()
215 alloc_hint = index << sb->shift; in sbitmap_get_shallow()
219 alloc_hint = 0; in sbitmap_get_shallow()
365 sbq->alloc_hint = alloc_percpu_gfp(unsigned int, flags); in sbitmap_queue_init_node()
366 if (!sbq->alloc_hint) { in sbitmap_queue_init_node()
373 *per_cpu_ptr(sbq->alloc_hint, i) = prandom_u32() % depth; in sbitmap_queue_init_node()
383 free_percpu(sbq->alloc_hint); in sbitmap_queue_init_node()
429 hint = this_cpu_read(*sbq->alloc_hint); in __sbitmap_queue_get()
433 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get()
439 this_cpu_write(*sbq->alloc_hint, 0); in __sbitmap_queue_get()
445 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get()
460 hint = this_cpu_read(*sbq->alloc_hint); in __sbitmap_queue_get_shallow()
464 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get_shallow()
470 this_cpu_write(*sbq->alloc_hint, 0); in __sbitmap_queue_get_shallow()
476 this_cpu_write(*sbq->alloc_hint, hint); in __sbitmap_queue_get_shallow()
588 *per_cpu_ptr(sbq->alloc_hint, cpu) = nr; in sbitmap_queue_clear()
626 seq_printf(m, "%u", *per_cpu_ptr(sbq->alloc_hint, i)); in sbitmap_queue_show()