From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <JBeulich@suse.com>,
Anthony PERARD <anthony.perard@citrix.com>
Cc: Xen Devel <xen-devel@lists.xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH V2] xen: Fix BUFIOREQ evtchn init for a stubdom.
Date: Fri, 29 Jun 2012 12:04:50 +0100 [thread overview]
Message-ID: <CC134A62.372A3%keir.xen@gmail.com> (raw)
In-Reply-To: <4FED9EB7020000780008CCF5@nat28.tlf.novell.com>
On 29/06/2012 11:25, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> + {
>>>> + spin_lock(&iorp->lock);
>>>> + rc = hvm_replace_event_channel(v, a.value,
>>>> +
>>>> (int*)&v->domain->arch.hvm_domain.params[HVM_PARAM_BUFIOREQ_EVTCHN]);
>>>> + spin_unlock(&iorp->lock);
>>>> + if ( rc )
>>>> + break;
>>>> }
>>>
>>> My first preference would be for this to be moved out of the
>>> loop. If it has to remain in the loop for some reason, then the
>>> next best option would be to move this into the iorp->lock
>>> protected region immediately below.
>>
>> Agree on moving it out of the loop. But why would you want it protected by
>> iorp->lock?
>
> That's a question to Anthony - I just saw that the same lock is
> being used here and a few lines down.
Ah, I see. It is not necessary to take the lock in the above code fragment.
-- Keir
> Jan
>
prev parent reply other threads:[~2012-06-29 11:04 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-26 15:21 [PATCH V2] xen: Fix BUFIOREQ evtchn init for a stubdom Anthony PERARD
2012-06-29 8:26 ` Ian Campbell
2012-06-29 10:12 ` Keir Fraser
2012-06-29 8:50 ` Jan Beulich
2012-06-29 10:10 ` Keir Fraser
2012-06-29 10:14 ` Ian Campbell
2012-06-29 10:37 ` Keir Fraser
2012-06-29 10:45 ` Ian Campbell
2012-06-29 10:25 ` Jan Beulich
2012-06-29 11:04 ` Keir Fraser [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=CC134A62.372A3%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=JBeulich@suse.com \
--cc=anthony.perard@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/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).