[PATCH 0/2] Convert IB/mad to use an IDR for agent IDs
From: Matthew Wilcox
Date: Fri Jun 08 2018 - 13:42:43 EST
From: Matthew Wilcox <mawilcox@xxxxxxxxxxxxx>
Compared to the RFC I sent yesterday, this version retains the per-port
spinlock for use when looking up the MAD agent by vendor/class/etc.
Now we should only see a performance improvement relative to the current
code. We should see that improvement two different ways: interrupts
remain enabled and no spinlock is taken when doing a lookup in the IDR,
and we don't walk a linked list looking for the right agent; we just
walk the (low height) tree and find the correct agent.
There are more improvements that could be made, but this fixes the mlx4
bug that Hans reported.
Matthew Wilcox (2):
IB/mad: Agent registration is process context only
IB/mad: Use IDR for agent IDs
drivers/infiniband/core/mad.c | 90 ++++++++++++++++++------------
drivers/infiniband/core/mad_priv.h | 7 ++-
include/linux/idr.h | 9 +++
3 files changed, 66 insertions(+), 40 deletions(-)