rdma-core icon indicating copy to clipboard operation
rdma-core copied to clipboard

libibverbs: ignore IBV_FORK_SAFE et.al. when kernel has fork support

Open krehm opened this issue 1 year ago • 4 comments

ibv_fork_init will now check if IBV_FORK_UNNEEDED is true, and if so will skip initialization of mm_root. Environment variables like IBV_FORK_SAFE and UCX_IB_FORK_INIT are silently ignored when the kernel has the necessary fork support.

krehm avatar Feb 20 '24 21:02 krehm

@gal-pressman do you remember why we didn't do this from the start?

jgunthorpe avatar Feb 21 '24 15:02 jgunthorpe

https://github.com/linux-rdma/rdma-core/pull/975#issuecomment-824665681

gal-pressman avatar Feb 21 '24 16:02 gal-pressman

In my case, it's not a question of performance improvement, it's a way to prevent segfaults when the user specifies an environment variable that enables ibv_fork_init. Background info available here.

krehm avatar Feb 21 '24 16:02 krehm

Then it is probably best to move forward like this

jgunthorpe avatar Feb 21 '24 17:02 jgunthorpe

Any issues moving forward with this PR?

chien-intel avatar Feb 27 '24 13:02 chien-intel