From: John Weekes <lists.xen@nuclearfallout.net>
To: Keir Fraser <keir.xen@gmail.com>
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 11:23:31 -0700 [thread overview]
Message-ID: <4DB1C7A3.80104@nuclearfallout.net> (raw)
In-Reply-To: <C9D71758.16C18%keir.xen@gmail.com>
> 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.
> 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
next prev parent reply other threads:[~2011-04-22 18:23 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 [this message]
2011-04-22 18:43 ` Keir Fraser
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=4DB1C7A3.80104@nuclearfallout.net \
--to=lists.xen@nuclearfallout.net \
--cc=george.dunlap@citrix.com \
--cc=keir.xen@gmail.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 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).