On FreeBSD pthread mutex, cond, and spinlocks allocate memory. On Linux based systems, these calls do not allocate memory. So there was a safe assumption that the ofed RDMA verb calls do not need to explicitly destroy the pthread locks. This assumption is false on FreeBSD. So let us rearrange the code to cleanup the pthread locks.
Details
- Reviewers
vangyzen delphij - Commits
- rGa687910fc435: Cleanup pthread locks in ofed RDMA verbs
I was able to test and exercise the ibverbs, mlx4 and mlx5 libraries by call the specific calls and then calling free, while using a memory leak detector tool.
I was able to do this for the simpler calls in those libraries. All other _ex version of calls I was unable to do. The cxgb4 ones I was not able to test.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
contrib/ofed/libibverbs/cmd.c | ||
---|---|---|
728 | This comment made sense in the OneFS tree, but not here. Nuke it. | |
959 | This comment made sense in the OneFS tree, but not here. Nuke it. | |
1210 | This comment made sense in the OneFS tree, but not here. Nuke it. | |
contrib/ofed/libibverbs/device.c | ||
286 | This comment made sense in the OneFS tree, but not here. Nuke it. | |
contrib/ofed/libibverbs/verbs.h | ||
2171 | This comment made sense in the OneFS tree, but not here. Nuke it. | |
contrib/ofed/libmlx4/mlx4.c | ||
264 | Check indentation. It should be one tab. | |
269 | Check indentation. It should be one tab. | |
contrib/ofed/libmlx5/mlx5.c | ||
962 | Check indentation. | |
1007 | Check indentation. |
What is supposed to happen next? Do I need more reviews or does someone need to merge this code in?