]> www.infradead.org Git - users/jedix/linux-maple.git/commit
IB/ipoib: Change send workqueue size for CM mode
authorAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Wed, 18 May 2016 01:54:42 +0000 (18:54 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 8 Jul 2016 20:46:03 +0000 (13:46 -0700)
commitd47f890662b5b035557d6b33f33be4c529d1a0a9
tree980ffc5104422f5948e38103d12b6a79eb086cb5
parentd57b0eec68f5a8e77a17ba0acbb68b777b0f2cdb
IB/ipoib: Change send workqueue size for CM mode

Idea here is, one misbehaving connection should not become single point
of failure.

priv->tx_outstanding is shared by all QPs and when it reaches
sendq_size, network interface queue is stopped.

In connected mode, for every connection, TX QP size is sendq_size.
So if one of QP starts behaving bad and we don't receive send
completions in time, priv->tx_outstanding value can reach to the limit
where network interface queue is required to be stopped.
This can bring down entire cluster, because even ping will not go
forward from that point onwards.

With this patch, when creating CM QP for send operations, we limit size:
+int ipoib_cm_sendq_size __read_mostly = ipoib_sendq_size / 8;

Based on Yuval's suggestion, added module parameter to dictate how many
bad connections we want to allow (8 above is configurable).

If outstanding completions for that particular connection reaches to
size of ipoib_cm_sendq_size; we halt sending data on that connection
till we receive at least one completion.

In summary, this will require multiple QPs to misbehave (instead of 1)
in order to bring down entire cluster.

As clarification, this patch is not trying to recover or change behavior
of connection which may have gone bad; but it's reducing impact of bad
connection.

Orabug: 23254764

Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
drivers/infiniband/ulp/ipoib/ipoib.h
drivers/infiniband/ulp/ipoib/ipoib_cm.c
drivers/infiniband/ulp/ipoib/ipoib_main.c