netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Michal Kazior <michal.kazior@tieto.com>,
	Neal Cardwell <ncardwell@google.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Eyal Perry <eyalpe@dev.mellanox.co.il>
Subject: Re: Throughput regression with `tcp: refine TSO autosizing`
Date: Tue, 31 Mar 2015 13:08:31 +0200	[thread overview]
Message-ID: <1427800111.2057.18.camel@sipsolutions.net> (raw)
In-Reply-To: <1423494690.31870.189.camel@edumazet-glaptop2.roam.corp.google.com> (sfid-20150209_161141_280698_3CDB7CE7)

To revive an old thread ...

On Mon, 2015-02-09 at 07:11 -0800, Eric Dumazet wrote:


> Ideally the formula would be in TCP something very fast to compute :
> 
> amount = (sk->sk_pacing_rate >> 10) + sk->tx_completion_delay_cushion;
> limit = max(2 * skb->truesize, amount);
> limit = min_t(u32, limit, sysctl_tcp_limit_output_bytes);
> 
> So a 'problematic' driver would have to do the math (64 bit maths) like
> this :
> 
> 
> sk->tx_completion_delay_cushion = ewma_tx_delay * sk->sk_pacing_rate;

The whole notion with "ewma_tx_delay" seems very wrong to me. Measuring
something while also trying to control it (or something closely related)
seems a bit strange, but perhaps you meant to measure something
different than what Michal implemented.

What he implemented was measuring the time it takes from submission to
the hardware queues, but that seems to create a bad feedback cycle:
Allowing it as extra transmit "cushion" will, IIUC, cause TCP to submit
more data to the queues, which will in turn cause the next packets to be
potentially delayed more (since there are still waiting ones) thus
causing a longer delay to be measured, which in turn allows even more
data to be submitted etc.

IOW, while traffic is flowing this will likely cause feedback that
completely removes the point of this, no? Leaving only
sysctl_tcp_limit_output_bytes as the limit (*).

It seems it'd be better to provide a calculated estimate, perhaps based
on current transmit rate and (if available) CCA/TXOP acquisition time.

johannes

