Re: [1/1] connector/CBUS: new messaging subsystem. Revision numbernext.

From: Evgeniy Polyakov
Date: Tue Apr 26 2005 - 14:31:04 EST


On Tue, 26 Apr 2005 14:06:36 -0500
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote:

> On 4/26/05, Evgeniy Polyakov <johnpol@xxxxxxxxxxx> wrote:
> > On Tue, 26 Apr 2005 13:42:10 -0500
> > Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> wrote:
> > > Yes, that woudl work, although I would urge you to implement a message
> > > queue for callbacks (probably limit it to 1000 messages or so) to
> > > allow bursting.
> >
> > It already exist, btw, but not exactly in that way -
> > we have skb queue, which can not be filled from userspace
> > if pressure is so strong so work queue can not be scheduled.
> > It is of course different and is influenced by other things
> > but it handles bursts quite well - it was tested on both
> > SMP and UP machines with continuous flows of forks with
> > shape addon of new running tasks [both fith fork bomb and not],
> > so I think it can be called real bursty test.
> >
>
> Ok, hear me out and tell me where I am wrong:
>
> By default a socket can receive at least 128 skbs with 258-byte
> payload, correct? That means that user of cn_netlink_send, if started
> "fresh", 128 average - size connector messages. If sender does not
> want to wait for anything (unlike your fork tests that do schedule)
> that means that 127 of those 128 messages will be dropped, although
> netlink would deliver them in time just fine.
>
> What am I missing?

Concider netlink_broadcast - it delivers skb to the kernel
listener directly to the input callback - no queueing actually,
the same is for netlink_unicast - so in-kernel users are always
called synchronously.
send() [sys_send()] system call(which btw as syscall does schedule too)
ends up in netlink_sendmsg and thus either netlink_broadcast and
netlink_unicast, which is called directly as we have seen.

> --
> Dmitry


Evgeniy Polyakov

Only failure makes us experts. -- Theo de Raadt
-
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/