Lines Matching refs:hint
32 unsigned hint; in update_alloc_hint_before_get() local
34 hint = this_cpu_read(*sb->alloc_hint); in update_alloc_hint_before_get()
35 if (unlikely(hint >= depth)) { in update_alloc_hint_before_get()
36 hint = depth ? get_random_u32_below(depth) : 0; in update_alloc_hint_before_get()
37 this_cpu_write(*sb->alloc_hint, hint); in update_alloc_hint_before_get()
40 return hint; in update_alloc_hint_before_get()
45 unsigned int hint, in update_alloc_hint_after_get() argument
51 } else if (nr == hint || unlikely(sb->round_robin)) { in update_alloc_hint_after_get()
53 hint = nr + 1; in update_alloc_hint_after_get()
54 if (hint >= depth - 1) in update_alloc_hint_after_get()
55 hint = 0; in update_alloc_hint_after_get()
56 this_cpu_write(*sb->alloc_hint, hint); in update_alloc_hint_after_get()
137 unsigned int hint, bool wrap) in __sbitmap_get_word() argument
142 wrap = wrap && hint; in __sbitmap_get_word()
145 nr = find_next_zero_bit(word, depth, hint); in __sbitmap_get_word()
152 if (hint && wrap) { in __sbitmap_get_word()
153 hint = 0; in __sbitmap_get_word()
162 hint = nr + 1; in __sbitmap_get_word()
163 if (hint >= depth - 1) in __sbitmap_get_word()
164 hint = 0; in __sbitmap_get_word()
242 unsigned int hint, depth; in sbitmap_get() local
248 hint = update_alloc_hint_before_get(sb, depth); in sbitmap_get()
249 nr = __sbitmap_get(sb, hint); in sbitmap_get()
250 update_alloc_hint_after_get(sb, depth, hint, nr); in sbitmap_get()
271 unsigned int hint, depth; in sbitmap_get_shallow() local
277 hint = update_alloc_hint_before_get(sb, depth); in sbitmap_get_shallow()
278 nr = __sbitmap_get_shallow(sb, hint, shallow_depth); in sbitmap_get_shallow()
279 update_alloc_hint_after_get(sb, depth, hint, nr); in sbitmap_get_shallow()
486 unsigned int hint, depth; in __sbitmap_queue_get_batch() local
494 hint = update_alloc_hint_before_get(sb, depth); in __sbitmap_queue_get_batch()
496 index = SB_NR_TO_INDEX(sb, hint); in __sbitmap_queue_get_batch()
520 update_alloc_hint_after_get(sb, depth, hint, in __sbitmap_queue_get_batch()