From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Marek Marczykowski <marmarek@invisiblethingslab.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: High CPU temp, suspend problem - xen 4.1.5-pre, linux 3.7.x
Date: Thu, 28 Mar 2013 11:53:20 +0000 [thread overview]
Message-ID: <51542F30.9030709@citrix.com> (raw)
In-Reply-To: <51542E8602000078000C9329@nat28.tlf.novell.com>
On 28/03/2013 10:50, Jan Beulich wrote:
>>>> On 27.03.13 at 17:27, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> On 27/03/2013 15:51, Marek Marczykowski wrote:
>>> On 27.03.2013 15:49, Marek Marczykowski wrote:
>>>> On 27.03.2013 15:46, Andrew Cooper wrote:
>>>>> As for locating the cause of the legacy vectors, it might be a good idea
>>>>> to stick a printk at the top of do_IRQ() which indicates an interrupt
>>>>> with vector between 0xe0 and 0xef. This might at least indicate whether
>>>>> legacy vectors are genuinely being delivered, or whether we have some
>>>>> memory corruption causing these effects.
>>>> Ok, will try something like this.
>>> Nothing interesting here...
>>> Only vector 0xf1 for irq 4 and 0xf0 for irq 0 (which match irq dump
>> information).
>> Even in the case where we hit the original assertion?
>>
>> If so, then all I can thing is that the move_pending flag for that
>> specific GSI has been corrupted in memory somehow.
> No, I think the flag is legitimately set after resume, and gets
> looked at the after the first SCI got signaled (which would
> trigger the pending affinity change to be carried out that was
> initiated in the suspend path). The problem is a more
> fundamental one: irq_move_cleanup_interrupt() (in unstable
> terms) includes the legacy vectors, so if, upon encountering the
> move_cleanup_count for IRQ 9 (or any legacy IRQ) execution
> doesn't make it all the way through to carrying out the cleanup,
> the loop, once in the legacy vector range, will re-encounter the
> same IRQ, find move_cleanup_count non-zero again, and thus
> tries to do something here.
>
> Hence I think skipping the legacy vector range here is indeed
> necessary, even outside the suspend/resume scenario (see
> below). Another alternative would be to invalidate the
> vector_irq[] entries for legacy vectors handled through the
> IO-APIC.
>
> Jan
>
> x86: irq_move_cleanup_interrupt() must ignore legacy vectors
>
> Since the main loop in the function includes legacy vectors, and since
> vector_irq[] gets set up for legacy vectors regardless of whether those
> get handled through the IO-APIC, it must not do anything on this vector
> range. In fact, we should never get here for IRQs not handled through
> the IO-APIC, so add a respective warning at once (could probably as
> well be an ASSERT()).
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Under what circumstances would we have any vectors 0xe0-0xef programmed
into the IOAPIC? I cant think of any offhand.
As far as I am aware, it is not valid for any PIC interrupts to ever be
up for moving, as they should only be delivered to the BSP.
In addition to the check you have, the scope of the loop should probably
be reduced. We should never be considering to move any vector larger
than LAST_HIPRIORITY_VECTOR, which I believe are all LAPIC interrupts,
making 8 useless iterations of the loop. I would also suggest that it
is an ASSERT rather than a WARN, but that leaves us not fixing the bug
at hand, as we have already verified that vector 0xe9 is not programmed
into the IOAPIC.
~Andrew
>
> --- a/xen/arch/x86/irq.c
> +++ b/xen/arch/x86/irq.c
> @@ -625,6 +625,12 @@ void irq_move_cleanup_interrupt(struct c
> if ((int)irq < 0)
> continue;
>
> + if ( vector >= FIRST_LEGACY_VECTOR && vector <= LAST_LEGACY_VECTOR )
> + {
> + WARN_ON(!IO_APIC_IRQ(irq));
> + continue;
> + }
> +
> desc = irq_to_desc(irq);
> if (!desc)
> continue;
>
>
next prev parent reply other threads:[~2013-03-28 11:53 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-13 20:50 High CPU temp, suspend problem - xen 4.1.5-pre, linux 3.7.x Marek Marczykowski
2013-03-15 3:00 ` Dario Faggioli
2013-03-15 3:22 ` Marek Marczykowski
2013-03-15 13:02 ` Konrad Rzeszutek Wilk
2013-03-22 15:34 ` Marek Marczykowski
2013-03-22 16:56 ` Konrad Rzeszutek Wilk
2013-03-25 11:36 ` Marek Marczykowski
2013-03-25 14:17 ` Konrad Rzeszutek Wilk
2013-03-25 14:56 ` Marek Marczykowski
2013-03-26 12:17 ` Marek Marczykowski
2013-03-26 13:11 ` Jan Beulich
2013-03-26 13:50 ` Marek Marczykowski
2013-03-26 15:47 ` Andrew Cooper
2013-03-26 16:12 ` Andrew Cooper
2013-03-26 16:47 ` Marek Marczykowski
2013-03-26 16:03 ` Jan Beulich
2013-03-26 16:45 ` Marek Marczykowski
2013-03-26 17:02 ` Andrew Cooper
2013-03-26 17:42 ` Marek Marczykowski
2013-03-26 17:54 ` Andrew Cooper
2013-03-26 18:21 ` Marek Marczykowski
2013-03-26 18:50 ` Andrew Cooper
2013-03-27 8:50 ` Marek Marczykowski
2013-03-27 8:58 ` Jan Beulich
2013-03-27 8:52 ` Jan Beulich
2013-03-27 9:03 ` Jan Beulich
2013-03-27 14:01 ` Marek Marczykowski
2013-03-27 14:31 ` Marek Marczykowski
2013-03-27 14:46 ` Andrew Cooper
2013-03-27 14:49 ` Marek Marczykowski
2013-03-27 15:51 ` Marek Marczykowski
2013-03-27 16:27 ` Andrew Cooper
2013-03-27 18:16 ` Marek Marczykowski
2013-03-27 18:56 ` Andrew Cooper
2013-03-28 14:43 ` Marek Marczykowski
2013-03-28 10:50 ` Jan Beulich
2013-03-28 11:53 ` Andrew Cooper [this message]
2013-03-28 12:54 ` Jan Beulich
2013-03-28 13:19 ` Jan Beulich
2013-03-27 14:52 ` Andrew Cooper
2013-03-27 15:47 ` Konrad Rzeszutek Wilk
2013-03-27 16:56 ` Andrew Cooper
2013-03-27 17:15 ` Marek Marczykowski
2013-03-28 17:41 ` Andrew Cooper
2013-03-28 17:44 ` Marek Marczykowski
2013-03-28 17:50 ` Andrew Cooper
2013-03-29 0:26 ` Marek Marczykowski
2013-03-28 16:13 ` Jan Beulich
2013-03-28 19:03 ` Marek Marczykowski
2013-04-01 13:53 ` Ben Guthro
2013-04-02 1:13 ` Marek Marczykowski
2013-04-02 14:05 ` Konrad Rzeszutek Wilk
2013-04-15 22:09 ` Marek Marczykowski
2013-04-15 23:36 ` Ben Guthro
2013-04-15 23:51 ` konrad wilk
2013-04-16 0:19 ` Ben Guthro
2013-04-16 0:46 ` Ben Guthro
2013-04-16 3:20 ` konrad wilk
2013-04-16 1:02 ` Marek Marczykowski
2013-04-16 8:47 ` Jan Beulich
2013-04-16 11:49 ` Ben Guthro
2013-04-16 11:57 ` Jan Beulich
2013-04-16 12:09 ` Ben Guthro
2013-04-16 12:51 ` Jan Beulich
2013-03-28 16:25 ` Jan Beulich
2013-03-28 16:31 ` Marek Marczykowski
2013-03-28 16:52 ` Jan Beulich
2013-03-28 17:09 ` Marek Marczykowski
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=51542F30.9030709@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=konrad.wilk@oracle.com \
--cc=marmarek@invisiblethingslab.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).