WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] xs transaction

On Tue, Sep 11, 2007 at 03:44:24PM +0800, Tian, Kevin wrote:
> OK, if you mean nest as two transactions with parent-child relationship... 
> So the problem is still here, existing code doesn't prevent multiple 
> transactions created under same connection, while message process 
> logic can't not handle multiple.
> 
> Say two threads both start transactions under same connection ID. It's 
> likely to succeed as long as two starts goes in sequence. However later 
> once two threads have message sent to xenstore at same time, one 
> will cause assertion and xenstore can't handle.

xenstored is single threaded and the libxs accesses are serialed through
a mutex which prevent two threads to access the ring at the same time.
if it was not, you'ld have much more problems than having two
transactions at the same time.

xenstored will always complete a process_message function until it try
to read a new packet. at this point the conn->transaction is back to
NULL.

> Since we're sure that current implementation doesn't handle parallel 
> transactions (though API level allows), I think do_transaction_start 
> should check conn->transaction_list instead of conn->transaction to 
> ensure it.

how are you sure it doesn't handle parallel transactions ?

-- 
Vincent Hanquez

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

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