From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-f180.google.com ([209.85.212.180]:44670 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbbBFOJi convert rfc822-to-8bit (ORCPT ); Fri, 6 Feb 2015 09:09:38 -0500 Received: by mail-wi0-f180.google.com with SMTP id h11so2692292wiw.1 for ; Fri, 06 Feb 2015 06:09:36 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1423230785.31870.131.camel@edumazet-glaptop2.roam.corp.google.com> References: <1422537297.21689.15.camel@edumazet-glaptop2.roam.corp.google.com> <1422628835.21689.95.camel@edumazet-glaptop2.roam.corp.google.com> <1422903136.21689.114.camel@edumazet-glaptop2.roam.corp.google.com> <1422926330.21689.138.camel@edumazet-glaptop2.roam.corp.google.com> <1422973660.907.10.camel@edumazet-glaptop2.roam.corp.google.com> <1423051045.907.108.camel@edumazet-glaptop2.roam.corp.google.com> <1423053531.907.115.camel@edumazet-glaptop2.roam.corp.google.com> <1423055810.907.125.camel@edumazet-glaptop2.roam.corp.google.com> <1423056591.907.130.camel@edumazet-glaptop2.roam.corp.google.com> <1423084303.31870.15.camel@edumazet-glaptop2.roam.corp.google.com> <1423141038.31870.38.camel@edumazet-glaptop2.roam.corp.google.com> <1423142342.31870.49.camel@edumazet-glaptop2.roam.corp.google.com> <1423147286.31870.59.camel@edumazet-glaptop2.roam.corp.google.com> <1423156205.31870.86.camel@edumazet-glaptop2.roam.corp.google.com> <1423230001.31870.128.camel@edumazet-glaptop2.roam.corp.google.com> <1423230785.31870.131.camel@edumazet-glaptop2.roam.corp.google.com> Date: Fri, 6 Feb 2015 15:09:36 +0100 Message-ID: (sfid-20150206_150942_905009_DA3F73A3) Subject: Re: Throughput regression with `tcp: refine TSO autosizing` From: Michal Kazior To: Eric Dumazet Cc: Neal Cardwell , linux-wireless , Network Development , Eyal Perry Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 6 February 2015 at 14:53, Eric Dumazet wrote: > On Fri, 2015-02-06 at 05:40 -0800, Eric Dumazet wrote: > >> tcp_wfree() could maintain in tp->tx_completion_delay_ms an EWMA >> of TX completion delay. But this would require yet another expensive >> call to ktime_get() if HZ < 1000. >> >> Then tcp_write_xmit() could use it to adjust : >> >> limit = max(2 * skb->truesize, sk->sk_pacing_rate >> 9); >> >> to >> >> amount = (2 + tp->tx_completion_delay_ms) * sk->sk_pacing_rate >> >> limit = max(2 * skb->truesize, amount / 1000); >> >> I'll cook a patch. > > Hmm... doing this in all protocols would be too expensive, > and we do not want to include time spent in qdiscs. > > wifi could eventually do that, providing in skb->tx_completion_delay_us > the time spent in wifi driver. > > This way, we would have no penalty for network devices doing normal skb > orphaning (loopback interface, ethernet, ...) I'll play around with this idea and report back later. MichaƂ