From: Keir Fraser <keir@xen.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Haitao Shan <haitao.shan@intel.com>,
xiantao.zhang@intel.com
Subject: Re: [PATCH] x86/IRQ: fix create_irq() after c/s 24068:6928172f7ded
Date: Fri, 04 Nov 2011 16:34:10 +0000 [thread overview]
Message-ID: <CAD9C482.339F3%keir@xen.org> (raw)
In-Reply-To: <4EB40D3C020000780005F192@nat28.tlf.novell.com>
On 04/11/2011 15:05, "Jan Beulich" <JBeulich@suse.com> wrote:
>>>> On 04.11.11 at 15:41, Keir Fraser <keir@xen.org> wrote:
>> On 04/11/2011 11:52, "Jan Beulich" <JBeulich@suse.com> wrote:
>>
>>> init_one_irq_desc() must be called with interrupts enabled (as it may
>>> call functions from the xmalloc() group). Rather than mis-using
>>> vector_lock to also protect the finding of an unused IRQ, make this
>>> lockless through using cmpxchg(), and obtain the lock only around the
>>> actual assignment of the vector.
>>
>> Looks fine to me.
>>
>> Acked-by: Keir Fraser <keir@xen.org>
>>
>>> Also fold find_unassigned_irq() into its only caller.
>>>
>>> It is, btw, questionable whether create_irq() calling
>>> __assign_irq_vector() (rather than assign_irq_vector()) is actually
>>> correct - desc->affinity appears to not get initialized properly in
>>> this case.
>
> Any thought on this one? Adjusting this would have the nice side
> effect of the function no longer explicitly acquiring vector_lock.
I would agree it should call assign_irq_vector(). It was probably only
taking the lock itself, and thus using __assign_irq_vector(), to avoid the
irq it found in find_unassigned_irq() being stolen. That can't happen now
you reserve it via cmpxchg.
-- Keir
> Jan
>
prev parent reply other threads:[~2011-11-04 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 11:52 [PATCH] x86/IRQ: fix create_irq() after c/s 24068:6928172f7ded Jan Beulich
2011-11-04 13:01 ` Juergen Gross
2011-11-04 14:41 ` Keir Fraser
2011-11-04 15:05 ` Jan Beulich
2011-11-04 16:34 ` 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=CAD9C482.339F3%keir@xen.org \
--to=keir@xen.org \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=haitao.shan@intel.com \
--cc=xen-devel@lists.xensource.com \
--cc=xiantao.zhang@intel.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.