public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: get rid of srcu idx
Date: Tue, 26 Oct 2010 10:53:39 +0200	[thread overview]
Message-ID: <20101026085339.GB23530@redhat.com> (raw)
In-Reply-To: <4CC68C11.3010801@redhat.com>

On Tue, Oct 26, 2010 at 10:06:41AM +0200, Avi Kivity wrote:
>  On 10/26/2010 10:01 AM, Gleb Natapov wrote:
> >On Tue, Oct 26, 2010 at 09:57:08AM +0200, Avi Kivity wrote:
> >>   On 10/26/2010 08:58 AM, Gleb Natapov wrote:
> >>  >>
> >>  >>   Well, you just changed where srcu index is saved. I don't see how it
> >>  >>   could make a difference in practice.
> >>  >>
> >>  >If there is nested call to srcu read lock if srcu_idx is stored in vcpu
> >>  >nested call will override previous srcu_idx value and srcu unlock will
> >>  >not be called on it, but it will be called twice on new srcu_idx value.
> >>  >If srcu_idx is saved on stack this will not happen, no?
> >>
> >>  Exactly.  The case where srcu_idx is passed as a pointer parameter
> >>  is still dubious, but we can change that too.
> >>
> >But shouldn't we disallow recursive srcu lock tacking?
> 
> With different srcu_idx, nested (or overlapping) srcu is legal.

Right. If vcpu_enter_guest gets calles under a nested srcu call
we'll still get a deadlock, however.

> -- 
> error compiling committee.c: too many arguments to function

      reply	other threads:[~2010-10-26  9:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-24 17:16 [PATCH] kvm: get rid of srcu idx Michael S. Tsirkin
2010-10-25 13:52 ` Marcelo Tosatti
2010-10-25 13:20   ` Michael S. Tsirkin
2010-10-25 20:13     ` Marcelo Tosatti
2010-10-26  6:58       ` Gleb Natapov
2010-10-26  7:57         ` Avi Kivity
2010-10-26  8:01           ` Gleb Natapov
2010-10-26  8:06             ` Avi Kivity
2010-10-26  8:53               ` Michael S. Tsirkin [this message]

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=20101026085339.GB23530@redhat.com \
    --to=mst@redhat.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox