Re: [PATCH v2 07/13] IB/cma: Helper functions to access port space IDRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28/07/2015 01:48, Hefty, Sean wrote:
>> Add helper functions to access the IDRs by port-space and port number.
>>
>> Pass around the port-space enum in cma.c instead of using pointers to
>> port-space IDRs.
> 
> Why?
> 
>>  drivers/infiniband/core/cma.c | 81 ++++++++++++++++++++++++++++++++------
>> -----
>>  1 file changed, 60 insertions(+), 21 deletions(-)
> 
> This change adds code, and AFAICT makes it less efficient.  What purpose does it serve?
> 

As I wrote before [1], this change is intended to help reuse the code finding
an IDR for a port space, and it is used by patch 9.

As for efficiency, cma_idr, cma_ps_alloc, and cma_ps_remove are completely inlined by my compiler. cma_ps_find does end up adding a function call, but I doubt it would have a significant effect. cma_select_ib_ps and cma_select_inet_ps were already inlined before the patch.

Regards,
Haggai

[1] https://www.mail-archive.com/linux-rdma@xxxxxxxxxxxxxxx/msg25496.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux