public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Keith Owens <kaos@ocs.com.au>
Cc: Andi Kleen <ak@suse.de>, Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: i386 IPI handlers running with hardirq_count == 0
Date: Thu, 29 Jun 2006 22:17:52 +0200	[thread overview]
Message-ID: <20060629201752.GA25300@elte.hu> (raw)
In-Reply-To: <9914.1151600442@ocs3.ocs.com.au>


* Keith Owens <kaos@ocs.com.au> wrote:

> My question has nothing to do with NMI.  I am querying inconsistent 
> behaviour amongst normal IPIs, this list :-
> 
> i386 function                   irq_enter?
> smp_apic_timer_interrupt           yes
> smp_call_function_interrupt        yes
> smp_error_interrupt                yes
> smp_invalidate_interrupt           no - why
> smp_reschedule_interrupt           no (does not need it)
> smp_spurious_interrupt             yes
> smp_thermal_interrupt              yes
> 
> x86_64 function                 irq_enter?
> mce_threshold_interrupt            yes
> smp_apic_timer_interrupt           yes
> smp_call_function_interrupt        yes
> smp_error_interrupt                yes
> smp_invalidate_interrupt           no - why
> smp_reschedule_interrupt           no (does not need it)
> smp_spurious_interrupt             yes
> smp_thermal_interrupt              yes

irq_enter() is mostly just for the purpose of in_interrupt()/in_irq() to 
work as expected, not much else. [also the timer code assumes that 
update_process_times() is called in a HARDIRQ_OFFSET elevated context, 
so the apic timer IRQ needs irq_enter() too.] The 
smp_invalidate_interrupt() and smp_reschedule_interrupt() is 
performance-critical and they dont need irq_enter()/irq_exit().

Since smp_call_function_interrupt() can be called with driver-supplied 
function vectors, it's best to keep the irq_enter()/exit there. [for 
example mm/slab.c has some in_interrupt() sanity checks.] Obviously 
do_IRQ() itself needs irq_enter()/exit() too - plus the APIC timer irq 
as mentioned above.
 
Otherwise, the rest of the SMP functions technically dont need 
irq_enter()/irq_exit(). [i.e. threshold, error, spurious and thermal] We 
could remove it from them.

	Ingo

  reply	other threads:[~2006-06-29 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29  9:01 i386 IPI handlers running with hardirq_count == 0 Keith Owens
2006-06-29  9:18 ` Andrew Morton
2006-06-29 11:25   ` Andi Kleen
2006-06-29 17:00     ` Keith Owens
2006-06-29 20:17       ` Ingo Molnar [this message]
2006-06-29 20:47         ` Andrew Morton
2006-06-29 20:43           ` Ingo Molnar
2006-06-29 16:40   ` Keith Owens

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=20060629201752.GA25300@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.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