mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-09 16:47:18 +02:00
MINOR: mux-quic: hide traces when woken up on pacing only
Previous commit aligned default and pacing emission. This is a cleaner and more robust code. However, it may disrupt traces analysis when pacing is rescheduled until timer expiration. Hide traces when qcc_io_cb() is woken up only due to pacing and timer is not yet expired. This is implemented by using special TASK_WOKEN_IO for pacing. This should be backported up to 3.1.
This commit is contained in:
parent
9d155ca706
commit
53db43aff2
@ -2511,7 +2511,7 @@ static int qcc_io_send(struct qcc *qcc)
|
|||||||
|
|
||||||
if (qcc_is_pacing_active(qcc->conn)) {
|
if (qcc_is_pacing_active(qcc->conn)) {
|
||||||
if (!LIST_ISEMPTY(frms) && !quic_pacing_expired(&qcc->tx.pacer)) {
|
if (!LIST_ISEMPTY(frms) && !quic_pacing_expired(&qcc->tx.pacer)) {
|
||||||
tasklet_wakeup(qcc->wait_event.tasklet);
|
tasklet_wakeup(qcc->wait_event.tasklet, TASK_F_UEVT1);
|
||||||
total = 0;
|
total = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -2553,7 +2553,7 @@ static int qcc_io_send(struct qcc *qcc)
|
|||||||
if (ret == 1) {
|
if (ret == 1) {
|
||||||
/* qcc_send_frames cannot return 1 if pacing not used. */
|
/* qcc_send_frames cannot return 1 if pacing not used. */
|
||||||
BUG_ON(!qcc_is_pacing_active(qcc->conn));
|
BUG_ON(!qcc_is_pacing_active(qcc->conn));
|
||||||
tasklet_wakeup(qcc->wait_event.tasklet);
|
tasklet_wakeup(qcc->wait_event.tasklet, TASK_F_UEVT1);
|
||||||
++qcc->tx.paced_sent_ctr;
|
++qcc->tx.paced_sent_ctr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2867,6 +2867,13 @@ struct task *qcc_io_cb(struct task *t, void *ctx, unsigned int status)
|
|||||||
{
|
{
|
||||||
struct qcc *qcc = ctx;
|
struct qcc *qcc = ctx;
|
||||||
|
|
||||||
|
/* Check if woken up only for pacing but not yet expired. */
|
||||||
|
if ((status & (TASK_F_UEVT1|TASK_WOKEN_ANY)) == TASK_F_UEVT1 &&
|
||||||
|
!quic_pacing_expired(&qcc->tx.pacer)) {
|
||||||
|
/* hide any trace as no progress should be performed on this invokation. */
|
||||||
|
trace_disable();
|
||||||
|
}
|
||||||
|
|
||||||
TRACE_ENTER(QMUX_EV_QCC_WAKE, qcc->conn);
|
TRACE_ENTER(QMUX_EV_QCC_WAKE, qcc->conn);
|
||||||
|
|
||||||
if (!(qcc->wait_event.events & SUB_RETRY_SEND))
|
if (!(qcc->wait_event.events & SUB_RETRY_SEND))
|
||||||
@ -2882,12 +2889,17 @@ struct task *qcc_io_cb(struct task *t, void *ctx, unsigned int status)
|
|||||||
qcc_refresh_timeout(qcc);
|
qcc_refresh_timeout(qcc);
|
||||||
|
|
||||||
TRACE_LEAVE(QMUX_EV_QCC_WAKE, qcc->conn);
|
TRACE_LEAVE(QMUX_EV_QCC_WAKE, qcc->conn);
|
||||||
|
trace_resume();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
release:
|
release:
|
||||||
qcc_shutdown(qcc);
|
qcc_shutdown(qcc);
|
||||||
qcc_release(qcc);
|
qcc_release(qcc);
|
||||||
|
|
||||||
TRACE_LEAVE(QMUX_EV_QCC_WAKE);
|
TRACE_LEAVE(QMUX_EV_QCC_WAKE);
|
||||||
|
trace_resume();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user