[knem-devel] "unexisting region cookie" error

Brice Goglin Brice.Goglin at inria.fr
Tue Jul 12 07:13:59 CEST 2011

Le 12/07/2011 07:07, bin Wang a écrit :
> yes, I have to initialize that flag to 0. And now my code is working
> properly.
> Originally, I assumed that it was the default behavior of KNEM to
> support one-registration-one-read. 

It was the default in the old send/recv interface. It is not anymore
with the new region/rdma interface.

> will it influence the functionality if I set the flag to 0?

The only difference between setting the single-use flag is that the
region is automatically destroyed after the first use. Setting
single-use is identical to not setting the flag and calling the destroy
ioctl right after the first read or write.

> Before my code exits, I will not be able to know how many registrations
> will happen at runtime. Is there any upper-bound on the max
> registrations? 

Each process can register 2^31 cookies (it does not depend on the memory
buffer being the same again or not). Then you can use it as many times
as you wish as long as you do not explicitly destroy the cookie (or the
single-use flag).

Actually, each process can even open /dev/knem multiple times and
register 2^31 cookies in each of them. So you will reach the system
memory limit before you reach the knem limits :)


More information about the knem-devel mailing list