Lines Matching refs:queue

116     QMGR_QUEUE *queue;  in qmgr_entry_select()  local
119 queue = entry->queue; in qmgr_entry_select()
120 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry, queue_peers); in qmgr_entry_select()
121 queue->todo_refcount--; in qmgr_entry_select()
122 QMGR_LIST_APPEND(queue->busy, entry, queue_peers); in qmgr_entry_select()
123 queue->busy_refcount++; in qmgr_entry_select()
144 (queue->busy_refcount > 1 || BACK_TO_BACK_DELIVERY()) in qmgr_entry_select()
147 (queue->last_done + 1 >= event_time()) in qmgr_entry_select()
155 if ((queue->dflags & DEL_REQ_FLAG_CONN_STORE) == 0) { in qmgr_entry_select()
159 myname, queue->name); in qmgr_entry_select()
160 queue->dflags |= DEL_REQ_FLAG_CONN_MASK; in qmgr_entry_select()
174 myname, queue->name); in qmgr_entry_select()
175 queue->dflags &= ~DEL_REQ_FLAG_CONN_STORE; in qmgr_entry_select()
187 QMGR_QUEUE *queue = entry->queue; in qmgr_entry_unselect() local
195 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry, queue_peers); in qmgr_entry_unselect()
196 queue->busy_refcount--; in qmgr_entry_unselect()
197 QMGR_LIST_APPEND(queue->todo, entry, queue_peers); in qmgr_entry_unselect()
198 queue->todo_refcount++; in qmgr_entry_unselect()
210 QMGR_QUEUE *src_queue = entry->queue; in qmgr_entry_move_todo()
254 QMGR_QUEUE *queue = entry->queue; in qmgr_entry_done() local
266 QMGR_LIST_UNLINK(queue->busy, QMGR_ENTRY *, entry, queue_peers); in qmgr_entry_done()
267 queue->busy_refcount--; in qmgr_entry_done()
271 QMGR_LIST_UNLINK(queue->todo, QMGR_ENTRY *, entry, queue_peers); in qmgr_entry_done()
272 queue->todo_refcount--; in qmgr_entry_done()
312 if (queue->window > 1) in qmgr_entry_done()
314 myname, transport->name, queue->name, queue->window); in qmgr_entry_done()
315 if (QMGR_QUEUE_THROTTLED(queue)) /* XXX */ in qmgr_entry_done()
316 qmgr_queue_unthrottle(queue); in qmgr_entry_done()
317 if (QMGR_QUEUE_READY(queue)) in qmgr_entry_done()
318 qmgr_queue_suspend(queue, transport->rate_delay); in qmgr_entry_done()
320 if (!QMGR_QUEUE_SUSPENDED(queue) in qmgr_entry_done()
321 && queue->blocker_tag == transport->blocker_tag) in qmgr_entry_done()
322 qmgr_job_blocker_update(queue); in qmgr_entry_done()
336 queue->last_done = event_time(); in qmgr_entry_done()
344 if (queue->todo.next == 0 && queue->busy.next == 0) { in qmgr_entry_done()
345 if (QMGR_QUEUE_THROTTLED(queue) && qmgr_queue_count > 2 * var_qmgr_rcpt_limit) in qmgr_entry_done()
346 qmgr_queue_unthrottle(queue); in qmgr_entry_done()
347 if (QMGR_QUEUE_READY(queue)) in qmgr_entry_done()
348 qmgr_queue_done(queue); in qmgr_entry_done()
365 QMGR_QUEUE *queue = peer->queue; in qmgr_entry_create() local
370 if (QMGR_QUEUE_THROTTLED(queue)) in qmgr_entry_create()
371 msg_panic("qmgr_entry_create: dead queue: %s", queue->name); in qmgr_entry_create()
384 entry->queue = queue; in qmgr_entry_create()
385 QMGR_LIST_APPEND(queue->todo, entry, queue_peers); in qmgr_entry_create()
386 queue->todo_refcount++; in qmgr_entry_create()
412 int queue_length = queue->todo_refcount + queue->busy_refcount; in qmgr_entry_create()
418 && (now = event_time()) >= queue->clog_time_to_warn) { in qmgr_entry_create()
421 queue->nexthop, queue_length, qmgr_message_count); in qmgr_entry_create()
424 transport = queue->transport; in qmgr_entry_create()
426 && transport->dest_concurrency_limit <= queue->busy_refcount + 1) in qmgr_entry_create()
430 else if (queue->window > var_qmgr_active_limit * active_share) in qmgr_entry_create()
433 else if (queue->peers.next != queue->peers.prev) in qmgr_entry_create()
435 queue->nexthop); in qmgr_entry_create()
450 queue->clog_time_to_warn = now + var_qmgr_clog_warn_time; in qmgr_entry_create()