Re: [quicwg/base-drafts] Notify the congestion controller of losses first (#3540)
Jana Iyengar <notifications@github.com> Tue, 31 March 2020 06:30 UTC
Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 022E03A1C78 for <quic-issues@ietfa.amsl.com>; Mon, 30 Mar 2020 23:30:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.2
X-Spam-Level:
X-Spam-Status: No, score=-1.2 tagged_above=-999 required=5 tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ucy3oTIKhCA7 for <quic-issues@ietfa.amsl.com>; Mon, 30 Mar 2020 23:30:26 -0700 (PDT)
Received: from out-19.smtp.github.com (out-19.smtp.github.com [192.30.252.202]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A958E3A1C6B for <quic-issues@ietf.org>; Mon, 30 Mar 2020 23:30:26 -0700 (PDT)
Received: from github-lowworker-cd7bc13.ac4-iad.github.net (github-lowworker-cd7bc13.ac4-iad.github.net [10.52.25.102]) by smtp.github.com (Postfix) with ESMTP id 9118B52111F for <quic-issues@ietf.org>; Mon, 30 Mar 2020 23:30:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1585636225; bh=wXkF/YqW08A1CLARqofRzi7dlHr1FXzHGB92ePdtGs8=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=GbtcA10fUfPNSx0snq4ygkRsOuVFlNPSmR5Wfpy3ay4Cxp5jHW1a55zaJJsCuulYH crIhJJCjt8fOdZ355ZKqrgWn/paQ4lb5wbI7bkdcBxtsYMFJ4NcQi3Mzj0ROtYuQ0C BI24S+43rUL0RxSdL5aLbB63sEBtWMwX+8pW3SEI=
Date: Mon, 30 Mar 2020 23:30:25 -0700
From: Jana Iyengar <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJK6R4QYVACE7S73SKDN4R3CIDEVBNHHCF2VMJI@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3540/review/384421422@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3540@github.com>
References: <quicwg/base-drafts/pull/3540@github.com>
Subject: Re: [quicwg/base-drafts] Notify the congestion controller of losses first (#3540)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5e82e38180721_3e6f3ffce66cd9641440f2"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: janaiyengar
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/9c_2oGYt3RVrfie2pmQVb6fgkwE>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 31 Mar 2020 06:30:37 -0000
@janaiyengar commented on this pull request. This looks like a good fix. A few comments. > +DetectLostPackets is called every time an ACK is received or the time threshold +loss detection timer expires and operates on the sent_packets for that packet +number space. ```suggestion DetectLostPackets is called every time an ACK is received or the time threshold loss detection timer expires. This function operates on the sent_packets for that packet number space and returns a list of packets newly detected as lost. ``` > @@ -1265,7 +1244,8 @@ OnLossDetectionTimeout(): GetEarliestTimeAndSpace(loss_time) if (earliest_loss_time != 0): // Time threshold loss Detection - DetectLostPackets(pn_space) + lost_packets = DetectLostPackets(pn_space) + OnPacketsLost(lost_packets) ```suggestion if (!lost_packets.empty()): OnPacketsLost(lost_packets) ``` > @@ -1517,7 +1494,7 @@ Invoked from DetectLostPackets when packets are deemed lost. CongestionEvent(largest_lost_packet.time_sent) How about also changing this to the following, and removing the line before this (last() is a language-specific method, so I'm suggesting largest())? ```suggestion CongestionEvent(lost_packets.largest().time_sent) ``` > @@ -1108,14 +1108,16 @@ OnAckReceived(ack, pn_space): largest_acked_packet[pn_space] = max(largest_acked_packet[pn_space], ack.largest_acked) + // Determine which packets have been acknowledged and remove ```suggestion // DetectNewlyAckedPackets finds packets have been newly acknowledged and removes ``` > @@ -1108,14 +1108,16 @@ OnAckReceived(ack, pn_space): largest_acked_packet[pn_space] = max(largest_acked_packet[pn_space], ack.largest_acked) + // Determine which packets have been acknowledged and remove + // them from sent_packets. + newly_acked_packets = DetectNewlyAckedPackets(ack, pn_space) ```suggestion newly_acked_packets = DetectAndRemoveAckedPackets(ack, pn_space) ``` here and below > @@ -1128,13 +1130,12 @@ OnAckReceived(ack, pn_space): if (ACK frame contains ECN information): ProcessECN(ack, pn_space) - for acked_packet in newly_acked_packets: - OnPacketAcked(acked_packet.packet_number, pn_space) - - DetectLostPackets(pn_space) + lost_packets = DetectLostPackets(pn_space) ```suggestion lost_packets = DetectAndRemoveLostPackets(pn_space) ``` here and below > @@ -1434,26 +1411,27 @@ increases bytes_in_flight. ## On Packet Acknowledgement Invoked from loss detection's OnPacketAcked and is supplied with the ```suggestion Invoked from loss detection's OnAckReceived and is supplied with the ``` > @@ -1499,15 +1477,14 @@ Invoked when an ACK frame with an ECN section is received from the peer. Invoked from DetectLostPackets when packets are deemed lost. ~~~ - InPersistentCongestion(largest_lost_packet): + InPersistentCongestion(lost_packets): pto = smoothed_rtt + max(4 * rttvar, kGranularity) + max_ack_delay congestion_period = pto * kPersistentCongestionThreshold // Determine if all packets in the time period before the // newest lost packet, including the edges, are marked ```suggestion // largest newly lost packet, including the edges, are marked ``` > ~~~ - InCongestionRecovery(sent_time): + InLossRecovery(sent_time): ```suggestion InCongestionRecovery(sent_time): ``` Revert this change. Was this deliberate? The term congestion recovery is used earlier in the spec and the term is defined. > - if (InCongestionRecovery(acked_packet.time_sent)): - // Do not increase congestion window in recovery period. - return - if (IsAppOrFlowControlLimited()): - // Do not increase congestion_window if application - // limited or flow control limited. - return - if (congestion_window < ssthresh): - // Slow start. - congestion_window += acked_packet.size - else: + OnPacketsAcked(acked_packets): + for (packet in acked_packets): + // Remove from bytes_in_flight. + bytes_in_flight -= packet.size + if (InLossRecovery(packet.time_sent)): ```suggestion if (InCongestionRecovery(packet.time_sent)): ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/quicwg/base-drafts/pull/3540#pullrequestreview-384421422
- [quicwg/base-drafts] Notify the congestion contro… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… Alessandro Ghedini
- Re: [quicwg/base-drafts] Notify the congestion co… Christoph Paasch
- Re: [quicwg/base-drafts] Notify the congestion co… martinduke
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… Jana Iyengar
- Re: [quicwg/base-drafts] Notify the congestion co… Marten Seemann
- Re: [quicwg/base-drafts] Notify the congestion co… Marten Seemann
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… Jana Iyengar
- Re: [quicwg/base-drafts] Notify the congestion co… Jana Iyengar
- Re: [quicwg/base-drafts] Notify the congestion co… Jana Iyengar
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… ianswett
- Re: [quicwg/base-drafts] Notify the congestion co… Kazu Yamamoto