Lines Matching refs:alloc_hint
16 sb->alloc_hint = alloc_percpu_gfp(unsigned int, flags); in init_alloc_hint()
17 if (!sb->alloc_hint) in init_alloc_hint()
24 *per_cpu_ptr(sb->alloc_hint, i) = prandom_u32() % depth; in init_alloc_hint()
34 hint = this_cpu_read(*sb->alloc_hint); in update_alloc_hint_before_get()
37 this_cpu_write(*sb->alloc_hint, hint); in update_alloc_hint_before_get()
50 this_cpu_write(*sb->alloc_hint, 0); in update_alloc_hint_after_get()
56 this_cpu_write(*sb->alloc_hint, hint); in update_alloc_hint_after_get()
85 bool alloc_hint) in sbitmap_init_node() argument
107 if (alloc_hint) { in sbitmap_init_node()
111 sb->alloc_hint = NULL; in sbitmap_init_node()
116 free_percpu(sb->alloc_hint); in sbitmap_init_node()
181 unsigned int alloc_hint) in sbitmap_find_bit_in_index() argument
187 nr = __sbitmap_get_word(&map->word, map->depth, alloc_hint, in sbitmap_find_bit_in_index()
198 static int __sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint) in __sbitmap_get() argument
203 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get()
211 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in __sbitmap_get()
213 alloc_hint = 0; in __sbitmap_get()
216 nr = sbitmap_find_bit_in_index(sb, index, alloc_hint); in __sbitmap_get()
223 alloc_hint = 0; in __sbitmap_get()
236 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get()
249 unsigned int alloc_hint, in __sbitmap_get_shallow() argument
255 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get_shallow()
261 SB_NR_TO_BIT(sb, alloc_hint), true); in __sbitmap_get_shallow()
272 alloc_hint = index << sb->shift; in __sbitmap_get_shallow()
276 alloc_hint = 0; in __sbitmap_get_shallow()
288 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get_shallow()
606 *per_cpu_ptr(sbq->sb.alloc_hint, cpu) = nr; in sbitmap_queue_clear()
644 seq_printf(m, "%u", *per_cpu_ptr(sbq->sb.alloc_hint, i)); in sbitmap_queue_show()