netdev
[Top] [All Lists]

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

To: johnpol@xxxxxxxxxxx
Subject: Re: [1/1] connector/CBUS: new messaging subsystem. Revision number next.
From: Dmitry Torokhov <dtor_core@xxxxxxxxxxxxx>
Date: Wed, 27 Apr 2005 00:46:40 -0500
Cc: netdev@xxxxxxxxxxx, Greg KH <greg@xxxxxxxxx>, Jamal Hadi Salim <hadi@xxxxxxxxxx>, Kay Sievers <kay.sievers@xxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, James Morris <jmorris@xxxxxxxxxx>, Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxx>, Thomas Graf <tgraf@xxxxxxx>, Jay Lan <jlan@xxxxxxxxxxxx>
In-reply-to: <1114579926.14282.16.camel@uganda>
References: <20050411125932.GA19538@xxxxxxxxxxxxxxxxxxxxxxxx> <200504270016.34002.dtor_core@xxxxxxxxxxxxx> <1114579926.14282.16.camel@uganda>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: KMail/1.8
On Wednesday 27 April 2005 00:32, Evgeniy Polyakov wrote:
> On Wed, 2005-04-27 at 00:16 -0500, Dmitry Torokhov wrote:
> > On Tuesday 26 April 2005 23:06, Evgeniy Polyakov wrote:
> > > Let's clarify that we are talking about userspace->kernelspace
> > > direction.
> > > Only for that messages callback path is invoked.
> > 
> > What about kernelspace->userspace or kernelspace->kernelspace?
> > From what I see nothing stops kernel code from calling cn_netlink_send,
> > in fact your cbus does exactly that. So I am confused why you singled
> > out userspace->kernelspace direction.
> 
> You miunderstand the code -
> cn_netlink_send() never ends up in callback invocation, 
> it can only deliver messages in kernelspace->userspace direction.
> kernelspace->userspace direction ends up adding buffer into
> socket queue, from which userspace may read data using recv() system
> call.

Yes, you are right, sorry. I missed the fact that message is not injected
into callback queue. Hmm, might be useful if it was, for implementing
various kinds of in-kernel notifications.

Other thing to consider - even if there is explicit schedule on userspace->
kernelspace path there is no quarantee that connector thread will be
scheduled before userspace - userspace could be higher-priority bursty task.
Although this scenario it not likely I guess.

-- 
Dmitry

<Prev in Thread] Current Thread [Next in Thread>