All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	eyalpe@dev.mellanox.co.il
Subject: Re: Throughput regression with `tcp: refine TSO autosizing`
Date: Tue, 3 Feb 2015 09:44:26 +0100	[thread overview]
Message-ID: <CA+BoTQ=JLRbGfhZZLQShQFxeGCfhdu4XPt5FPv4gSqEc_sSOOw@mail.gmail.com> (raw)
In-Reply-To: <1422903136.21689.114.camel@edumazet-glaptop2.roam.corp.google.com>

On 2 February 2015 at 19:52, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Mon, 2015-02-02 at 11:27 +0100, Michal Kazior wrote:
>
>> While testing I've had my internal GRO patch for ath10k and no stretch
>> ack patches.
>
> Thanks for the data, I took a look at it.
>
> I am afraid this GRO patch might be the problem.

The entire performance drop happens without the GRO patch as well. I
tested with it included because I intended to upstream it later. I'll
run without it in future tests.


[...]
> Could you make again your experiments using upstream kernel (David
> Miller net tree) ?

Sure.


> You also could post the GRO patch so that we can comment on it.

(You probably want to see mac80211 patch as well:
06d181a8fd58031db9c114d920b40d8820380a6e "mac80211: add NAPI support
back")

diff --git a/drivers/net/wireless/ath/ath10k/core.c
b/drivers/net/wireless/ath/ath10k/core.c
index 36a8fcf..367e896 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -1147,6 +1147,12 @@ err:
 }
 EXPORT_SYMBOL(ath10k_core_start);

