[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131121183834.GB18513@1wt.eu>
Date: Thu, 21 Nov 2013 19:38:34 +0100
From: Willy Tarreau <w@....eu>
To: Rob Herring <rob.herring@...xeda.com>
Cc: Arnaud Ebalard <arno@...isbad.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Florian Fainelli <f.fainelli@...il.com>,
simon.guinot@...uanux.org, Eric Dumazet <eric.dumazet@...il.com>,
netdev@...r.kernel.org, edumazet@...gle.com,
Cong Wang <xiyou.wangcong@...il.com>,
linux-arm-kernel@...ts.infradead.org
Subject: ARM network performance and dma_mask (was: [BUG,REGRESSION?] 3.11.6+,3.12: GbE iface rate drops to few KB/s)
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@...xeda.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@...xeda.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 ?
Thanks,
Willy
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists