]> git.baikalelectronics.ru Git - kernel.git/commit
IB/qib: Change SDMA progression mode depending on single- or multi-rail
authorCQ Tang <cq.tang@intel.com>
Thu, 30 Jan 2014 22:36:00 +0000 (17:36 -0500)
committerRoland Dreier <roland@purestorage.com>
Thu, 20 Mar 2014 17:19:12 +0000 (10:19 -0700)
commit5dc5bc02817e2c0cda20b90ce441089830f9c734
treeab5c966c90f3d1ba1a4e462fbf0737db07577344
parent8802265d5fe544984e19c1725c1221b8d5b8451c
IB/qib: Change SDMA progression mode depending on single- or multi-rail

Improve performance by changing the behavour of the driver when all
SDMA descriptors are in use, and the processes adding new descriptors
are single- or multi-rail.

For single-rail processes, the driver will block the call and finish
posting all SDMA descriptors onto the hardware queue before returning
back to PSM.  Repeated kernel calls are slower than blocking.

For multi-rail processes, the driver will return to PSM as quick as
possible so PSM can feed packets to other rail.  If all hardware
queues are full, PSM will buffer the remaining SDMA descriptors until
notified by interrupt that space is available.

This patch builds a red-black tree to track the number rails opened by
a particular PID. If the number is more than one, it is a multi-rail
PSM process, otherwise, it is a single-rail process.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Reviewed-by: John A Gregor <john.a.gregor@intel.com>
Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com>
Signed-off-by: CQ Tang <cq.tang@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/qib/qib_user_sdma.c