+static int ath10k_core_napi_dummy_poll(struct napi_struct *napi, int budget)
+{
+       WARN_ON(1);
+       return 0;
+}
+
 int ath10k_wait_for_suspend(struct ath10k *ar, u32 suspend_opt)
 {
        int ret;
@@ -1414,6 +1420,10 @@ struct ath10k *ath10k_core_create(size_t
priv_size, struct device *dev,
        INIT_WORK(&ar->register_work, ath10k_core_register_work);
        INIT_WORK(&ar->restart_work, ath10k_core_restart);

+       init_dummy_netdev(&ar->napi_dev);
+       ieee80211_napi_add(ar->hw, &ar->napi, &ar->napi_dev,
+                          ath10k_core_napi_dummy_poll, 64);
+
        ret = ath10k_debug_create(ar);
        if (ret)
                goto err_free_wq;
@@ -1434,6 +1444,7 @@ void ath10k_core_destroy(struct ath10k *ar)
 {
        flush_workqueue(ar->workqueue);
        destroy_workqueue(ar->workqueue);
+       netif_napi_del(&ar->napi);

        ath10k_debug_destroy(ar);
        ath10k_mac_destroy(ar);
diff --git a/drivers/net/wireless/ath/ath10k/core.h
b/drivers/net/wireless/ath/ath10k/core.h
index 2d9f871..b5a8847 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -623,6 +623,9 @@ struct ath10k {

        struct dfs_pattern_detector *dfs_detector;

+       struct net_device napi_dev;
+       struct napi_struct napi;
+
 #ifdef CONFIG_ATH10K_DEBUGFS
        struct ath10k_debug debug;
 #endif
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c
b/drivers/net/wireless/ath/ath10k/htt_rx.c
index c1da44f..7e58b38 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2061,5 +2061,7 @@ static void ath10k_htt_txrx_compl_task(unsigned long ptr)
                ath10k_htt_rx_in_ord_ind(ar, skb);
                dev_kfree_skb_any(skb);
        }
+
+       napi_gro_flush(&htt->ar->napi, false);
        spin_unlock_bh(&htt->rx_ring.lock);
 }

So that you can quickly get an understanding how ath10k Rx works:
first tasklet (not visible in the patch) picks up smallish event
buffers from firmware and puts them into ath10k queue for latter
processing by another tasklet (the last hunk). Each such event buffer
is just some metainfo but can "carry" tens of frames (both Rx and Tx
completions). The count is arbitrary and depends on fw/hw combo and
air conditions. The GRO flush is called after all queued small event
buffers are processed (frames delivered up to mac80211 which can in
turn perform aggregation reordering in case some frames were
re-transmitted in the meantime before handing them to net subsystem).


Michał

      parent reply	other threads:[~2015-02-03  8:44 UTC|newest]

Thread overview: 107+ 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
2015-01-30 13:19     ` Eric Dumazet
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
2015-02-02  4:04                           ` [Cerowrt-devel] " Avery Pennarun
2015-02-02  4:04                             ` Avery Pennarun
2015-02-02 15:25                             ` Jim Gettys
2015-02-02  4:21                         ` Avery Pennarun
2015-02-02  7:07                           ` David Lang
2015-02-02  7:07                             ` David Lang
2015-01-30 13:39   ` Michal Kazior
2015-01-30 13:39     ` Michal Kazior
2015-01-30 14:40     ` Eric Dumazet
2015-01-30 14:40       ` Eric Dumazet
2015-02-02 10:27       ` Michal Kazior
2015-02-02 10:27         ` Michal Kazior
2015-02-02 18:52         ` Eric Dumazet
2015-02-02 21:25           ` Ben Greear
2015-02-02 23:06             ` Eric Dumazet
2015-02-02 23:06               ` Eric Dumazet
2015-02-03  9:00               ` Michal Kazior
2015-02-03  9:00                 ` Michal Kazior
2015-02-03  1:18           ` Eric Dumazet
2015-02-03  1:18             ` Eric Dumazet
2015-02-03 11:50             ` Michal Kazior
2015-02-03 14:27               ` Eric Dumazet
2015-02-03 14:27                 ` Eric Dumazet
2015-02-03 15:03                 ` Eric Dumazet
2015-02-03 15:03                   ` Eric Dumazet
2015-02-04 11:35                 ` Michal Kazior
2015-02-04 11:57                   ` Eric Dumazet
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
2015-02-04 21:11                               ` Eric Dumazet
2015-02-04 21:11                                 ` Eric Dumazet
2015-02-05  6:46                                 ` Michal Kazior
2015-02-05  6:46                                   ` Michal Kazior
2015-02-05 13:03                                   ` Eric Dumazet
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
2015-02-05 13:33                                       ` Eric Dumazet
2015-02-05 13:33                                         ` Eric Dumazet
2015-02-05 13:44                                       ` Michal Kazior
2015-02-05 14:41                                         ` Eric Dumazet
2015-02-05 14:41                                           ` Eric Dumazet
2015-02-05 17:10                                           ` Eric Dumazet
2015-02-06  9:42                                             ` Michal Kazior
2015-02-06 13:40                                               ` Eric Dumazet
2015-02-06 13:40                                                 ` Eric Dumazet
2015-02-06 13:53                                                 ` Eric Dumazet
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
2015-02-11 13:17                                                                 ` Eric Dumazet
2015-02-12  7:16                                                                 ` Michal Kazior
2015-02-12  7:16                                                                   ` Michal Kazior
2015-02-10 14:19                                                           ` Johannes Berg
2015-02-10 15:09                                                             ` Eric Dumazet
2015-02-11  8:57                                                             ` Michal Kazior
2015-02-11  8:57                                                               ` Michal Kazior
2015-02-12  7:48                                                               ` Michal Kazior
2015-02-12  8:33                                                                 ` Dave Taht
2015-02-24 10:24                                                                 ` Johannes Berg
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
2015-02-06 14:10                                                   ` Eric Dumazet
2015-02-06 14:31                                                     ` David Laight
2015-02-06 14:31                                                       ` David Laight
2015-02-06 15:02                                                       ` Eric Dumazet
2015-02-06 15:02                                                         ` Eric Dumazet
2015-02-06 14:08                                                 ` Michal Kazior
2015-02-06 14:08                                                   ` Michal Kazior
2015-02-06 14:35                                                   ` Eric Dumazet
2015-02-06 14:35                                                     ` Eric Dumazet
2015-02-06 17:48                                                     ` Rick Jones
2015-02-06 17:48                                                       ` Rick Jones
2015-02-05 14:48                                         ` Eric Dumazet
2015-02-05 14:48                                           ` Eric Dumazet
2015-02-06  9:39                                           ` Nicolas Cavallari
2015-02-06  9:39                                             ` Nicolas Cavallari
2015-02-05 19:50                                         ` Dave Taht
2015-02-06  9:57                                           ` Michal Kazior
2015-02-06  9:57                                             ` Michal Kazior
2015-02-03  8:44           ` Michal Kazior [this message]

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='CA+BoTQ=JLRbGfhZZLQShQFxeGCfhdu4XPt5FPv4gSqEc_sSOOw@mail.gmail.com' \
    --to=michal.kazior@tieto.com \
    --cc=eric.dumazet@gmail.com \
    --cc=eyalpe@dev.mellanox.co.il \
    --cc=linux-wireless@vger.kernel.org \
    --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 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.