[openib-general] Re: [resend][RFC][PATCH] adding call to madvise
Michael S. Tsirkin
mst at mellanox.co.il
Wed May 17 21:24:27 PDT 2006
Quoting r. Gleb Natapov <glebn at voltaire.com>:
> @@ -187,8 +194,8 @@ int ibv_lock_range(void *base, size_t si
>
>
> if (node->refcnt++ == 0) {
> - ret = mlock((void *) node->start,
> - node->end - node->start + 1);
> + ret = madvise((void *) node->start,
> + node->end - node->start + 1, MADV_DONTFORK);
> if (ret)
> goto out;
> }
Will this break libibverbs on older kernels that don't have madvise?
Maybe test MADV_DONTFORK during library startup and set a flag?
--
MST
More information about the general
mailing list