All of lore.kernel.org
 help / color / mirror / Atom feed
* [net-next.git 0/7 (V2)] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema.
@ 2012-09-05 15:03 Giuseppe CAVALLARO
  2012-09-05 15:03 ` [net-next.git 1/7] stmmac: remove dead code for TIMER Giuseppe CAVALLARO
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Giuseppe CAVALLARO @ 2012-09-05 15:03 UTC (permalink / raw)
  To: netdev; +Cc: bhutchings, davem, Giuseppe Cavallaro

These patch series remove the STMMAC_TIMER option no longer updated
and never used and add a new mitigation schema.
Having removed the Timer opt, this has made the driver slim.
On top of this work, it has been easier to introduce the new
mitigation schema based on HW RX-watchdog (available in new cores).
In fact, 3.50 and newer cores have an HW RX-Watchdog that can be used for 
mitigating the Rx-interrupts and first results look promising.

Running n-u-t-t-c-p with the following parameters:

 Throughput: 500Mbps
 UDP Buffer size: 1328bytes
 TCP Buffer size: 65536bytes

for example, I got on ST box (arm-based) these improvements:

--------------------------------------------------------------------
      Original                   |     With New Mitigation patch
--------------------------------------------------------------------
 Test        CPU usage  pkt/loss |        CPU usage     pkt/loss
 Type  Mbps        %         %   |Mbps      %              %
--------------------------------------------------------------------
UDP-RX 395.5065 95       20.89   |499.9966  25        0.00%
UDP-TX 499.5578 100     0.08915  |499.7156  100       0.06029%
TCP-RX 499.9221 77               |499.8648  41
TCP-TX 389.5719 99               |499.2802  79
--------------------------------------------------------------------

 ... no regression on ST boxes (SH based) I always test.

This is a brief explanation of the new mitigation schema although there
is a patch that updates the driver's documentation.

o On Rx-side I have:
  New GMACs will use the RX-watchdog timer; old ones will continue to
  use NAPI to mitigate the RX DMA interrupts.
  For the RX-watchdog, there is a parameter that is the RI Watchdog 
  Timer count. It indicates the number of system clock cycles and can be
  set via *ethtool*.

o On Tx-side, the mitigation schema is based on a SW timer
  that calls the tx function (stmmac_tx) to reclaim the resource after
  transmitting the frames.
  Also there is another parameter (a threshold) used to program
  the descriptors avoiding to set the interrupt on completion bit in
  when the frame is sent (xmit). This means that the stmmac_tx can be
  called by the ISR too. Also this parameter can be tuned via ethtool.

V2: the new version of the patches add the ethtool support to get/set
coalesce parameters and totally removed the sysFS support.

Giuseppe Cavallaro (7):
  stmmac: remove dead code for TIMER
  stmmac: manage tx clean out of rx_poll
  stmmac: add the initial tx coalesce schema
  stmmac: add Rx watchdog optimization to mitigate the DMA irqs
  stmmac: get/set coalesce parameters via ethtool
  stmmac: update the doc with new IRQ mitigation
  stmmac: update the driver version to Sept_2012

 Documentation/networking/stmmac.txt                |   28 ++-
 drivers/net/ethernet/stmicro/stmmac/Kconfig        |   25 --
 drivers/net/ethernet/stmicro/stmmac/Makefile       |    1 -
 drivers/net/ethernet/stmicro/stmmac/common.h       |   30 ++-
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h    |    3 -
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    |    6 +
 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h    |    3 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c    |    7 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |   14 +-
 .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c   |   83 +++++++-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  245 ++++++++------------
 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c |  134 -----------
 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.h |   46 ----
 include/linux/stmmac.h                             |    1 +
 14 files changed, 239 insertions(+), 387 deletions(-)
 delete mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
 delete mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.h

-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 14+ messages in thread
* [net-next.git 0/7] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema.
@ 2012-09-03  7:46 Giuseppe CAVALLARO
  2012-09-03  7:46 ` [net-next.git 3/7] stmmac: add the initial tx coalesce schema Giuseppe CAVALLARO
  0 siblings, 1 reply; 14+ messages in thread
From: Giuseppe CAVALLARO @ 2012-09-03  7:46 UTC (permalink / raw)
  To: netdev; +Cc: Giuseppe Cavallaro

These patch series remove the STMMAC_TIMER option no longer updated
and never used and add a new mitigation schema.
Having removed the Timer opt, this has made the driver slim.
On top of this work, it has been easier to introduce the new
mitigation schema based on HW RX-watchdog (available in new cores).
In fact, 3.50 and newer cores have an HW RX-Watchdog that can be used for 
mitigating the Rx-interrupts and first results look promising.

Running n-u-t-t-c-p with the following parameters:

 Throughput: 500Mbps
 UDP Buffer size: 1328bytes
 TCP Buffer size: 65536bytes

