From: Andrew Morton <akpm@osdl.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: kaos@ocs.com.au, ak@suse.de, linux-kernel@vger.kernel.org
Subject: Re: i386 IPI handlers running with hardirq_count == 0
Date: Thu, 29 Jun 2006 13:47:31 -0700 [thread overview]
Message-ID: <20060629134731.518120b8.akpm@osdl.org> (raw)
In-Reply-To: <20060629201752.GA25300@elte.hu>
Ingo Molnar <mingo@elte.hu> wrote:
>
>
> * 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.
>
There's a risk that spin_unlock() in an IPI handler could blow up due to it
trying to reschedule. But preempt_schedule() explicitly checks the CPU's
interupt flag so as long as that doesn't change we're OK.
next prev parent reply other threads:[~2006-06-29 20:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-29 9:01 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
2006-06-29 20:47 ` Andrew Morton [this message]
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=20060629134731.518120b8.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@suse.de \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®