diff options
author | Michael S. Tsirkin <mst@mellanox.co.il> | 2007-04-12 11:10:25 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-04-30 20:30:28 -0400 |
commit | 9ba6d5529dd919b442eedf5bef1dd28aca2ee9fe (patch) | |
tree | 52ee9daec60b678bd304b5936b598296f1d8048f /drivers | |
parent | c3af664adbe06803931dbc7a3c8588982d72fac1 (diff) |
IB/mthca: Work around kernel QP starvation
With mthca, RC QPs can starve each other and even UD QPs on the same
hardware schedule queue. As a result, userspace MPI can starve
e.g. IPoIB traffic, with netdev watchdog warnings getting printed out,
and TCP connections getting stuck or failing.
Reduce the chance of this happening by using three separate hardware
schedule queues: one for userspace RC QPs, one for kernel RC QPs, and
one for all other QPs.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 8fe6fee7a97a..fee60c852d14 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -701,6 +701,19 @@ int mthca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, | |||
701 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH); | 701 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_PRIMARY_ADDR_PATH); |
702 | } | 702 | } |
703 | 703 | ||
704 | if (ibqp->qp_type == IB_QPT_RC && | ||
705 | cur_state == IB_QPS_INIT && new_state == IB_QPS_RTR) { | ||
706 | u8 sched_queue = ibqp->uobject ? 0x2 : 0x1; | ||
707 | |||
708 | if (mthca_is_memfree(dev)) | ||
709 | qp_context->rlkey_arbel_sched_queue |= sched_queue; | ||
710 | else | ||
711 | qp_context->tavor_sched_queue |= cpu_to_be32(sched_queue); | ||
712 | |||
713 | qp_param->opt_param_mask |= | ||
714 | cpu_to_be32(MTHCA_QP_OPTPAR_SCHED_QUEUE); | ||
715 | } | ||
716 | |||
704 | if (attr_mask & IB_QP_TIMEOUT) { | 717 | if (attr_mask & IB_QP_TIMEOUT) { |
705 | qp_context->pri_path.ackto = attr->timeout << 3; | 718 | qp_context->pri_path.ackto = attr->timeout << 3; |
706 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT); | 719 | qp_param->opt_param_mask |= cpu_to_be32(MTHCA_QP_OPTPAR_ACK_TIMEOUT); |