xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: John Weekes <lists.xen@nuclearfallout.net>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	George Dunlap <george.dunlap@citrix.com>
Subject: Re: [PATCH] Fix locking bug in vcpu_migrate
Date: Fri, 22 Apr 2011 19:43:24 +0100	[thread overview]
Message-ID: <C9D78ADC.16C2F%keir.xen@gmail.com> (raw)
In-Reply-To: <4DB1C7A3.80104@nuclearfallout.net>

On 22/04/2011 19:23, "John Weekes" <lists.xen@nuclearfallout.net> wrote:

> 
>> Nice that empirical evidence supports the patch, however, I'm being dense
>> and don't understand why order of lock release matters.
> 
> I was taught long ago to release them in order, but as I think about it,
> I agree with you that there doesn't seem to be a scenario when the
> release would matter.
> 
> It's odd that it seemed to lead to such a big difference for me, then.
> I'll do some further tests -- maybe I changed something else to cause
> the behavior, or the problem is more random than I thought and just
> hasn't occurred for me yet in all the new tests.

Thanks!

 -- Keir

>> perhaps you've merely perturbed a fragile pos code that's
>> broken in some other way.
> 
> That's entirely possible.
> 
>> Also the last hunk of your patch is broken -- in the final else clause you
>> call spin_unlock_irqrestore on the wrong lock. This is very definitely a
>> bug, as irqs should never be enabled while any schedule_lock is held.
> 
> Definitely. I had fixed that here but sent an old version of the patch
> -- a boneheaded mistake.
> 
> -John

  reply	other threads:[~2011-04-22 18:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 10:00 [PATCH] Fix locking bug in vcpu_migrate John Weekes
2011-04-22 10:30 ` Keir Fraser
2011-04-22 18:23   ` John Weekes
2011-04-22 18:43     ` Keir Fraser [this message]
2011-04-22 22:33       ` John Weekes
2011-04-23  7:01         ` Keir Fraser

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=C9D78ADC.16C2F%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=george.dunlap@citrix.com \
    --cc=lists.xen@nuclearfallout.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).