linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Jo-Philipp Wich <jo@mein.io>,
	Network Development <netdev@vger.kernel.org>,
	John Crispin <john@phrozen.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-block@vger.kernel.org,
	Jonas Gorski <jonas.gorski@gmail.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	Felix Fietkau <nbd@nbd.name>
Subject: Re: ARM router NAT performance affected by random/unrelated commits
Date: Tue, 21 May 2019 12:19:15 +0100	[thread overview]
Message-ID: <20190521111915.3hklypo5pwi3fcgh@shell.armlinux.org.uk> (raw)
In-Reply-To: <CACna6ryVxFr8ho3ekY4Q_J=TamVLv9ZMDaHJFUGcEGSRrSVaHA@mail.gmail.com>

On Tue, May 21, 2019 at 01:16:12PM +0200, Rafał Miłecki wrote:
> On Tue, 21 May 2019 at 12:45, Russell King - ARM Linux admin
> <linux@armlinux.org.uk> wrote:
> > On Tue, May 21, 2019 at 12:28:48PM +0200, Rafał Miłecki wrote:
> > > I work on home routers based on Broadcom's Northstar SoCs. Those devices
> > > have ARM Cortex-A9 and most of them are dual-core.
> > >
> > > As for home routers, my main concern is network performance. That CPU
> > > isn't powerful enough to handle gigabit traffic so all kind of
> > > optimizations do matter. I noticed some unexpected changes in NAT
> > > performance when switching between kernels.
> > >
> > > My hardware is BCM47094 SoC (dual core ARM) with integrated network
> > > controller and external BCM53012 switch.
> >
> > Guessing, I'd say it's to do with the placement of code wrt cachelines.
> 
> That was my guess as well, that's why I tried "cachestat" tool.
> 
> 
> > You could try aligning some of the cache flushing code to a cache line
> > and see what effect that has.
> 
> Can you give me some extra hint on how to do that, please? I tried
> searching for it a bit but I didn't find any clear article on that
> matter.

IIRC, the cache line size on Cortex A9 is 32 bytes, so the assembler
directive would be ".align 5".  Place that in arch/arm/mm/cache-v7.S
before v7_dma_clean_range and v7_dma_inv_range.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

  reply	other threads:[~2019-05-21 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 10:28 ARM router NAT performance affected by random/unrelated commits Rafał Miłecki
2019-05-21 10:45 ` Russell King - ARM Linux admin
2019-05-21 11:16   ` Rafał Miłecki
2019-05-21 11:19     ` Russell King - ARM Linux admin [this message]
2019-05-22 11:51   ` Rafał Miłecki
2019-05-22 12:17     ` Russell King - ARM Linux admin
2019-05-22 21:12       ` Rafał Miłecki
2019-05-21 13:01 ` Andrew Lunn

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=20190521111915.3hklypo5pwi3fcgh@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=jo@mein.io \
    --cc=john@phrozen.org \
    --cc=jonas.gorski@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=zajec5@gmail.com \
    /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).