* [PATCH 08/29] Honour initial RTT estimate
@ 2007-04-12 21:15 Arnaldo Carvalho de Melo
2007-04-12 21:22 ` David Miller
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2007-04-12 21:15 UTC (permalink / raw)
To: dccp
This is a small optimisation which improves the accuracy of TX
RTT sampling when an initial RTT sample (e.g. from the intial
Request/Response exchange) is available.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
net/dccp/ccids/ccid3.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index a20b636..9d661e4 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -469,28 +469,29 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
else /* can not exceed 100% */
hctx->ccid3hctx_p = 1000000 / pinv;
- skb_get_timestamp(skb, &now);
-
/*
* Calculate new round trip sample as per [RFC 3448, 4.3] by
* R_sample = (now - t_recvdata) - t_elapsed
*/
+ skb_get_timestamp(skb, &now);
r_sample = dccp_sample_rtt(sk, &now, &packet->dccphtx_tstamp);
/*
- * Update RTT estimate by
- * If (No feedback recv)
+ * Update RTT estimate (honours RTT from SYN exchange):
+ * If (No RTT sample so far)
* R = R_sample;
* Else
* R = q * R + (1 - q) * R_sample;
*
* q is a constant, RFC 3448 recomments 0.9
*/
+ hctx->ccid3hctx_rtt = hctx->ccid3hctx_rtt = 0 ? r_sample
+ : (9 * hctx->ccid3hctx_rtt + r_sample) / 10;
+
if (hctx->ccid3hctx_state = TFRC_SSTATE_NO_FBACK) {
/*
* Larger Initial Windows [RFC 4342, sec. 5]
*/
- hctx->ccid3hctx_rtt = r_sample;
hctx->ccid3hctx_x = rfc3390_initial_rate(sk);
hctx->ccid3hctx_t_ld = now;
@@ -504,8 +505,6 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
} else {
- hctx->ccid3hctx_rtt = (9 * hctx->ccid3hctx_rtt +
- r_sample) / 10;
/* Update sending rate (step 4 of [RFC 3448, 4.3]) */
if (hctx->ccid3hctx_p > 0)
--
1.5.0.6
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH 08/29] Honour initial RTT estimate
2007-04-12 21:15 [PATCH 08/29] Honour initial RTT estimate Arnaldo Carvalho de Melo
@ 2007-04-12 21:22 ` David Miller
2007-04-12 22:20 ` Arnaldo Carvalho de Melo
2007-04-13 10:38 ` Gerrit Renker
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2007-04-12 21:22 UTC (permalink / raw)
To: dccp
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Date: Thu, 12 Apr 2007 18:15:05 -0300
> This is a small optimisation which improves the accuracy of TX
> RTT sampling when an initial RTT sample (e.g. from the intial
> Request/Response exchange) is available.
>
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Ok, even more...
I'm not pulling this stuff in, you guys have to work out a way
to implement this without killing performance on the rest of
the system.
Thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 08/29] Honour initial RTT estimate
2007-04-12 21:15 [PATCH 08/29] Honour initial RTT estimate Arnaldo Carvalho de Melo
2007-04-12 21:22 ` David Miller
@ 2007-04-12 22:20 ` Arnaldo Carvalho de Melo
2007-04-13 10:38 ` Gerrit Renker
2 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2007-04-12 22:20 UTC (permalink / raw)
To: dccp
On 4/12/07, David Miller <davem@davemloft.net> wrote:
> From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
> Date: Thu, 12 Apr 2007 18:15:05 -0300
>
> > This is a small optimisation which improves the accuracy of TX
> > RTT sampling when an initial RTT sample (e.g. from the intial
> > Request/Response exchange) is available.
> >
> > Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> > Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
>
> Ok, even more...
>
> I'm not pulling this stuff in, you guys have to work out a way
> to implement this without killing performance on the rest of
> the system.
I'm removing this one as well.
- Arnaldo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 08/29] Honour initial RTT estimate
2007-04-12 21:15 [PATCH 08/29] Honour initial RTT estimate Arnaldo Carvalho de Melo
2007-04-12 21:22 ` David Miller
2007-04-12 22:20 ` Arnaldo Carvalho de Melo
@ 2007-04-13 10:38 ` Gerrit Renker
2 siblings, 0 replies; 4+ messages in thread
From: Gerrit Renker @ 2007-04-13 10:38 UTC (permalink / raw)
To: dccp
| > This is a small optimisation which improves the accuracy of TX
| > RTT sampling when an initial RTT sample (e.g. from the intial
| > Request/Response exchange) is available.
<snip>
|
| Ok, even more...
|
| I'm not pulling this stuff in, you guys have to work out a way
| to implement this without killing performance on the rest of
| the system.
|
I take it you are referring to the moved skb_get_timestamp in this patch?
As part of of reverting the RX/TX timestamp patches, this will go back
to either dccp_gettimestamp() or do_gettimeofday() (will discuss with Arnaldo)
- as will be all other patches that depend on the RX/TX timestamps.
When that is removed, I'd say that this patch is useful since it increases
the number of samples used to average the RTT.
I will post a summary of all changes to the list.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-13 10:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-12 21:15 [PATCH 08/29] Honour initial RTT estimate Arnaldo Carvalho de Melo
2007-04-12 21:22 ` David Miller
2007-04-12 22:20 ` Arnaldo Carvalho de Melo
2007-04-13 10:38 ` Gerrit Renker
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.