From: Gatis Peisenieks <gatis@mikrotik.com>
To: Chris Snook <chris.snook@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
jesse.brandeburg@intel.com, dchickles@marvell.com,
tully@mikrotik.com, Eric Dumazet <eric.dumazet@gmail.com>,
netdev <netdev@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 2/4] atl1c: improve performance by avoiding unnecessary pcie writes on xmit
Date: Wed, 12 May 2021 17:35:26 +0300 [thread overview]
Message-ID: <c7ae91ea1d8aec340202c67cd4c85d30@mikrotik.com> (raw)
In-Reply-To: <CAMXMK6tkPYLLQzq65uFVd-aCWaVHSne16MBEo7o6fGDTDA0rpw@mail.gmail.com>
On 2021-05-12 05:39, Chris Snook wrote:
> Increases in latency tend to hurt more on single-queue devices. Has
> this been tested on the original gigabit atl1c?
Thank you Chris, for checking this out!
I did test the atl1c driver with and without this change on actual
AR8151 hardware.
My test system was Intel(R) Core(TM) i7-4790K + RB44Ge.
That is a 4 port 1G AR8151 based card.
I measured latency with external traffic generator with test system
doing L2 forwarding. Receiving traffic on one atl1c interface and
transmitting over another atl1c interface. I had default 1000 packet
pfifo queue configured on the atl1c interfaces.
Max 64 byte packet L2 forward pps rate improved 860K -> 1070K.
Any latency difference at 800Kpps was lost in the noise - with the
particular traffic generator system (a linux based RouterOS
traffic-gen).
I measured average 285us for a 30 second run in both cases. Note that
this includes any traffic generator "internal" latency.
Note that I had to tweak atl1c tx interrupt moderation to get these
numbers. With default tx_imt = 1000 no matter what I get only 500
tx interrupts/sec. Since the tx clean is fast and do not get polled
repeatedly and ring size is 1024 I am limited to ~500Kpps.
tx_imt = 500 dobubles that, I used tx_imt = 200 for this test.
As a side note that still relates to latency discussion on AR8151
hardware what I did find out however is that rx interrupt moderation
timer value has a big effect on latency. Changing rx_imt
from 200 to 10 resulted in considerable improvement from 285us to 41us
average latency as measured by traffic generator. I do not have
enough knowledge of the quirks of all the hardware supported by
the driver to confidently put this in a patch though.
Mikrotik 10/25G NIC has its own interrupt moderation mechanism,
so this is not relevant to that if anyone is interested.
>
> - Chris
>
> On Tue, May 11, 2021 at 12:05 PM Gatis Peisenieks <gatis@mikrotik.com>
> wrote:
>>
>> The kernel has xmit_more facility that hints the networking driver
>> xmit
>> path about whether more packets are coming soon. This information can
>> be
>> used to avoid unnecessary expensive PCIe transaction per tx packet at
>> a
>> slight increase in latency.
>>
>> Max TX pps on Mikrotik 10/25G NIC in a Threadripper 3960X system
>> improved from 1150Kpps to 1700Kpps.
>>
next prev parent reply other threads:[~2021-05-12 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 19:05 [PATCH net-next 0/4] atl1c: support for Mikrotik 10/25G NIC features Gatis Peisenieks
2021-05-11 19:05 ` [PATCH net-next 1/4] atl1c: show correct link speed on Mikrotik 10/25G NIC Gatis Peisenieks
2021-05-11 19:05 ` [PATCH net-next 2/4] atl1c: improve performance by avoiding unnecessary pcie writes on xmit Gatis Peisenieks
2021-05-11 21:39 ` Eric Dumazet
2021-05-12 7:53 ` Gatis Peisenieks
2021-05-12 2:39 ` Chris Snook
2021-05-12 8:33 ` David Laight
2021-05-12 14:35 ` Gatis Peisenieks [this message]
2021-05-11 19:05 ` [PATCH net-next 3/4] atl1c: adjust max mtu according to Mikrotik 10/25G NIC ability Gatis Peisenieks
2021-05-11 19:05 ` [PATCH net-next 4/4] atl1c: enable rx csum offload on Mikrotik 10/25G NIC Gatis Peisenieks
-- strict thread matches above, loose matches on Subject: below --
2021-04-19 14:34 [PATCH net-next 0/4] atl1c: support for Mikrotik 10/25G NIC features Gatis Peisenieks
2021-04-19 14:34 ` [PATCH net-next 2/4] atl1c: improve performance by avoiding unnecessary pcie writes on xmit Gatis Peisenieks
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=c7ae91ea1d8aec340202c67cd4c85d30@mikrotik.com \
--to=gatis@mikrotik.com \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=dchickles@marvell.com \
--cc=eric.dumazet@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tully@mikrotik.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