for example, I got on ST box (arm-based) these improvements:

--------------------------------------------------------------------
      Original                   |     With New Mitigation patch
--------------------------------------------------------------------
 Test        CPU usage  pkt/loss |        CPU usage     pkt/loss
 Type  Mbps        %         %   |Mbps      %              %
--------------------------------------------------------------------
UDP-RX 395.5065 95       20.89   |499.9966  25        0.00%
UDP-TX 499.5578 100     0.08915  |499.7156  100       0.06029%
TCP-RX 499.9221 77               |499.8648  41
TCP-TX 389.5719 99               |499.2802  79
--------------------------------------------------------------------

 ... no regression on ST boxes (SH based) I always test.

This is a brief explanation of the new mitigation schema although there
is a patch that updates the driver's documentation.

o On Rx-side I have:
  New GMACs will use the RX-watchdog timer; old ones will continue to
  use NAPI to mitigate the RX DMA interrupts.
  For the RX-watchdog, there is a parameter that is the RI Watchdog 
  Timer count. It indicates the number of system clock cycles and can be
  set via sysFS. Next step will be to tune it via ethtool.

o On Tx-side, the mitigation schema is based on a SW timer
  that calls the tx function (stmmac_tx) to reclaim the resource after
  transmitting the frames.
  Also there is another parameter (a threshold) used to program
  the descriptors avoiding to set the interrupt on completion bit in
  when the frame is sent (xmit). This means that the stmmac_tx can be
  called by the ISR too. Also this parameter can be tuned via sysFs and
  not yet via ethtool.

Note1: there is a patch that updates the driver to August 2012.
I hope to also release the PTP support and update the driver in the next weeks.

Note2: next step will be to tune coalesce params via ethtool. I'll do that.

peppe

Giuseppe Cavallaro (7):
  stmmac: remove dead code for TIMER
  stmmac: manage tx clean out of rx_poll
  stmmac: add the initial tx coalesce schema
  stmmac: add Rx watchdog optimization to mitigate the DMA irqs
  stmmac: add sysFs support
  stmmac: add mitigation and sysfs info in the doc
  stmmac: update the driver version to August_2012

 Documentation/networking/stmmac.txt                |   34 ++-
 drivers/net/ethernet/stmicro/stmmac/Kconfig        |   25 --
 drivers/net/ethernet/stmicro/stmmac/Makefile       |    3 +-
 drivers/net/ethernet/stmicro/stmmac/common.h       |   30 ++-
 drivers/net/ethernet/stmicro/stmmac/dwmac1000.h    |    3 -
 .../net/ethernet/stmicro/stmmac/dwmac1000_dma.c    |    6 +
 drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h    |    3 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c    |    7 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac-sysfs.c |  157 +++++++++++
 drivers/net/ethernet/stmicro/stmmac/stmmac.h       |   15 +-
 .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c   |    9 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  |  282 +++++++++-----------
 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c |  134 ---------
 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.h |   46 ----
 14 files changed, 354 insertions(+), 400 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac-sysfs.c
 delete mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
 delete mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_timer.h

-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-09-06  6:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 15:03 [net-next.git 0/7 (V2)] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema Giuseppe CAVALLARO
2012-09-05 15:03 ` [net-next.git 1/7] stmmac: remove dead code for TIMER Giuseppe CAVALLARO
2012-09-05 15:03 ` [net-next.git 2/7] stmmac: manage tx clean out of rx_poll Giuseppe CAVALLARO
2012-09-05 15:51   ` Ben Hutchings
2012-09-05 15:03 ` [net-next.git 3/7] stmmac: add the initial tx coalesce schema Giuseppe CAVALLARO
2012-09-05 16:11   ` Ben Hutchings
2012-09-05 15:03 ` [net-next.git 4/7] stmmac: add Rx watchdog optimization to mitigate the DMA irqs Giuseppe CAVALLARO
2012-09-05 16:14   ` Ben Hutchings
2012-09-05 17:16     ` David Miller
2012-09-06  6:06       ` Giuseppe CAVALLARO
2012-09-05 15:03 ` [net-next.git 5/7] stmmac: get/set coalesce parameters via ethtool Giuseppe CAVALLARO
2012-09-05 15:03 ` [net-next.git 6/7] stmmac: update the doc with new IRQ mitigation Giuseppe CAVALLARO
2012-09-05 15:03 ` [net-next.git 7/7] stmmac: update the driver version to Sept_2012 Giuseppe CAVALLARO
  -- strict thread matches above, loose matches on Subject: below --
2012-09-03  7:46 [net-next.git 0/7] stmmac: remove dead code for STMMAC_TIMER and add new mitigation schema Giuseppe CAVALLARO
2012-09-03  7:46 ` [net-next.git 3/7] stmmac: add the initial tx coalesce schema Giuseppe CAVALLARO

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.