Lines Matching refs:level
42 unsigned level:6; member
302 l_add_tail(q->es, q->qs + e->level, e); in q_push()
312 l_add_head(q->es, q->qs + e->level, e); in q_push_front()
322 l_add_before(q->es, q->qs + e->level, old, e); in q_push_before()
327 l_del(q->es, q->qs + e->level, e); in q_del()
337 unsigned level; in q_peek() local
342 for (level = 0; level < max_level; level++) in q_peek()
343 for (e = l_head(q->es, q->qs + level); e; e = l_next(q->es, e)) { in q_peek()
372 static struct entry *__redist_pop_from(struct queue *q, unsigned level) in __redist_pop_from() argument
376 for (; level < q->nr_levels; level++) in __redist_pop_from()
377 for (e = l_head(q->es, q->qs + level); e; e = l_next(q->es, e)) in __redist_pop_from()
379 l_del(q->es, q->qs + e->level, e); in __redist_pop_from()
388 unsigned level, nr_levels, entries_per_level, remainder; in q_set_targets_subrange_() local
396 for (level = lbegin; level < lend; level++) in q_set_targets_subrange_()
397 q->target_count[level] = in q_set_targets_subrange_()
398 (level < (lbegin + remainder)) ? entries_per_level + 1u : entries_per_level; in q_set_targets_subrange_()
429 unsigned target, level; in q_redistribute() local
435 for (level = 0u; level < q->nr_levels - 1u; level++) { in q_redistribute()
436 l = q->qs + level; in q_redistribute()
437 target = q->target_count[level]; in q_redistribute()
443 e = __redist_pop_from(q, level + 1u); in q_redistribute()
449 e->level = level; in q_redistribute()
456 l_above = q->qs + level + 1u; in q_redistribute()
464 e->level = level + 1u; in q_redistribute()
475 unsigned new_level = min(q->nr_levels - 1u, e->level + extra_levels); in q_requeue()
478 if (extra_levels && (e->level < q->nr_levels - 1u)) { in q_requeue()
484 de->level = e->level; in q_requeue()
504 e->level = new_level; in q_requeue()
538 static void stats_level_accessed(struct stats *s, unsigned level) in stats_level_accessed() argument
540 if (level >= s->hit_threshold) in stats_level_accessed()
721 e->level = 0u; in init_entry()
868 static struct entry *get_sentinel(struct entry_alloc *ea, unsigned level, bool which) in get_sentinel() argument
870 return get_entry(ea, which ? level : NR_CACHE_LEVELS + level); in get_sentinel()
873 static struct entry *writeback_sentinel(struct smq_policy *mq, unsigned level) in writeback_sentinel() argument
875 return get_sentinel(&mq->writeback_sentinel_alloc, level, mq->current_writeback_sentinels); in writeback_sentinel()
878 static struct entry *demote_sentinel(struct smq_policy *mq, unsigned level) in demote_sentinel() argument
880 return get_sentinel(&mq->demote_sentinel_alloc, level, mq->current_demote_sentinels); in demote_sentinel()
885 unsigned level; in __update_writeback_sentinels() local
889 for (level = 0; level < q->nr_levels; level++) { in __update_writeback_sentinels()
890 sentinel = writeback_sentinel(mq, level); in __update_writeback_sentinels()
898 unsigned level; in __update_demote_sentinels() local
902 for (level = 0; level < q->nr_levels; level++) { in __update_demote_sentinels()
903 sentinel = demote_sentinel(mq, level); in __update_demote_sentinels()
926 unsigned level; in __sentinels_init() local
929 for (level = 0; level < NR_CACHE_LEVELS; level++) { in __sentinels_init()
930 sentinel = writeback_sentinel(mq, level); in __sentinels_init()
931 sentinel->level = level; in __sentinels_init()
934 sentinel = demote_sentinel(mq, level); in __sentinels_init()
935 sentinel->level = level; in __sentinels_init()
1012 get_sentinel(&mq->writeback_sentinel_alloc, e->level, !mq->current_writeback_sentinels), in requeue()
1013 get_sentinel(&mq->writeback_sentinel_alloc, e->level, mq->current_writeback_sentinels)); in requeue()
1293 return maybe_promote(hs_e->level >= mq->write_promote_level); in should_promote()
1295 return maybe_promote(hs_e->level >= mq->read_promote_level); in should_promote()
1312 stats_level_accessed(&mq->hotspot_stats, e->level); in update_hotspot_queue()
1382 stats_level_accessed(&mq->cache_stats, e->level); in __lookup()
1477 e->level = NR_CACHE_LEVELS - 1; in __complete_background_work()
1571 e->level = hint_valid ? min(hint, NR_CACHE_LEVELS - 1) : random_level(cblock); in smq_load_mapping()
1606 return e->level; in smq_get_hint()