MCPcopy Create free account
hub / github.com/F-Stack/f-stack / queue_can_sleep

Function queue_can_sleep

dpdk/lib/power/rte_power_pmd_mgmt.c:208–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208static inline bool
209queue_can_sleep(struct pmd_core_cfg *cfg, struct queue_list_entry *qcfg)
210{
211 /* this function is called - that means we have an empty poll */
212 qcfg->n_empty_polls++;
213
214 /* if we haven't reached threshold for empty polls, we can't sleep */
215 if (qcfg->n_empty_polls <= emptypoll_max)
216 return false;
217
218 /*
219 * we've reached a point where we are able to sleep, but we still need
220 * to check if this queue has already been marked for sleeping.
221 */
222 if (qcfg->n_sleeps == cfg->sleep_target)
223 return true;
224
225 /* mark this queue as ready for sleep */
226 qcfg->n_sleeps = cfg->sleep_target;
227 cfg->n_queues_ready_to_sleep++;
228
229 return true;
230}
231
232static inline bool
233lcore_can_sleep(struct pmd_core_cfg *cfg)

Callers 3

clb_multiwaitFunction · 0.85
clb_pauseFunction · 0.85
clb_scale_freqFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected