[ofa-general] Re: [PATCH V2 - libibverbs] Added reference count to completion event channels

Roland Dreier rdreier at cisco.com
Tue Mar 20 07:14:51 PDT 2007


 > you are right - this is why i thought in the first place why this
 > check need to be done in kernel level.
 > 
 > is there is any difference between check this check and the check that
 > being done when destroying a CQ?
 > why do we check the CQ in kernel level and the completion channel in
 > user level?
 > 
 > i think that need to do this check in kernel level for a cleaner code.

I just don't see how doing this in the kernel would help.  By the time
the kernel knows that userspace is destroying a completion channel,
it's too late, since the uverbs code in the kernel has no way of
failing out a call to close(2) on the completiong channel's fd.
However feel free to prove me wrong by posting a patch that works.

It seems that userspace is the only place that has a chance of making
this work.  We just need to get the locking correct, and at first
glance it looks possible to me.  If you don't see a way to do it then
I'll work on it in the next day or so.

 - R.



More information about the general mailing list