Re: [RFC][PATCH 3/3] Process events biarch bug: New process events connector value

Evgeniy Polyakov
2006-06-28T05:53:32Z

On Tue, Jun 27, 2006 at 02:39:42PM -0700, Matt Helsley (matthltc@us.ibm.com) wrote:
> > Is there a reason why the # of listeners part is removed (basically the
> > LISTEN/IGNORE) ? and why as part of this patch ?
>
> Michael Kerrisk had some objections to LISTEN/IGNORE and I've been
> looking into making a connector function that would replace them. They
> exist primarily to improve performance by avoiding the memory allocation
> in cn_netlink_send() when there are no listeners.

Connector supports check for listeners before allocation quite long ago.

> > > + err = cn_add_callback(&cn_proc_event_id, "cn_proc", NULL);
> >
> > is this needed if you are not going to have the callback ?
>
> I believe so. Evgeniy?

Depending on how are you going to use it.
It is obviously required for receiving data from userspace, but if you
only want to send data from kernelspace you can use cn_netlink_send()
without registering callback, but in that case you must provide group
number to cn_netlink_send().

> Thanks,
> -Matt Helsley

--
Evgeniy Polyakov