From: Vincent Hanquez <vincent@xensource.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: xs transaction
Date: Tue, 11 Sep 2007 13:45:24 +0200 [thread overview]
Message-ID: <20070911114524.GA18631@snarc.org> (raw)
In-Reply-To: <D470B4E54465E3469E2ABBC5AFAC390F013B223C@pdsmsx412.ccr.corp.intel.com>
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
next prev parent reply other threads:[~2007-09-11 11:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 7:17 xs transaction Tian, Kevin
2007-09-11 7:31 ` Keir Fraser
2007-09-11 7:34 ` Tian, Kevin
2007-09-11 7:42 ` Keir Fraser
2007-09-11 7:44 ` Tian, Kevin
2007-09-11 11:45 ` Vincent Hanquez [this message]
2007-09-11 12:30 ` Tian, Kevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070911114524.GA18631@snarc.org \
--to=vincent@xensource.com \
--cc=kevin.tian@intel.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.