[openib-general] [PATCH/RFC] libibverbs and libmthca fork support

Roland Dreier rdreier at cisco.com
Wed Aug 2 08:08:48 PDT 2006


    Gleb> Before you do it check libmthca/src/buf.c file please. It
    Gleb> look funny at least in patch you've sent (as if somebody did
    Gleb> cat buf.c >> buf.c)

Yes that was just a bad copy and paste into my mail.

    Roland> But one last call for comments: in particular, does anyone
    Roland> object to libibverbs being fork-unsafe by default unless
    Roland> ibv_fork_init is called?

    Gleb> I am not sure about this one. The library like MPI will have
    Gleb> to always call this anyway. On the other side if some
    Gleb> library calls fork() without application knowing it?
    Gleb> Suddenly programmer should care about such details. Perhaps
    Gleb> opt out is better the opt in and libibverbs should skip
    Gleb> ibv_fork_init() only if application ask this explicitly?

But then what should libibverbs do on a kernel that doesn't support
the required madvise(MADV_DONTFORK) call?

It's fine if MPI calls ibv_fork_init() always -- at least then it has
a hint about whether fork() will work.

Do you know if there are libraries that call fork()?

 - R.




More information about the general mailing list