From: Tal Gilboa <talgi@mellanox.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Tariq Toukan <tariqt@mellanox.com>,
Tal Gilboa <talgi@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
Idan Burstein <idanb@mellanox.com>,
Yamin Friedman <yaminf@mellanox.com>,
Max Gurtovoy <maxg@mellanox.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: [RFC/PATCH net-next 0/9] net/dim: Support for multiple implementations
Date: Sun, 3 Feb 2019 15:50:31 +0200 [thread overview]
Message-ID: <20190203135040.28871-1-talgi@mellanox.com> (raw)
net_dim.h lib exposes an implementation of the DIM algorithm for dynamically-tuned interrupt
moderation for networking interfaces.
We need the same behavior for any block CQ. The main motivation is two benefit from maximized
completion rate and reduced interrupt overhead that DIM may provide.
Current DIM implementation prioritizes reducing interrupt overhead over latency. Also, in
order to reduce DIM's own overhead, the algorithm might take take some time to identify it
needs to change profiles. For these reasons we got to the understanding that a slightly
modified algorithm is needed. Early tests with current implementation show it doesn't react
fast and sharply enough in order to satisfy the block CQ needs.
I would like to suggest an implementation for block DIM. The idea is to expose the new
functionality without the risk of breaking Net DIM behavior for netdev. Below are main
similarities and differences between the two implementations and general guidelines for the
suggested solution.
Performance tests over ConnectX-5 100GbE NIC show a 200% improvement on tail latency when
switching from high load traffic to low load traffic.
Common logic, main DIM procedure:
- Calculate current stats from a given sample
- Compare current stats vs. previous iteration stats
- Make a decision -> choose a new profile
Differences:
- Different parameters for moving between profiles
- Different moderation values and number of profiles
- Different sampled data
Suggested solution:
- Common logic will be declared in include/linux/dim.h and implemented in lib/dim/dim.c
- Net DIM (existing) logic will be declared in include/linux/net_dim.h and implemented in
lib/dim/net_dim.c, which will use the common logic from dim.h
- Block DIM logic will be declared in /include/linux/block_dim.h and implemented in
lib/dim/blk_dim.c.
This new implementation will expose modified versions of profiles, dim_step() and dim_decision()
Pros for this solution are:
- Zero impact on existing net_dim implementation and usage
- Relatively more code reuse (compared to two separate solutions)
- Readiness for future implementations
Tal Gilboa (6):
linux/dim: Move logic to dim.h
linux/dim: Remove "net" prefix from internal DIM members
linux/dim: Rename externally exposed macros
linux/dim: Rename net_dim_sample() to net_dim_create_sample()
linux/dim: Rename externally used net_dim members
linux/dim: Move implementation to .c files
Yamin Friedman (3):
linux/dim: Add completions count to dim_sample
linux/dim: Implement blk_dim.h
drivers/infiniband: Use blk_dim in infiniband driver
MAINTAINERS | 3 +
drivers/infiniband/core/cq.c | 75 +++-
drivers/infiniband/hw/mlx4/qp.c | 2 +-
drivers/infiniband/hw/mlx5/qp.c | 2 +-
drivers/net/ethernet/broadcom/bcmsysport.c | 20 +-
drivers/net/ethernet/broadcom/bcmsysport.h | 2 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 13 +-
drivers/net/ethernet/broadcom/bnxt/bnxt.h | 2 +-
.../net/ethernet/broadcom/bnxt/bnxt_debugfs.c | 4 +-
drivers/net/ethernet/broadcom/bnxt/bnxt_dim.c | 7 +-
.../net/ethernet/broadcom/genet/bcmgenet.c | 18 +-
.../net/ethernet/broadcom/genet/bcmgenet.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 8 +-
.../net/ethernet/mellanox/mlx5/core/en_dim.c | 12 +-
.../ethernet/mellanox/mlx5/core/en_ethtool.c | 4 +-
.../net/ethernet/mellanox/mlx5/core/en_main.c | 22 +-
.../net/ethernet/mellanox/mlx5/core/en_txrx.c | 10 +-
include/linux/blk_dim.h | 56 +++
include/linux/dim.h | 126 +++++++
include/linux/irq_poll.h | 7 +
include/linux/net_dim.h | 338 +-----------------
include/rdma/ib_verbs.h | 11 +-
lib/Kconfig | 7 +
lib/Makefile | 1 +
lib/dim/Makefile | 14 +
lib/dim/blk_dim.c | 114 ++++++
lib/dim/dim.c | 92 +++++
lib/dim/net_dim.c | 193 ++++++++++
lib/irq_poll.c | 13 +-
29 files changed, 778 insertions(+), 400 deletions(-)
create mode 100644 include/linux/blk_dim.h
create mode 100644 include/linux/dim.h
create mode 100644 lib/dim/Makefile
create mode 100644 lib/dim/blk_dim.c
create mode 100644 lib/dim/dim.c
create mode 100644 lib/dim/net_dim.c
--
2.19.1
next reply other threads:[~2019-02-03 13:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-03 13:50 Tal Gilboa [this message]
2019-02-03 13:50 ` [RFC/PATCH net-next 1/9] linux/dim: Move logic to dim.h Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 2/9] linux/dim: Remove "net" prefix from internal DIM members Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 3/9] linux/dim: Rename externally exposed macros Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 4/9] linux/dim: Rename net_dim_sample() to net_dim_create_sample() Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 5/9] linux/dim: Rename externally used net_dim members Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 6/9] linux/dim: Move implementation to .c files Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 7/9] linux/dim: Add completions count to dim_sample Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 8/9] linux/dim: Implement blk_dim.h Tal Gilboa
2019-02-03 13:50 ` [RFC/PATCH net-next 9/9] drivers/infiniband: Use blk_dim in infiniband driver Tal Gilboa
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=20190203135040.28871-1-talgi@mellanox.com \
--to=talgi@mellanox.com \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=idanb@mellanox.com \
--cc=maxg@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=tariqt@mellanox.com \
--cc=yaminf@mellanox.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