Re: rsockets and fork

From
Roland Dreier <hidden>
Date
2012-08-24 18:22:04
On Wed, Aug 22, 2012 at 4:35 PM, Hefty, Sean [off-list ref] wrote:
I'm haven't identified the specific problem with fork support, but I did see this in libmlx4:

mlx4_alloc_context()
{
        ...
        context->uar = mmap(NULL, to_mdev(ibdev)->page_size, PROT_WRITE,
                            MAP_SHARED, cmd_fd, 0);
        if (context->uar == MAP_FAILED)
                goto err_free;

        if (resp.bf_reg_size) {
                context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size,
                                        PROT_WRITE, MAP_SHARED, cmd_fd,
                                        to_mdev(ibdev)->page_size);
        ...
}

I don't know for certain that these mmap() calls cause an issue, but the preload library socket() function calls rsocket(), which loads and initializes libibverbs.  This calls mlx4_alloc_context() before fork() has been called.
I don't think those mmap()s should be an issue with fork.... they are
mapping adapter PCI space into userspace, but it should work across
fork.

 - R.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thread (1 message) 1 message, 1 author, last reply 2012-08-24
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help