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()
64 unsigned int depth, unsigned int alloc_hint, bool wrap) in sbitmap_deferred_clear() argument
82 if (!wrap && alloc_hint) in sbitmap_deferred_clear()
83 word_mask &= ~((1UL << alloc_hint) - 1); in sbitmap_deferred_clear()
103 bool alloc_hint) in sbitmap_init_node() argument
125 if (alloc_hint) { in sbitmap_init_node()
129 sb->alloc_hint = NULL; in sbitmap_init_node()
134 free_percpu(sb->alloc_hint); in sbitmap_init_node()
194 unsigned int alloc_hint, in sbitmap_find_bit_in_word() argument
201 alloc_hint, wrap); in sbitmap_find_bit_in_word()
204 if (!sbitmap_deferred_clear(map, depth, alloc_hint, wrap)) in sbitmap_find_bit_in_word()
214 unsigned int alloc_hint, in sbitmap_find_bit() argument
225 alloc_hint, wrap); in sbitmap_find_bit()
233 alloc_hint = 0; in sbitmap_find_bit()
241 static int __sbitmap_get(struct sbitmap *sb, unsigned int alloc_hint) in __sbitmap_get() argument
245 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get()
253 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in __sbitmap_get()
255 alloc_hint = 0; in __sbitmap_get()
257 return sbitmap_find_bit(sb, UINT_MAX, index, alloc_hint, in __sbitmap_get()
266 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get()
279 unsigned int alloc_hint, in __sbitmap_get_shallow() argument
284 index = SB_NR_TO_INDEX(sb, alloc_hint); in __sbitmap_get_shallow()
285 alloc_hint = SB_NR_TO_BIT(sb, alloc_hint); in __sbitmap_get_shallow()
287 return sbitmap_find_bit(sb, shallow_depth, index, alloc_hint, true); in __sbitmap_get_shallow()
295 if (WARN_ON_ONCE(unlikely(!sb->alloc_hint))) in sbitmap_get_shallow()
623 data_race(*per_cpu_ptr(sb->alloc_hint, cpu) = tag); in sbitmap_update_cpu_hint()
722 seq_printf(m, "%u", *per_cpu_ptr(sbq->sb.alloc_hint, i)); in sbitmap_queue_show()