]> git.baikalelectronics.ru Git - kernel.git/commit
IB/cma: Check for GID on listening device first
authorDoug Ledford <dledford@redhat.com>
Tue, 24 Sep 2013 21:16:28 +0000 (17:16 -0400)
committerRoland Dreier <roland@purestorage.com>
Fri, 8 Nov 2013 22:42:24 +0000 (14:42 -0800)
commitac27457264919aae7537b0b1f989081f99cd8964
tree54be73e8facf7b0692c28a611d5b30a95b1651a4
parentd292a43e8eed2eee91389f7b4933d0c5f5c16b6f
IB/cma: Check for GID on listening device first

As a simple optimization that should speed up the vast majority of
connect attemps on IB devices, when we are searching for the GID of an
incoming connection in the cached GID lists of devices, search the
device that received the incoming connection request first.  If we
don't find it there, then move on to other devices.

This reduces the time to perform 10,000 connections considerably.
Prior to this patch, a bad run of cmtime would look like this:

connect      :    12399.26   12351.10    8609.00    1239.93

With this patch, it looks more like this:

connect      :     5864.86    5799.80    8876.00     586.49

Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/core/cma.c