All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: netdev@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>,
	Joao Pinto <Joao.Pinto@synopsys.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	"David S. Miller" <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next 0/7] net: stmmac: CPU Performance Improvements
Date: Wed, 13 Nov 2019 16:12:01 +0100	[thread overview]
Message-ID: <cover.1573657592.git.Jose.Abreu@synopsys.com> (raw)

CPU Performance improvements for stmmac. Please check bellow for results
before and after the series.

Patch 1/7, allows RX Interrupt on Completion to be disabled and only use the
RX HW Watchdog.

Patch 2/7, setups the default RX coalesce settings instead of using the
minimum value.

Patch 3/7, enables the Transmit Buffer Unavailable interrupt on GMAC4+ cores
so that we don't miss any packet that could have been coalesced.

Patch 4/7 and 5/7, removes the uneeded computations for RX Flow Control
activation/de-activation, on some cases.

Patch 6/7, tunes-up the default coalesce settings.

Patch 7/7, corrects the interpretation of TX Coalesce.


NetPerf UDP Results:
--------------------

Socket  Message  Elapsed      Messages                   CPU      Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SS     us/KB
--- XGMAC@2.5G: Before
212992    1400   10.00     2100620      0     2351.7     36.69    5.112
212992           10.00     2100539            2351.6     26.18    3.648
--- XGMAC@2.5G: After
212992    1400   10.00     2116860      0     2370.4     27.61    3.816 
212992           10.00     2111552            2364.5     17.41    2.407

--- GMAC5@1G: Before
212992    1400   10.00      786000      0      880.2     34.71    12.923
212992           10.00      786000             880.2     23.42    8.719
--- GMAC5@1G: After
212992    1400   10.00      847702      0      949.3     15.07    5.201 
212992           10.00      847702             949.3     12.91    4.456


Perf TCP Results on RX Path:
----------------------------
--- XGMAC@2.5G: Before
22.51%  swapper          [stmmac]           [k] dwxgmac2_dma_interrupt
10.82%  swapper          [stmmac]           [k] dwxgmac2_host_mtl_irq_status
 5.21%  swapper          [stmmac]           [k] dwxgmac2_host_irq_status
 4.67%  swapper          [stmmac]           [k] dwxgmac3_safety_feat_irq_status
 3.63%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 2.74%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.52%  swapper          [kernel.kallsyms]  [k] update_stack_state
 1.94%  ksoftirqd/0      [stmmac]           [k] dwxgmac2_dma_interrupt
 1.45%  iperf3           [kernel.kallsyms]  [k] queued_spin_lock_slowpath
 1.26%  swapper          [kernel.kallsyms]  [k] create_object
--- XGMAC@2.5G: After
12.00%  swapper          [stmmac]           [k] dwxgmac2_dma_interrupt
 5.96%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 5.65%  swapper          [stmmac]           [k] dwxgmac2_host_mtl_irq_status
 4.36%  swapper          [kernel.kallsyms]  [k] update_stack_state
 3.91%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.82%  swapper          [stmmac]           [k] dwxgmac2_host_irq_status
 2.62%  swapper          [stmmac]           [k] dwxgmac3_safety_feat_irq_status
 2.25%  swapper          [kernel.kallsyms]  [k] create_object
 2.03%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
 1.97%  swapper          [kernel.kallsyms]  [k] unwind_next_frame.part.4

--- GMAC5@1G: Before
31.29%  swapper          [stmmac]           [k] dwmac4_dma_interrupt
14.57%  swapper          [stmmac]           [k] dwmac4_irq_mtl_status
10.66%  swapper          [stmmac]           [k] dwmac4_irq_status
 1.97%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 1.73%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 1.59%  swapper          [kernel.kallsyms]  [k] update_stack_state
 1.15%  iperf3           [kernel.kallsyms]  [k] do_syscall_64
 1.01%  ksoftirqd/0      [stmmac]           [k] dwmac4_dma_interrupt
 0.89%  swapper          [kernel.kallsyms]  [k] __default_send_IPI_dest_field
 0.75%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
