Ordering message in kdbus

Greg KH gregkh at linuxfoundation.org
Mon Mar 31 08:37:20 PDT 2014


On Mon, Mar 31, 2014 at 04:00:58PM +0200, Zzz Rrr wrote:
> Hello,
> 
> 
> (I have already asked a similar question on DBus in an other thread.
> 
> Here, I'm looking for similar information in the first part and then
> additionnal information relative to kdbus functionnalities)
> 
>  
> 
> 1 - Firstly, I would like to know how incoming messages are processed by
> kdbus. 
> 
> 
> I would like to confirm whether kdbus daemon handles messages in the same order
> as it receives or if kdbus handles these messages in out of order way.
> 
> 
> Take an example, we have 3 processes A, B, and C. A sends messages A1, A2, A3
> (in this order), B sends B1, B2 (in this order) and C sends C1.
> 
> We know there are several possibilities concerning incomming messages order.
> Consider that kdbus receives messages in this order : A1,A2,B1,A3,C1,B2.
> 
> 
> In your opinion, what is the order that kdbus handles messages ? Is it 
> A1,A2,B1,A3,C1,B2  ?

kdbus handles the messages in the order it receives them.  If two
processes are sending at the same time, it just happens to be how ever
the locking works out (in other words, you better not be relying on
multiple processes on multiple cpus to be sending in any specific order
other than the order the processes themselves are sending them in.)

greg k-h


More information about the dbus mailing list