[openib-general] Re: [PATCH] memory leaks in ipoib, srp
Roland Dreier
rolandd at cisco.com
Fri Sep 2 11:28:48 PDT 2005
Michael> Type-safety is one. Cleaner memory management is another:
Michael> its better for clients to allocate their own memory, as
Michael> the two leaks that I sent patches for previously
Michael> demonstrate.
Not sure I understand this. The memory leaks in IPoIB/SRP were leaks
of memory that the clients did allocate themselves.
Michael> An additional thinking behind this is: ULPs (e.g. SDP,
Michael> CM) need to keep lists of per-device objects and kill
Michael> them on device removal. For example with change Sean
Michael> proposes SDP will need to keep a list of per-device
Michael> cm_ids in each connection. One idea, then, is in this
Michael> example to make each cm_id a client, then this list is
Michael> managed by device.c
This doesn't really make sense to me. Each cm_id is attached to a
device. You don't want to register/deregister a client and get a
callback for every device when you create or destroy an SDP
connection.
Right now SDP has a single global CM listen -- it calls ib_cm_listen
in sdp_conn.c when it's loaded. Sean's change would just require that
SDP do a single listen for each device in the add callback and destroy
that cm_id in the remove callback.
- R.
More information about the general
mailing list