--- GMAC5@1G: After
 9.27%  swapper          [stmmac]           [k] dwmac4_dma_interrupt
 6.35%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 4.94%  swapper          [kernel.kallsyms]  [k] update_stack_state
 4.70%  swapper          [stmmac]           [k] dwmac4_irq_mtl_status
 3.58%  swapper          [stmmac]           [k] dwmac4_irq_status
 3.42%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.18%  swapper          [kernel.kallsyms]  [k] unwind_next_frame.part.4
 2.17%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
 2.15%  swapper          [kernel.kallsyms]  [k] create_object
 1.26%  swapper          [kernel.kallsyms]  [k] unwind_get_return_address

---
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---

Jose Abreu (7):
  net: stmmac: Do not set RX IC bit if RX Coalesce is zero
  net: stmmac: Setup a default RX Coalesce value instead of the minimum
  net: stmmac: gmac4+: Enable the TBU Interrupt
  net: stmmac: gmac4+: Remove uneeded computation for RFA/RFD
  net: stmmac: xgmac: Remove uneeded computation for RFA/RFD
  net: stmmac: Tune-up default coalesce settings
  net: stmmac: TX Coalesce should be per-packet

 drivers/net/ethernet/stmicro/stmmac/common.h       |  5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   | 14 ++------------
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h   |  2 ++
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 14 ++------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 14 ++++++++------
 5 files changed, 17 insertions(+), 32 deletions(-)

-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Jose Abreu <Jose.Abreu@synopsys.com>
To: netdev@vger.kernel.org
Cc: Joao Pinto <Joao.Pinto@synopsys.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/7] net: stmmac: CPU Performance Improvements
Date: Wed, 13 Nov 2019 16:12:01 +0100	[thread overview]
Message-ID: <cover.1573657592.git.Jose.Abreu@synopsys.com> (raw)

CPU Performance improvements for stmmac. Please check bellow for results
before and after the series.

Patch 1/7, allows RX Interrupt on Completion to be disabled and only use the
RX HW Watchdog.

Patch 2/7, setups the default RX coalesce settings instead of using the
minimum value.

Patch 3/7, enables the Transmit Buffer Unavailable interrupt on GMAC4+ cores
so that we don't miss any packet that could have been coalesced.

Patch 4/7 and 5/7, removes the uneeded computations for RX Flow Control
activation/de-activation, on some cases.

Patch 6/7, tunes-up the default coalesce settings.

Patch 7/7, corrects the interpretation of TX Coalesce.


NetPerf UDP Results:
--------------------

Socket  Message  Elapsed      Messages                   CPU      Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SS     us/KB
--- XGMAC@2.5G: Before
212992    1400   10.00     2100620      0     2351.7     36.69    5.112
212992           10.00     2100539            2351.6     26.18    3.648
--- XGMAC@2.5G: After
212992    1400   10.00     2116860      0     2370.4     27.61    3.816 
212992           10.00     2111552            2364.5     17.41    2.407

--- GMAC5@1G: Before
212992    1400   10.00      786000      0      880.2     34.71    12.923
212992           10.00      786000             880.2     23.42    8.719
--- GMAC5@1G: After
212992    1400   10.00      847702      0      949.3     15.07    5.201 
212992           10.00      847702             949.3     12.91    4.456


Perf TCP Results on RX Path:
----------------------------
--- XGMAC@2.5G: Before
22.51%  swapper          [stmmac]           [k] dwxgmac2_dma_interrupt
10.82%  swapper          [stmmac]           [k] dwxgmac2_host_mtl_irq_status
 5.21%  swapper          [stmmac]           [k] dwxgmac2_host_irq_status
 4.67%  swapper          [stmmac]           [k] dwxgmac3_safety_feat_irq_status
 3.63%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 2.74%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.52%  swapper          [kernel.kallsyms]  [k] update_stack_state
 1.94%  ksoftirqd/0      [stmmac]           [k] dwxgmac2_dma_interrupt
 1.45%  iperf3           [kernel.kallsyms]  [k] queued_spin_lock_slowpath
 1.26%  swapper          [kernel.kallsyms]  [k] create_object
--- XGMAC@2.5G: After
12.00%  swapper          [stmmac]           [k] dwxgmac2_dma_interrupt
 5.96%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 5.65%  swapper          [stmmac]           [k] dwxgmac2_host_mtl_irq_status
 4.36%  swapper          [kernel.kallsyms]  [k] update_stack_state
 3.91%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.82%  swapper          [stmmac]           [k] dwxgmac2_host_irq_status
 2.62%  swapper          [stmmac]           [k] dwxgmac3_safety_feat_irq_status
 2.25%  swapper          [kernel.kallsyms]  [k] create_object
 2.03%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
 1.97%  swapper          [kernel.kallsyms]  [k] unwind_next_frame.part.4

--- GMAC5@1G: Before
31.29%  swapper          [stmmac]           [k] dwmac4_dma_interrupt
14.57%  swapper          [stmmac]           [k] dwmac4_irq_mtl_status
10.66%  swapper          [stmmac]           [k] dwmac4_irq_status
 1.97%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 1.73%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 1.59%  swapper          [kernel.kallsyms]  [k] update_stack_state
 1.15%  iperf3           [kernel.kallsyms]  [k] do_syscall_64
 1.01%  ksoftirqd/0      [stmmac]           [k] dwmac4_dma_interrupt
 0.89%  swapper          [kernel.kallsyms]  [k] __default_send_IPI_dest_field
 0.75%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
--- GMAC5@1G: After
 9.27%  swapper          [stmmac]           [k] dwmac4_dma_interrupt
 6.35%  swapper          [kernel.kallsyms]  [k] stack_trace_consume_entry
 4.94%  swapper          [kernel.kallsyms]  [k] update_stack_state
 4.70%  swapper          [stmmac]           [k] dwmac4_irq_mtl_status
 3.58%  swapper          [stmmac]           [k] dwmac4_irq_status
 3.42%  iperf3           [kernel.kallsyms]  [k] copy_user_enhanced_fast_string
 2.18%  swapper          [kernel.kallsyms]  [k] unwind_next_frame.part.4
 2.17%  swapper          [stmmac]           [k] stmmac_napi_poll_rx
 2.15%  swapper          [kernel.kallsyms]  [k] create_object
 1.26%  swapper          [kernel.kallsyms]  [k] unwind_get_return_address

---
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Jose Abreu <joabreu@synopsys.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: netdev@vger.kernel.org
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---

Jose Abreu (7):
  net: stmmac: Do not set RX IC bit if RX Coalesce is zero
  net: stmmac: Setup a default RX Coalesce value instead of the minimum
  net: stmmac: gmac4+: Enable the TBU Interrupt
  net: stmmac: gmac4+: Remove uneeded computation for RFA/RFD
  net: stmmac: xgmac: Remove uneeded computation for RFA/RFD
  net: stmmac: Tune-up default coalesce settings
  net: stmmac: TX Coalesce should be per-packet

 drivers/net/ethernet/stmicro/stmmac/common.h       |  5 +++--
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.c   | 14 ++------------
 drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h   |  2 ++
 drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 14 ++------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 14 ++++++++------
 5 files changed, 17 insertions(+), 32 deletions(-)

-- 
2.7.4


             reply	other threads:[~2019-11-13 15:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 15:12 Jose Abreu [this message]
2019-11-13 15:12 ` [PATCH net-next 0/7] net: stmmac: CPU Performance Improvements Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 1/7] net: stmmac: Do not set RX IC bit if RX Coalesce is zero Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 2/7] net: stmmac: Setup a default RX Coalesce value instead of the minimum Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 3/7] net: stmmac: gmac4+: Enable the TBU Interrupt Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 4/7] net: stmmac: gmac4+: Remove uneeded computation for RFA/RFD Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 5/7] net: stmmac: xgmac: " Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 6/7] net: stmmac: Tune-up default coalesce settings Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-13 15:12 ` [PATCH net-next 7/7] net: stmmac: TX Coalesce should be per-packet Jose Abreu
2019-11-13 15:12   ` Jose Abreu
2019-11-14 10:59 ` [PATCH net-next 0/7] net: stmmac: CPU Performance Improvements Jose Abreu
2019-11-14 10:59   ` Jose Abreu
2019-11-14 21:34   ` David Miller
2019-11-14 21:34     ` David Miller

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=cover.1573657592.git.Jose.Abreu@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=Joao.Pinto@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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 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.