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

From: Evgeniy Polyakov
Date: Wed Jun 28 2006 - 01:52:05 EST


On Tue, Jun 27, 2006 at 02:39:42PM -0700, Matt Helsley (matthltc@xxxxxxxxxx) 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/