linux/drivers/infiniband/hw
Mike Marciniszyn bb77a07723 IB/qib: Optimize pio ack buffer allocation
This patch optimizes pio buffer allocation in the kernel.

For qib, kernel pio buffers are used for sending acks.  The code to
allocate the buffer would always start at 0 until it found a buffer.

This means that an average of 64 comparisions were done on each
allocate, since the busy bit won't be cleared until the bits are
refreshed when buffers are exhausted.

This patch adds two new fields in the devdata struct, last_pio and
min_kernel_pio.  last_pio is the last buffer that was allocated.
min_kernel_pio is the lowest potential available buffer.

min_kernel_pio is modifed as contexts are allocated and deallocted.

Reviewed-by: Ramkrishna Vepa <ramkrishna.vepa@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2012-05-14 12:37:03 -07:00
..
amso1100 IB: Use central enum for speed instead of hard-coded values 2012-03-05 09:25:16 -08:00
cxgb3 Merge branches 'cma', 'cxgb3', 'cxgb4', 'ehca', 'iser', 'mad', 'nes', 'qib', 'srp' and 'srpt' into for-next 2012-03-19 09:50:33 -07:00
cxgb4 InfiniBand/RDMA changes for the 3.4 merge window. Nothing big really 2012-03-21 10:33:42 -07:00
ehca Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ipath IB/ipath: Calling PTR_ERR() on right variable in create_file() 2012-01-27 09:48:27 -08:00
mlx4 A few fixes for regressions introduced in 3.4-rc1: 2012-04-26 15:35:35 -07:00
mthca IB: Change CQE "csum_ok" field to a bit flag 2012-03-08 12:34:27 -08:00
nes InfiniBand/RDMA changes for the 3.4 merge window. Nothing big really 2012-03-21 10:33:42 -07:00
qib IB/qib: Optimize pio ack buffer allocation 2012-05-14 12:37:03 -07:00