All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Martin Wilck <martin.wilck@fujitsu-siemens.com>
Cc: Haren Myneni <hbabu@us.ibm.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Chip Coldwell <coldwell@redhat.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: PATCH/RFC: [kdump] fix APIC shutdown sequence
Date: Thu, 9 Aug 2007 15:41:28 +0530	[thread overview]
Message-ID: <20070809101128.GA14738@in.ibm.com> (raw)
In-Reply-To: <46BA0844.9080703@fujitsu-siemens.com>

On Wed, Aug 08, 2007 at 08:15:32PM +0200, Martin Wilck wrote:
> Vivek Goyal wrote:
> 
> > But the issue here seems to be that LAPIC state got clear but IRR bit
> > at IOAPIC bit is not cleared because IOAPIC vector information was deleted
> > in first kernel and now upon receiving EOI, it does not know this EOI belongs
> > to which vector.
> 
> I am making another experiment right now. I check the LAPIC ISR flags in
> machine_crash_shutdown() before disabling the LAPIC, trying to send EOI if
> I find one ISR bit set. So far, I haven't seen a single case where an ISR bit
> was set, but several (9) where the IO-APIC IRR bit was set. OTOH, I know that if
> I'd re-enable IRQs, IRQ 225 would be raised. The whole thing is done before
> disable_IO_APIC().
> 
> Don't ask me for an explanation why I don't see the ISR bits.
> 

Did you also check IRR bits on LAPIC. May be some interrupt is already
being served and your new interrupts has been queued on LAPIC and IRR bit
on LAPIC is set?

Following is the text from intel system programming manual.

The IRR contains the active interrupt requests that have been accepted, but
not yet dispatched to the processor for servicing. When the local APIC accepts
an interrupt, it sets the bit in the IRR that corresponds the vector of the
accepted interrupt. When the processor core is ready to handle the next
interrupt, the local APIC clears the highest priority IRR bit that is set and
sets the corresponding ISR bit. The vector for the highest priority bit set in
the ISR is then dispatched to the processor core for servicing.

In this case, I suspect that your interrupt gets queued at LAPIC (IRR is set)
but it does not make into ISR (may be because interrupts are disabled and
some other vector is already being served. Can you please paste your LAPIC
and IOAPIC state here.

Thanks
Vivek

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@in.ibm.com>
To: Martin Wilck <martin.wilck@fujitsu-siemens.com>
Cc: Chip Coldwell <coldwell@redhat.com>,
	Haren Myneni <hbabu@us.ibm.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: PATCH/RFC: [kdump] fix APIC shutdown sequence
Date: Thu, 9 Aug 2007 15:41:28 +0530	[thread overview]
Message-ID: <20070809101128.GA14738@in.ibm.com> (raw)
In-Reply-To: <46BA0844.9080703@fujitsu-siemens.com>

On Wed, Aug 08, 2007 at 08:15:32PM +0200, Martin Wilck wrote:
> Vivek Goyal wrote:
> 
> > But the issue here seems to be that LAPIC state got clear but IRR bit
> > at IOAPIC bit is not cleared because IOAPIC vector information was deleted
> > in first kernel and now upon receiving EOI, it does not know this EOI belongs
> > to which vector.
> 
> I am making another experiment right now. I check the LAPIC ISR flags in
> machine_crash_shutdown() before disabling the LAPIC, trying to send EOI if
> I find one ISR bit set. So far, I haven't seen a single case where an ISR bit
> was set, but several (9) where the IO-APIC IRR bit was set. OTOH, I know that if
> I'd re-enable IRQs, IRQ 225 would be raised. The whole thing is done before
> disable_IO_APIC().
> 
> Don't ask me for an explanation why I don't see the ISR bits.
> 

Did you also check IRR bits on LAPIC. May be some interrupt is already
being served and your new interrupts has been queued on LAPIC and IRR bit
on LAPIC is set?

Following is the text from intel system programming manual.

The IRR contains the active interrupt requests that have been accepted, but
not yet dispatched to the processor for servicing. When the local APIC accepts
an interrupt, it sets the bit in the IRR that corresponds the vector of the
accepted interrupt. When the processor core is ready to handle the next
interrupt, the local APIC clears the highest priority IRR bit that is set and
sets the corresponding ISR bit. The vector for the highest priority bit set in
the ISR is then dispatched to the processor core for servicing.

In this case, I suspect that your interrupt gets queued at LAPIC (IRR is set)
but it does not make into ISR (may be because interrupts are disabled and
some other vector is already being served. Can you please paste your LAPIC
and IOAPIC state here.

Thanks
Vivek

  reply	other threads:[~2007-08-09 10:13 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-06 15:08 PATCH/RFC: [kdump] fix APIC shutdown sequence Martin Wilck
2007-08-06 15:08 ` Martin Wilck
2007-08-07 14:29 ` Vivek Goyal
2007-08-07 14:29   ` Vivek Goyal
2007-08-07 17:41   ` Martin Wilck
2007-08-07 17:41     ` Martin Wilck
2007-08-08  1:04     ` Eric W. Biederman
2007-08-08  1:04       ` Eric W. Biederman
2007-08-08  9:03       ` Martin Wilck
2007-08-08  9:03         ` Martin Wilck
2007-08-08  9:33         ` Vivek Goyal
2007-08-08  9:33           ` Vivek Goyal
2007-08-08 12:04           ` Martin Wilck
2007-08-08 12:04             ` Martin Wilck
2007-08-08 15:21         ` Eric W. Biederman
2007-08-08 15:21           ` Eric W. Biederman
2007-08-08 17:35           ` Martin Wilck
2007-08-08 17:35             ` Martin Wilck
2007-08-08 17:56             ` Eric W. Biederman
2007-08-08 17:56               ` Eric W. Biederman
2007-08-08 18:22               ` Martin Wilck
2007-08-08 18:22                 ` Martin Wilck
2007-08-08 18:38               ` Martin Wilck
2007-08-08 18:38                 ` Martin Wilck
2007-08-08 10:36     ` Vivek Goyal
2007-08-08 10:36       ` Vivek Goyal
2007-08-08 14:06       ` Chip Coldwell
2007-08-08 14:06         ` Chip Coldwell
2007-08-08 14:42         ` Vivek Goyal
2007-08-08 14:42           ` Vivek Goyal
2007-08-08 18:15           ` Martin Wilck
2007-08-08 18:15             ` Martin Wilck
2007-08-09 10:11             ` Vivek Goyal [this message]
2007-08-09 10:11               ` Vivek Goyal
2007-08-09 17:35               ` Martin Wilck
2007-08-09 17:35                 ` Martin Wilck
2007-08-07 19:44   ` Chip Coldwell
2007-08-07 19:44     ` Chip Coldwell
2007-08-08  0:29 ` Andrew Morton
2007-08-08  0:29   ` Andrew Morton
2007-08-08  8:32   ` Martin Wilck
2007-08-08  8:32     ` Martin Wilck
2007-08-08 11:38 ` Vivek Goyal
2007-08-08 11:38   ` Vivek Goyal
2007-08-08 18:07   ` Martin Wilck
2007-08-08 18:07     ` Martin Wilck
2007-08-08 21:25     ` Eric W. Biederman
2007-08-08 21:25       ` Eric W. Biederman

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=20070809101128.GA14738@in.ibm.com \
    --to=vgoyal@in.ibm.com \
    --cc=coldwell@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=hbabu@us.ibm.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.wilck@fujitsu-siemens.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.