lkml.org 
[lkml]   [2008]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/8] x86: add support for remotely triggering the block softirq
On Thu, Feb 07 2008, Ingo Molnar wrote:
>
> * Jens Axboe <jens.axboe@oracle.com> wrote:
>
> > Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
> > ---
> > arch/x86/kernel/smp_32.c | 15 +++++++++++++++
> > arch/x86/kernel/smpboot_32.c | 3 +++
> > include/asm-x86/hw_irq_32.h | 1 +
> > include/asm-x86/mach-default/entry_arch.h | 1 +
> > include/asm-x86/mach-default/irq_vectors.h | 1 +
> > 5 files changed, 21 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/x86/kernel/smp_32.c b/arch/x86/kernel/smp_32.c
> > index dc0cde9..668b8a4 100644
> > --- a/arch/x86/kernel/smp_32.c
> > +++ b/arch/x86/kernel/smp_32.c
> > @@ -672,6 +672,21 @@ void smp_call_function_interrupt(struct pt_regs *regs)
> > }
> > }
> >
> > +fastcall void smp_raise_block_softirq(struct pt_regs *regs)
>
> small detail: there's no fastcall used in arch/x86 anymore.

Yeah, andrew already complained about that, fixed up.

> > +{
> > + unsigned long flags;
> > +
> > + ack_APIC_irq();
> > + local_irq_save(flags);
> > + raise_softirq_irqoff(BLOCK_SOFTIRQ);
> > + local_irq_restore(flags);
> > +}
>
> if then this should be a general facility to trigger any softirq - not
> just the block one.

Oh yeah, definitely agree, I wrote that in the intro as well. The
interface is horrible, not meant to go anywhere, just serve for testing.

> > #define CALL_FUNCTION_VECTOR 0xfb
> > +#define BLOCK_SOFTIRQ_VECTOR 0xfa
>
> this wastes another irq vector and is very special-purpose. Why not make
> the smp_call_function() one more scalable instead?

That's definitely a possibility, Nick had something like that. I just
didn't like having to allocate a cookie object to store the function and
data.

> on the more conceptual level, shouldnt we just move to threads instead
> of softirqs? That way you can become affine to any CPU and can do
> cross-CPU wakeups anytime - which will be nice and fast via the
> smp_reschedule_interrupt() facility.

That would indeed be nicer and not require any arch changes. I was
afraid it would be more costly than massaging the softirqs a bit though,
perhaps that is unfounded.

--
Jens Axboe



\
 
 \ /
  Last update: 2008-02-07 11:21    [W:0.063 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site