linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM network performance and dma_mask
Date: Thu, 21 Nov 2013 16:01:42 -0600	[thread overview]
Message-ID: <528E82C6.2010106@gmail.com> (raw)
In-Reply-To: <20131121183834.GB18513@1wt.eu>

On 11/21/2013 12:38 PM, Willy Tarreau wrote:
> Hi Rob,
> 
> While we were diagnosing a network performance regression that we finally
> found and fixed, it appeared during a test that Linus' tree shows a much
> higher performance on Armada 370 (armv7) than its predecessors. I can
> saturate the two Gig links of my Mirabox each with a single TCP flow and
> keep up to 25% of idle CPU in the optimal case. In 3.12.1 or 3.10.20, I
> can achieve around 1.3 Gbps when the two ports are used in parallel.
> 
> Today I bisected these kernels to find what was causing this difference.
> I found it was your patch below which I can copy entirely here :
> 
>   commit 0589342c27944e50ebd7a54f5215002b6598b748
>   Author: Rob Herring <rob.herring@calxeda.com>
>   Date:   Tue Oct 29 23:36:46 2013 -0500
> 
>       of: set dma_mask to point to coherent_dma_mask
>     
>       Platform devices created by DT code don't initialize dma_mask pointer to
>       anything. Set it to coherent_dma_mask by default if the architecture
>       code has not set it.
>     
>       Signed-off-by: Rob Herring <rob.herring@calxeda.com>
> 
>   diff --git a/drivers/of/platform.c b/drivers/of/platform.c
>   index 9b439ac..c005495 100644
>   --- a/drivers/of/platform.c
>   +++ b/drivers/of/platform.c
>   @@ -216,6 +216,8 @@ static struct platform_device *of_platform_device_create_pdata(
>           dev->archdata.dma_mask = 0xffffffffUL;
>    #endif
>           dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
>   +       if (!dev->dev.dma_mask)
>   +               dev->dev.dma_mask = &dev->dev.coherent_dma_mask;
>           dev->dev.bus = &platform_bus_type;
>           dev->dev.platform_data = platform_data;
> 
> And I can confirm that applying this patch on 3.10.20 + the fixes we found
> yesterday substantially boosted my network performance (and reduced the CPU
> usage when running on a single link).
> 
> I'm not at ease with these things so I'd like to ask your opinion here, is
> this supposed to be an improvement or a fix ? Is this something we should
> backport into stable versions, or is there something to fix in the armada
> platform so that it works just as if the patch was applied ?
> 

The patch was to fix this issue[1]. It is fixed in the core code because
dma_mask not being set has been a known issue with DT probing for some
time. Since most drivers don't seem to care, we've gotten away with it.
I thought the normal failure mode was drivers failing to probe.

As to why it helps performance, I'm not really sure. Perhaps it is
causing some bounce buffers to be used.

Rob

[1] http://lists.xen.org/archives/html/xen-devel/2013-10/msg00092.html

  parent reply	other threads:[~2013-11-21 22:01 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 13:53 [BUG,REGRESSION?] 3.11.6+,3.12: GbE iface rate drops to few KB/s Arnaud Ebalard
2013-11-12  6:48 ` Cong Wang
2013-11-12  7:56   ` Arnaud Ebalard
2013-11-12  8:36     ` Willy Tarreau
2013-11-12  9:14       ` Arnaud Ebalard
2013-11-12 10:01         ` Willy Tarreau
2013-11-12 15:34           ` Arnaud Ebalard
2013-11-13  7:22             ` Willy Tarreau
2013-11-17 14:19               ` Willy Tarreau
2013-11-17 17:41                 ` Eric Dumazet
2013-11-19  6:44                   ` Arnaud Ebalard
2013-11-19 13:53                     ` Eric Dumazet
2013-11-19 17:43                       ` Willy Tarreau
2013-11-19 18:31                         ` Eric Dumazet
2013-11-19 18:41                           ` Willy Tarreau
2013-11-19 23:53                             ` Arnaud Ebalard
2013-11-20  0:08                               ` Eric Dumazet
2013-11-20  0:35                                 ` Willy Tarreau
2013-11-20  0:43                                   ` Eric Dumazet
2013-11-20  0:52                                     ` Willy Tarreau
2013-11-20  8:50                               ` Thomas Petazzoni
2013-11-20 19:21                                 ` Arnaud Ebalard
2013-11-20 19:11                               ` Willy Tarreau
2013-11-20 19:26                                 ` Arnaud Ebalard
2013-11-20 21:28                                 ` Arnaud Ebalard
2013-11-20 21:54                                   ` Willy Tarreau
2013-11-21  0:44                                     ` Willy Tarreau
     [not found]                                       ` <20131121183834.GB18513@1wt.eu>
2013-11-21 19:04                                         ` ARM network performance and dma_mask (was: [BUG,REGRESSION?] 3.11.6+,3.12: GbE iface rate drops to few KB/s) Thomas Petazzoni
2013-11-21 21:51                                           ` ARM network performance and dma_mask (was: [BUG, REGRESSION?] 3.11.6+, 3.12: " Willy Tarreau
2013-11-21 22:01                                         ` Rob Herring [this message]
2013-11-21 22:13                                           ` ARM network performance and dma_mask Willy Tarreau
2013-11-21 21:51                                       ` [BUG,REGRESSION?] 3.11.6+,3.12: GbE iface rate drops to few KB/s Arnaud Ebalard
2013-11-21 21:52                                         ` Willy Tarreau
2013-11-21 22:00                                           ` Eric Dumazet
2013-11-21 22:55                                             ` Arnaud Ebalard
2013-11-21 23:23                                               ` Rick Jones
2013-11-20 17:12                   ` Willy Tarreau
2013-11-20 17:30                     ` Eric Dumazet
2013-11-20 17:38                       ` Willy Tarreau
2013-11-20 18:52                       ` David Miller
2013-11-20 17:34                     ` Willy Tarreau
2013-11-20 17:40                       ` Eric Dumazet
2013-11-20 18:15                         ` Willy Tarreau
2013-11-20 18:21                           ` Eric Dumazet
2013-11-20 18:29                             ` Willy Tarreau
2013-11-20 19:22                           ` Arnaud Ebalard
2013-11-18 10:09                 ` David Laight
2013-11-18 10:52                   ` Willy Tarreau
2013-11-18 10:26                 ` Thomas Petazzoni
2013-11-18 10:44                   ` Simon Guinot
2013-11-18 16:54                     ` Stephen Hemminger
2013-11-18 17:13                       ` Eric Dumazet
2013-11-18 10:51                   ` Willy Tarreau
2013-11-18 17:58                     ` Florian Fainelli

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=528E82C6.2010106@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).