IB/hfi1: Improve SDMA engine assignment for user SDMA
authorJianxin Xiong <jianxin.xiong@intel.com>
Fri, 1 Jul 2016 23:01:56 +0000 (16:01 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 2 Aug 2016 19:47:43 +0000 (15:47 -0400)
commit14833b8c52424eafb962f9ce7d8f1c01c14ee41f
tree529f85b45c79238bb0e611b5587eee0c9f38ab11
parente014991d0735ce4ca7473f9430ce71847fdc7e2f
IB/hfi1: Improve SDMA engine assignment for user SDMA

Currently each user context is assigned a single SDMA engine
based on the VL, context id, and subcontext id. That means for
MPI applications, each rank can only use one SDMA engine for
all messages. This may create unwanted backup for independent
messages going to different destinations upon congestion at one
destination.

This patch adds the packet "dlid" to the formula of SDMA engine
selection for user SDMA requests. A simple hash table is used
to maintain even distribution among the available SDMA engines
regardless how the "dlid" values are distributed.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/user_sdma.c