[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0804221157220.2779@woody.linux-foundation.org>
Date: Tue, 22 Apr 2008 12:03:04 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Jens Axboe <jens.axboe@...cle.com>
cc: linux-arch@...r.kernel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
npiggin@...e.de, peterz@...radead.org, sam@...nborg.org,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [PATCH 2/11] x86: convert to generic helpers for IPI function
calls
[ Ingo added to cc, since this is x86-specific ]
On Tue, 22 Apr 2008, Jens Axboe wrote:
> +++ b/arch/x86/kernel/apic_32.c
> @@ -1357,6 +1357,10 @@ void __init smp_intr_init(void)
>
> /* IPI for generic function call */
> set_intr_gate(CALL_FUNCTION_VECTOR, call_function_interrupt);
> +
> + /* IPI for single call function */
> + set_intr_gate(CALL_FUNCTION_SINGLE_VECTOR,
> + call_function_single_interrupt);
Ok, one more comment..
Why bother with separate vectors for this?
Why not just make the single vector do
void smp_call_function_interrupt(void)
{
ack_APIC_irq();
irq_enter();
generic_smp_call_function_single_interrupt();
generic_smp_call_function_interrupt();
#ifdef CONFIG_X86_32
__get_cpu_var(irq_stat).irq_call_count++;
#else
add_pda(irq_call_count, 1);
#endif
irq_exit();
}
since they are both doing the exact same thing anyway?
Do we really require us to be able to handle the "single" case _while_ a
"multiple" case is busy? Aren't we running all of these things with
interrupts disabled anyway, so that it cannot happen?
Or is it just a performance optimization? Do we expect to really have so
many of the multiple interrupts that it's expensive to walk the list just
because we also had a single interrupt to another CPU? That sounds a bit
unlikely, but if true, very interesting..
Inquiring minds want to know..
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists