All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	ak@suse.de, linux-kernel@vger.kernel.org, nanhai.zou@intel.com,
	asit.k.mallick@intel.com, keith.packard@intel.com,
	Yinghai Lu <yhlu.kernel@gmail.com>
Subject: Re: [PATCH] x86_64 irq: check remote IRR bit before migrating level triggered irq (v3)
Date: Thu, 31 May 2007 13:00:08 -0700	[thread overview]
Message-ID: <20070531200008.GA17143@linux-os.sc.intel.com> (raw)
In-Reply-To: <m1hcpt3xvh.fsf_-_@ebiederm.dsl.xmission.com>

On Thu, May 31, 2007 at 07:50:58AM -0600, Eric W. Biederman wrote:
> 
> On x86_64 kernel, level triggered irq migration gets initiated in the context
> of that interrupt(after executing the irq handler) and following steps are
> followed to do the irq migration.
> 
> 1. mask IOAPIC RTE entry;     // write to IOAPIC RTE
> 2. EOI;                       // processor EOI write
> 3. reprogram IOAPIC RTE entry // write to IOAPIC RTE with new destination and
>                               // and interrupt vector due to per cpu vector
>                               // allocation.
> 4. unmask IOAPIC RTE entry;   // write to IOAPIC RTE
> 
> Because of the per cpu vector allocation in x86_64 kernels, when the irq
> migrates to a different cpu, new vector(corresponding to the new cpu) will
> get allocated.
> 
> An EOI write to local APIC has a side effect of generating an EOI write
> for level trigger interrupts (normally this is a broadcast to all IOAPICs).
> The EOI broadcast generated as a side effect of EOI write to processor may
> be delayed while the other IOAPIC writes (step 3 and 4) can go through.
> 
> Normally, the EOI generated by local APIC for level trigger interrupt
> contains vector number. The IOAPIC will take this vector number and
> search the IOAPIC RTE entries for an entry with matching vector number and
> clear the remote IRR bit (indicate EOI). However, if the vector number is
> changed (as in step 3) the IOAPIC will not find the RTE entry when the EOI
> is received later. This will cause the remote IRR to get stuck causing the
> interrupt hang (no more interrupt from this RTE).
> 
> Current x86_64 kernel assumes that remote IRR bit is cleared by the time
> IOAPIC RTE is reprogrammed. Fix this assumption by checking for remote IRR
> bit and if it still set, delay the irq migration to the next interrupt
> arrival event(hopefully, next time remote IRR bit will get cleared
> before the IOAPIC RTE is reprogrammed).
> 
> Initial analysis and patch from Nanhai.
> 
> Clean up patch from Suresh.
> 
> Rewritten to be less intrusive, and to contain a big fat comment by Eric.

Acked-by: Suresh Siddha <suresh.b.siddha@intel.com>

Thanks Eric.

      parent reply	other threads:[~2007-05-31 20:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 23:03 [patch] x86_64, irq: check remote IRR bit before migrating level triggered irq Siddha, Suresh B
2007-05-17 23:58 ` Eric W. Biederman
2007-05-18  0:43   ` Siddha, Suresh B
2007-05-18  0:30 ` Eric W. Biederman
2007-05-18  1:01   ` Siddha, Suresh B
2007-05-18 14:40     ` Eric W. Biederman
2007-05-18 17:30       ` Yinghai Lu
2007-05-18 18:01         ` Eric W. Biederman
2007-05-18 18:09           ` Yinghai Lu
2007-05-18 18:20             ` Eric W. Biederman
2007-05-18 18:07       ` Siddha, Suresh B
2007-05-18 18:28         ` Yinghai Lu
2007-05-18 18:39           ` Siddha, Suresh B
2007-05-18 19:02             ` Eric W. Biederman
2007-05-18 19:18               ` Siddha, Suresh B
2007-05-31  2:50         ` Eric W. Biederman
2007-05-18 12:00 ` Andi Kleen
2007-05-18 14:19   ` Eric W. Biederman
2007-05-31 11:34 ` [PATCH] x86_64 irq: check remote IRR bit before migrating level triggered irq (v2) Eric W. Biederman
2007-05-31 12:01   ` Andi Kleen
2007-05-31 13:29     ` Eric W. Biederman
2007-05-31 20:02       ` Siddha, Suresh B
2007-05-31 13:34   ` Ingo Molnar
2007-05-31 13:50     ` [PATCH] x86_64 irq: check remote IRR bit before migrating level triggered irq (v3) Eric W. Biederman
2007-05-31 13:54       ` Ingo Molnar
2007-05-31 20:00       ` Siddha, Suresh B [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=20070531200008.GA17143@linux-os.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=asit.k.mallick@intel.com \
    --cc=ebiederm@xmission.com \
    --cc=keith.packard@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nanhai.zou@intel.com \
    --cc=yhlu.kernel@gmail.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.