xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Bruce Edge <bruce.edge@gmail.com>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: Xen-devel <xen-devel@lists.xensource.com>,
	Jan Beulich <JBeulich@novell.com>
Subject: Re: domU and dom0 hung with Xen console interrupt binding showing in-flight=1, (---M)
Date: Thu, 19 Aug 2010 06:42:36 -0700	[thread overview]
Message-ID: <AANLkTimr-qgpwRw80hyJLJvzhLi7rbQuXV=6eODNTaSf@mail.gmail.com> (raw)
In-Reply-To: <C8916927.1E3CC%keir.fraser@eu.citrix.com>


[-- Attachment #1.1: Type: text/plain, Size: 2101 bytes --]

-Bruce


On Wed, Aug 18, 2010 at 2:40 AM, Keir Fraser <keir.fraser@eu.citrix.com>wrote:

> On 18/08/2010 09:47, "Jan Beulich" <JBeulich@novell.com> wrote:
>
> > Yes, that was what I was trying to hint at, but I wasn't sure whether
> > calling ->end() here has any unintended side effects and/or requires
> > any extra care (like preventing a subsequent guest initiated EOI to
> > call ->end() again).
>
> Oh you can't naively call ->end() from the time-out handler. You would need
> to do something like this in irq_guest_eoi_timer_fn:
>  spin_lock(&desc->lock);
>  if ( (desc->status & IRQ_GUEST) &&
>      (action->ack_type == ACKTYPE_EOI) ) {
>    cpu_eoi_map = action->cpu_eoi_map;
>    spin_unlock(&desc->lock);
>    on_selected_cpus(&cpu_eoi_map, set_eoi_ready, desc, 0);
>    spin_lock(&desc->lock);
>  }
>  _irq_guest_eoi(desc);
>  spin_unlock(&desc->lock);
>
> I don't think the IRQ_GUEST_EOI_PENDING flag or any of that stuff is needed
> for the ACKTYPE_EOI case. I'd make the handling of that, calling of
> ->disable/->enable and so on, dependent on ACKTYPE_NONE.
>
> > While looking at this I came across another thing I don't understand:
> > __pirq_guest_eoi(), for the ACKTYPE_EOI case, calls __set_eoi_ready()
> > in a cpu_test_and_clear() conditional, but __set_eoi_ready() bails
> > out if it finds !cpu_test_and_clear() on the same bitmap - what's the
> > point of calling __set_eoi_ready() here then (or what am I missing)?
>
> __pirq_guest_eoi() acts on a private on-stack copy of cpu_eoi_map. This is
> because on_selected_cpus() cannot be called with desc->lock held. But as
> soon as desc->lock is released, the desc->action structure can be freed by
> another CPU, so it would be invalid to reference action->cpu_eoi_map
> directly after desc->lock is released.
>
>  -- Keir
>
>
> Is there any more information that I can provide that would be helpful in
diagnosing the direct cause and the appropriate fix?
Possibly adding instrumentation or trace code to detect the trigger
conditions?
This is very repeatable on our target systems after a few hours of load.

Thanks

-Bruce

[-- Attachment #1.2: Type: text/html, Size: 2832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2010-08-19 13:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 18:22 domU and dom0 hung with Xen console interrupt binding showing in-flight=1, (---M) Dante Cinco
2010-06-29  8:42 ` Jan Beulich
2010-08-17 17:28   ` Bruce Edge
2010-08-17 18:01     ` Keir Fraser
2010-08-18  8:47       ` Jan Beulich
2010-08-18  9:40         ` Keir Fraser
2010-08-19 13:42           ` Bruce Edge [this message]
2010-08-19 15:48             ` Keir Fraser
2010-08-20 23:25               ` Bruce Edge
2010-08-21  6:02                 ` 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='AANLkTimr-qgpwRw80hyJLJvzhLi7rbQuXV=6eODNTaSf@mail.gmail.com' \
    --to=bruce.edge@gmail.com \
    --cc=JBeulich@novell.com \
    --cc=keir.fraser@eu.citrix.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).