(*) Which, btw, isn't all that big given that a maximally sized A-MPDU
is like 1MB containing close to that much actual data! Don't think that
can actually be done at current transmit rates though.

  parent reply	other threads:[~2015-03-31 11:08 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 11:48 Throughput regression with `tcp: refine TSO autosizing` Michal Kazior
2015-01-29 13:14 ` Eric Dumazet
2015-01-30 10:29   ` Arend van Spriel
     [not found]     ` <54CB5D08.2070906-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2015-01-30 13:19       ` Eric Dumazet
2015-01-30 13:47         ` Arend van Spriel
2015-01-30 14:37           ` Eric Dumazet
     [not found]           ` <CAA93jw5fqhz0Hiw74L2GXgtZ9JsMg+NtYydKxKzGDrvQcZn4hA@mail.gmail.com>
     [not found]             ` <CAA93jw7b0E9jjQYXrEPzjLLC9j8xNC0TFYXpWVtgFameJaNBdw@mail.gmail.com>
     [not found]               ` <1422741065.199624134@apps.rackspace.com>
     [not found]                 ` <CAPp0ZBb2nkA6Y0s=W0kw=zvyn0wi0NMBRsBCw_xcD61ScOmgQg@mail.gmail.com>
     [not found]                   ` <CAA_e5Z46Bu+zZZFzf_ejzA35Gw3g1_OG85yv6yd7MpbwZcE-nw@mail.gmail.com>
2015-02-01  8:45                     ` Fwd: " Dave Taht
2015-02-01 10:47                       ` Jonathan Morton
2015-02-01 14:43                         ` dpreed
2015-02-01 23:34                           ` Andrew McGregor
     [not found]                             ` <CAA_e5Z5PfimZeC5cqSk_xFpKOBeZ74htLeEdwtKieAYWJaEX+A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-02  4:04                               ` [Cerowrt-devel] " Avery Pennarun
2015-02-02 15:25                                 ` Jim Gettys
2015-02-02  4:21                           ` Avery Pennarun
2015-02-02  7:07                             ` David Lang
     [not found]   ` <1422537297.21689.15.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-01-30 13:39     ` Michal Kazior
     [not found]       ` <CA+BoTQk2xT-8DqPuiiKG+kHAjLPrj8F9dLTb-rcGhvMq0u_2Qw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-30 14:40         ` Eric Dumazet
     [not found]           ` <1422628835.21689.95.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-02 10:27             ` Michal Kazior
2015-02-02 18:52               ` Eric Dumazet
2015-02-02 21:25                 ` Ben Greear
     [not found]                   ` <54CFEB46.3050006-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2015-02-02 23:06                     ` Eric Dumazet
     [not found]                       ` <1422918363.21689.132.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-03  9:00                         ` Michal Kazior
     [not found]                 ` <1422903136.21689.114.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-03  1:18                   ` Eric Dumazet
2015-02-03 11:50                     ` Michal Kazior
     [not found]                       ` <CA+BoTQkMikA8wxm1ce2DkKhPB0HiKeAqT7f+sQ=91W40z=X0Rg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-03 14:27                         ` Eric Dumazet
     [not found]                           ` <1422973660.907.10.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-03 15:03                             ` Eric Dumazet
2015-02-04 11:35                           ` Michal Kazior
     [not found]                             ` <CA+BoTQmvUuFdfYF=wVMYxrf_nQZB5GCV=LvDZVvfs-3hAE4WKw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-04 11:57                               ` Eric Dumazet
2015-02-04 12:22                                 ` Michal Kazior
2015-02-04 12:38                                   ` Eric Dumazet
2015-02-04 12:53                                     ` Michal Kazior
2015-02-04 12:55                                       ` Johannes Berg
2015-02-04 13:16                                       ` Eric Dumazet
2015-02-04 13:29                                         ` Eric Dumazet
     [not found]                                           ` <1423056591.907.130.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-04 21:11                                             ` Eric Dumazet
     [not found]                                               ` <1423084303.31870.15.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-05  6:46                                                 ` Michal Kazior
     [not found]                                                   ` <CA+BoTQnwcmu=YbKB17JQb7ZPwGZoQS7zQ6nT-WEJHjnBX34QKA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-05 13:03                                                     ` Eric Dumazet
2015-02-05  8:38                                               ` Michal Kazior
2015-02-05 12:57                                                 ` Eric Dumazet
2015-02-05 13:19                                                   ` Eric Dumazet
     [not found]                                                     ` <1423142342.31870.49.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-05 13:33                                                       ` Eric Dumazet
2015-02-05 13:44                                                     ` Michal Kazior
     [not found]                                                       ` <CA+BoTQmcShK0U_cXvEOLY_8y7LH8x3taTgjcyMzv0MLVn4UtCA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-05 14:41                                                         ` Eric Dumazet
2015-02-05 17:10                                                           ` Eric Dumazet
2015-02-06  9:42                                                             ` Michal Kazior
     [not found]                                                               ` <CA+BoTQ=WaKLV=r6qWaWAEfyDr2pqMWpm4NDmnek92TEVndnxRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-06 13:40                                                                 ` Eric Dumazet
     [not found]                                                                   ` <1423230001.31870.128.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-06 13:53                                                                     ` Eric Dumazet
2015-02-06 14:09                                                                       ` Michal Kazior
2015-02-09 13:47                                                                         ` Michal Kazior
2015-02-09 15:11                                                                           ` Eric Dumazet
2015-02-10 10:33                                                                             ` Michal Kazior
2015-02-10 12:54                                                                               ` Eric Dumazet
2015-02-10 13:05                                                                                 ` Eric Dumazet
2015-02-10 13:14                                                                               ` Eric Dumazet
2015-02-11  8:33                                                                                 ` Michal Kazior
2015-02-11 13:17                                                                                   ` Eric Dumazet
     [not found]                                                                                     ` <1423660672.4847.15.camel-XN9IlZ5yJG9HTL0Zs8A6p/gx64E7kk8eUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2015-02-12  7:16                                                                                       ` Michal Kazior
2015-02-10 14:19                                                                               ` Johannes Berg
2015-02-10 15:09                                                                                 ` Eric Dumazet
     [not found]                                                                                 ` <1423577962.2215.2.camel-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2015-02-11  8:57                                                                                   ` Michal Kazior
2015-02-12  7:48                                                                                     ` Michal Kazior
2015-02-12  8:33                                                                                       ` Dave Taht
     [not found]                                                                                       ` <CA+BoTQnxo-x94uVfErZO43jTowVcEMEt+7xDzoAGiR8fRDv=ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 10:24                                                                                         ` Johannes Berg
2015-02-24 10:30                                                                                           ` Johannes Berg
2015-02-24 10:59                                                                                             ` Johannes Berg
2015-03-31 11:08                                                                             ` Johannes Berg [this message]
2015-02-06 14:10                                                                       ` Eric Dumazet
2015-02-06 14:31                                                                         ` David Laight
     [not found]                                                                           ` <063D6719AE5E284EB5DD2968C1650D6D1CADF4EC-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2015-02-06 15:02                                                                             ` Eric Dumazet
2015-02-06 14:08                                                                     ` Michal Kazior
     [not found]                                                                       ` <CA+BoTQnEvF_mi68gyFns67oKC=8jEYdi3tLuW5dNj20KwUNs9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-06 14:35                                                                         ` Eric Dumazet
2015-02-06 17:48                                                                           ` Rick Jones
2015-02-05 14:48                                                         ` Eric Dumazet
2015-02-06  9:39                                                           ` Nicolas Cavallari
2015-02-05 19:50                                                       ` Dave Taht
     [not found]                                                         ` <CAA93jw45o-Tnt4hEYgc-wHJ26J11dDZLptO9ZONy0Jxp350S3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-06  9:57                                                           ` Michal Kazior
2015-02-03  8:44                 ` Michal Kazior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427800111.2057.18.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=eric.dumazet@gmail.com \
    --cc=eyalpe@dev.mellanox.co.il \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.kazior@tieto.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).