Lines Matching refs:dql
45 #define DQL_HIST_ENT(dql, idx) ((dql)->history[(idx) % DQL_HIST_LEN]) argument
47 struct dql { struct
88 static inline void dql_queue_stall(struct dql *dql) in dql_queue_stall() argument
99 if (unlikely(now_hi != dql->history_head)) { in dql_queue_stall()
104 (dql->history_head + i) * BITS_PER_LONG) in dql_queue_stall()
106 DQL_HIST_ENT(dql, dql->history_head + i + 1) = 0; in dql_queue_stall()
110 WRITE_ONCE(dql->history_head, now_hi); in dql_queue_stall()
114 map = DQL_HIST_ENT(dql, now_hi); in dql_queue_stall()
118 WRITE_ONCE(DQL_HIST_ENT(dql, now_hi), map | BIT_MASK(now)); in dql_queue_stall()
125 static inline void dql_queued(struct dql *dql, unsigned int count) in dql_queued() argument
130 WRITE_ONCE(dql->last_obj_cnt, count); in dql_queued()
139 dql->num_queued += count; in dql_queued()
142 if (READ_ONCE(dql->stall_thrs)) in dql_queued()
143 dql_queue_stall(dql); in dql_queued()
147 static inline int dql_avail(const struct dql *dql) in dql_avail() argument
149 return READ_ONCE(dql->adj_limit) - READ_ONCE(dql->num_queued); in dql_avail()
153 void dql_completed(struct dql *dql, unsigned int count);
156 void dql_reset(struct dql *dql);
159 void dql_init(struct dql *dql, unsigned int hold_time);