• M
    IB/qib: Optimize pio ack buffer allocation · bb77a077
    Mike Marciniszyn 提交于
    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: NRamkrishna Vepa <ramkrishna.vepa@intel.com>
    Signed-off-by: NMike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: NRoland Dreier <roland@purestorage.com>
    bb77a077
qib_iba6120.c 109.3 KB