[openib-general] Re: [PATCH] signal driven io support for ib_uverbs
Gleb Natapov
glebn at voltaire.com
Wed Jul 6 23:29:25 PDT 2005
On Wed, Jul 06, 2005 at 10:38:46AM -0700, Roland Dreier wrote:
> Thanks for adding this. A few questions:
>
> > +static int ib_uverbs_event_async (int fd, struct file *filp, int on)
> > +{
> > + int ret;
> > + struct ib_uverbs_event_file *file = filp->private_data;
> > +
> > + if (!file)
> > + return -EBADFD;
>
> Can this function ever be called on a file with private_data not set?
> Why do we need this check?
I don't think it can, but it is slow path an check doesn't hurt.
>
> > +
> > + if ((ret = fasync_helper(fd, filp, on, &file->fasync)) < 0)
> > + return ret;
> > +
> > + if (on)
> > + ret = f_setown(filp, current->pid, 0);
>
> Why do we need the f_setown? Doesn't the core kernel already handle
> this for us?
Same here.
>
> > + kill_fasync (&file->async_file.fasync, SIGIO, POLL_IN);
>
> We want this in both ib_uverbs_comp_handler() and also
> ib_uverbs_async_handler() too, right?
Yes, of cause. I am using signals for async events handling so I missed this
one.
--
Gleb.
More information about the general
mailing list