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) = get_random_u32_below(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
106 if (alloc_hint) { in sbitmap_init_node()
110 sb->alloc_hint = NULL; in sbitmap_init_node()
115 free_percpu(sb->alloc_hint); in sbitmap_init_node()
172 unsigned int alloc_hint, in sbitmap_find_bit_in_word() argument
179 alloc_hint, wrap); in sbitmap_find_bit_in_word()
192 unsigned int alloc_hint, in sbitmap_find_bit() argument
203 alloc_hint, wrap); in sbitmap_find_bit()
211 alloc_hint = 0; in sbitmap_find_bit()
219 static int __sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint) in __sbitmap_get() argument
223 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get()
231 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in __sbitmap_get()
233 alloc_hint = 0; in __sbitmap_get()
235 return sbitmap_find_bit(sb, UINT_MAX, index, alloc_hint, in __sbitmap_get()
244 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get()
257 unsigned int alloc_hint, in __sbitmap_get_shallow() argument
262 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get_shallow()
263 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in __sbitmap_get_shallow()
265 return sbitmap_find_bit(sb, shallow_depth, index, alloc_hint, true); in __sbitmap_get_shallow()
273 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get_shallow()
606 data_race(*per_cpu_ptr(sb->alloc_hint, cpu) = tag); in sbitmap_update_cpu_hint()
705 seq_printf(m, "%u", *per_cpu_ptr(sbq->sb.alloc_hint, i)); in sbitmap_queue_show()