Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 5 of 5] QUIC: ignore blocked status in congestion event handlers

Sergey Kandaurov
August 13, 2023 05:14PM
> On 1 Aug 2023, at 11:45, Roman Arutyunyan <arut@nginx.com> wrote:
>
> # HG changeset patch
> # User Roman Arutyunyan <arut@nginx.com>
> # Date 1690874694 -14400
> # Tue Aug 01 11:24:54 2023 +0400
> # Node ID 80df0852e7ed58631025398694da6dd4dab42611
> # Parent cd0ef56b0f1afaa54d7d2756dad2182628445e04
> QUIC: ignore blocked status in congestion event handlers.
>
> Sometimes, while congestion window allows to send more bytes, the next frame
> still cannot be sent since it's too big. When this happens, push event is not
> triggered from congestion ack/loss event handlers which may delay packet send.
>
> Now the blocked status is ignored and push event is always posted when
> congestion window grows bigger.

It would be nice to provide an example.
In my tests of a simple download without packet lost, I don't see that
additionally posted push events do any useful work, while the number
of posted events raised 2x. Further, I failed to see how the change
would help, because push events are posted then directly from
ngx_quic_handle_ack_frame_range() and ngx_quic_resend_frames().

>
> diff --git a/src/event/quic/ngx_event_quic_ack.c b/src/event/quic/ngx_event_quic_ack.c
> --- a/src/event/quic/ngx_event_quic_ack.c
> +++ b/src/event/quic/ngx_event_quic_ack.c
> @@ -307,7 +307,6 @@ ngx_quic_handle_ack_frame_range(ngx_conn
> void
> ngx_quic_congestion_ack(ngx_connection_t *c, ngx_quic_frame_t *f)
> {
> - ngx_uint_t blocked;
> ngx_msec_t timer;
> ngx_quic_congestion_t *cg;
> ngx_quic_connection_t *qc;
> @@ -319,8 +318,6 @@ ngx_quic_congestion_ack(ngx_connection_t
> qc = ngx_quic_get_connection(c);
> cg = &qc->congestion;
>
> - blocked = (cg->in_flight >= cg->window) ? 1 : 0;
> -
> cg->in_flight -= f->plen;
>
> timer = f->last - cg->recovery_start;
> @@ -358,7 +355,7 @@ ngx_quic_congestion_ack(ngx_connection_t
>
> done:
>
> - if (blocked && cg->in_flight < cg->window) {
> + if (cg->in_flight < cg->window) {
> ngx_post_event(&qc->push, &ngx_posted_events);
> }
> }
> @@ -648,7 +645,6 @@ ngx_quic_resend_frames(ngx_connection_t
> static void
> ngx_quic_congestion_lost(ngx_connection_t *c, ngx_quic_frame_t *f)
> {
> - ngx_uint_t blocked;
> ngx_msec_t timer;
> ngx_quic_congestion_t *cg;
> ngx_quic_connection_t *qc;
> @@ -660,8 +656,6 @@ ngx_quic_congestion_lost(ngx_connection_
> qc = ngx_quic_get_connection(c);
> cg = &qc->congestion;
>
> - blocked = (cg->in_flight >= cg->window) ? 1 : 0;
> -
> cg->in_flight -= f->plen;
> f->plen = 0;
>
> @@ -690,7 +684,7 @@ ngx_quic_congestion_lost(ngx_connection_
>
> done:
>
> - if (blocked && cg->in_flight < cg->window) {
> + if (cg->in_flight < cg->window) {
> ngx_post_event(&qc->push, &ngx_posted_events);
> }
> }
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> https://mailman.nginx.org/mailman/listinfo/nginx-devel

--
Sergey Kandaurov
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[PATCH 0 of 5] QUIC congestion control fixes

Roman Arutyunyan 324 August 01, 2023 03:46AM

[PATCH 1 of 5] QUIC: avoid accessing freed frame

Roman Arutyunyan 83 August 01, 2023 03:46AM

Re: [PATCH 1 of 5] QUIC: avoid accessing freed frame

Sergey Kandaurov 76 August 12, 2023 09:28AM

[PATCH 2 of 5] QUIC: eliminated spurious recovery period

Roman Arutyunyan 84 August 01, 2023 03:46AM

Re: [PATCH 2 of 5] QUIC: eliminated spurious recovery period

Sergey Kandaurov 72 August 12, 2023 09:30AM

[PATCH 3 of 5] QUIC: fixed PTO expiration condition

Roman Arutyunyan 74 August 01, 2023 03:46AM

Re: [PATCH 3 of 5] QUIC: fixed PTO expiration condition

Sergey Kandaurov 79 August 12, 2023 11:10AM

[PATCH 4 of 5] QUIC: fixed probe-congestion deadlock

Roman Arutyunyan 80 August 01, 2023 03:46AM

Re: [PATCH 4 of 5] QUIC: fixed probe-congestion deadlock

Sergey Kandaurov 77 August 13, 2023 04:20PM

Re: [PATCH 4 of 5] QUIC: fixed probe-congestion deadlock

Roman Arutyunyan 69 August 14, 2023 12:38AM

Re: [PATCH 4 of 5] QUIC: fixed probe-congestion deadlock

Sergey Kandaurov 84 August 14, 2023 05:34AM

[PATCH 5 of 5] QUIC: ignore blocked status in congestion event handlers

Roman Arutyunyan 78 August 01, 2023 03:46AM

Re: [PATCH 5 of 5] QUIC: ignore blocked status in congestion event handlers

Sergey Kandaurov 70 August 13, 2023 05:14PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 175
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready