Lines Matching refs:hint
108 unsigned int hint, bool wrap)
110 unsigned int orig_hint = hint;
114 nr = find_next_zero_bit(word, depth, hint);
121 if (orig_hint && hint && wrap) {
122 hint = orig_hint = 0;
131 hint = nr + 1;
132 if (hint >= depth - 1)
133 hint = 0;
426 unsigned int hint, depth;
429 hint = this_cpu_read(*sbq->alloc_hint);
431 if (unlikely(hint >= depth)) {
432 hint = depth ? prandom_u32() % depth : 0;
433 this_cpu_write(*sbq->alloc_hint, hint);
435 nr = sbitmap_get(&sbq->sb, hint, sbq->round_robin);
438 /* If the map is full, a hint won't do us much good. */
440 } else if (nr == hint || unlikely(sbq->round_robin)) {
441 /* Only update the hint if we used it. */
442 hint = nr + 1;
443 if (hint >= depth - 1)
444 hint = 0;
445 this_cpu_write(*sbq->alloc_hint, hint);
455 unsigned int hint, depth;
460 hint = this_cpu_read(*sbq->alloc_hint);
462 if (unlikely(hint >= depth)) {
463 hint = depth ? prandom_u32() % depth : 0;
464 this_cpu_write(*sbq->alloc_hint, hint);
466 nr = sbitmap_get_shallow(&sbq->sb, hint, shallow_depth);
469 /* If the map is full, a hint won't do us much good. */
471 } else if (nr == hint || unlikely(sbq->round_robin)) {
472 /* Only update the hint if we used it. */
473 hint = nr + 1;
474 if (hint >= depth - 1)
475 hint = 0;
476 this_cpu_write(*sbq->alloc_hint, hint);