android_kernel_xiaomi_sm8350/drivers/infiniband/hw
Roland Dreier e8bb4beb2b IB/mthca: Keep free count for MTT buddy allocator
MTT entries are allocated with a buddy allocator, which just keeps
bitmaps for each level of the buddy table.  However, all free space
starts out at the highest order, and small allocations start scanning
from the lowest order.  When the lowest order tables have no free
space, this can lead to scanning potentially millions of bits before
finding a free entry at a higher order.

We can avoid this by just keeping a count of how many free entries
each order has, and skipping the bitmap scan when an order is
completely empty.  This provides a nice performance boost for a
negligible increase in memory usage.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2008-07-22 14:20:05 -07:00
..
amso1100 RDMA/core: Add local DMA L_Key support 2008-07-14 23:48:53 -07:00
cxgb3 RDMA/cxgb3: Fixes for zero STag 2008-07-14 23:48:53 -07:00
ehca IB/ehca: Make device table externally visible 2008-07-14 23:48:49 -07:00
ipath Merge branch 'core/rcu' into core/rcu-for-linus 2008-07-15 21:10:12 +02:00
mlx4 IB/mlx4: Use kzalloc() for new QPs so flags are initialized to 0 2008-07-14 23:48:53 -07:00
mthca IB/mthca: Keep free count for MTT buddy allocator 2008-07-22 14:20:05 -07:00
nes RDMA/core: Add local DMA L_Key support 2008-07-14 23:48:53 -07:00