All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: xen-devel@lists.xensource.com, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] x86/IO-APIC: refine EOI-ing of migrating level interrupts
Date: Fri, 18 Nov 2011 18:57:17 +0000	[thread overview]
Message-ID: <4EC6AA8D.5090607@citrix.com> (raw)
In-Reply-To: <4EC69D83.6010704@citrix.com>

On 18/11/11 18:01, Andrew Cooper wrote:
> On 18/11/11 08:31, Jan Beulich wrote:
>> Now that this is in, could you try (again on the offending system)
>> whether adding e.g. a WARN_ON(vector != desc->arch.old_vector)
>> prior to the just added call to eoi_IO_APIC_irq() (but inside the
>> surrounding if()) would ever trigger (obviously you'd want to make
>> sure that the code path actually gets executed at all - perhaps
>> counting and printing the count once in a while would be the easiest
>> thing to do)?
>>
>> If it does, we obviously need to stay with passing in vector. If not,
>> we'd need to do another round of code inspection to determine
>> whether indeed there's no race when relying on just the stored
>> data.
>>
>> Thanks, Jan
> So long as you also check for arch.old_vector != IRQ_UNASSIGNED_VECTOR,
> this appears to be fine.
>
> I will sort out a patch to change this behavior
>

Wait actually not.  It turns out that there is some race condition which
causes this assertion not to hold.  Over the space of 2 hours with
16guests and dom0 each trying to stress their storage over a line level
interrupt, there have been 5 cases where vector != old_vector.

I presume it is some race condition where the scheduler is attempting to
move IRQs between PCPUs while they are already in a half moved state.

I will attempt to work out what is causing this race condition, but I
have some more important bugs to deal with at the moment.

I guess we can do with the kudge involving having the lapic vector
passed into hw_irq_handler.end until the race condition is identified.

-- 
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com

      reply	other threads:[~2011-11-18 18:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 13:14 [PATCH] x86/IO-APIC: refine EOI-ing of migrating level interrupts Jan Beulich
2011-11-15 13:19 ` Andrew Cooper
2011-11-15 13:27   ` Jan Beulich
2011-11-15 13:35     ` Andrew Cooper
2011-11-15 13:43       ` Jan Beulich
2011-11-17 16:12 ` Andrew Cooper
2011-11-18  8:31   ` Jan Beulich
2011-11-18 18:01     ` Andrew Cooper
2011-11-18 18:57       ` Andrew Cooper [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=4EC6AA8D.5090607@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.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 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.