public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] Generic smp_call_function(), improvements, and smp_call_function_single()
@ 2008-03-19 11:56 Jens Axboe
  2008-03-19 11:56 ` [PATCH 1/5] Add generic helpers for arch IPI function calls Jens Axboe
                   ` (6 more replies)
  0 siblings, 7 replies; 25+ messages in thread
From: Jens Axboe @ 2008-03-19 11:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: npiggin, paulus, tglx, mingo, tony.luck

Hi,

While working on the IO CPU affinity bits, I had to convert some more
archs to support smp_call_function_single(). Nicks original patch
for x86-64 also included improvements for smp_call_function(), so
it isn't serialized by call_lock anymore (but still hits call_lock
on every call). I've made further improvements and changes upon that
while converting x86, going further and updating IA64 and PPC made me
realize that we have a lot of shared code for the same functionality.

So I came up with kernel/smp.c that basically just holds the new
and abstracted code for issuing smp_call_function() and
smp_call_function_single() along with the helpers and interrupt
handlers associated. Perhaps a better place would be lib/smp.c, I'm
open to suggestions.

Even with half of this being new functionality, the diffstat still looks
pretty nice:

 arch/ia64/kernel/smp.c                     |  171 ++---------
 arch/powerpc/kernel/smp.c                  |  223 +-------------
 arch/powerpc/platforms/cell/interrupt.c    |    1 
 arch/powerpc/platforms/ps3/smp.c           |    7 
 arch/powerpc/platforms/pseries/xics.c      |    6 
 arch/powerpc/sysdev/mpic.c                 |    2 
 arch/x86/kernel/entry_64.S                 |    3 
 arch/x86/kernel/i8259_64.c                 |    1 
 arch/x86/kernel/smp_32.c                   |  165 +++-------
 arch/x86/kernel/smp_64.c                   |  175 ++---------
 arch/x86/kernel/smpboot_32.c               |    4 
 arch/x86/kernel/smpcommon_32.c             |   34 --
 include/asm-powerpc/smp.h                  |    5 
 include/asm-x86/hw_irq_32.h                |    1 
 include/asm-x86/hw_irq_64.h                |    4 
 include/asm-x86/mach-default/entry_arch.h  |    1 
 include/asm-x86/mach-default/irq_vectors.h |    1 
 include/linux/smp.h                        |   30 +
 kernel/Makefile                            |    2 
 kernel/smp.c                               |  316 +++++++++++++++++++++
 20 files changed, 533 insertions(+), 619 deletions(-)

When/if more archs are converted, it'll of course look even better.
Comments? I've verified that this builts and boots on x86, x86-64
and powerpc. IA64 may still need a one-liner change, I don't have
access to that platform anymore so I can't verify that myself. It
does build, however :-)

The patch series is also available in the 'generic-ipi' branch from

git://git.kernel.dk/linux-2.6-block.git

and the 'io-cpu-affinity' branch is directly based on this.

-- 
Jens Axboe



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2008-03-27 12:35 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 11:56 [PATCH 0/5] Generic smp_call_function(), improvements, and smp_call_function_single() Jens Axboe
2008-03-19 11:56 ` [PATCH 1/5] Add generic helpers for arch IPI function calls Jens Axboe
2008-03-19 11:56 ` [PATCH 2/5] x86: convert to generic helpers for " Jens Axboe
2008-03-19 11:56 ` [PATCH 3/5] x86-64: " Jens Axboe
2008-03-19 11:56 ` [PATCH 4/5] powerpc: " Jens Axboe
2008-03-19 11:56 ` [PATCH 5/5] ia64: " Jens Axboe
2008-03-21  9:53 ` [PATCH 0/5] Generic smp_call_function(), improvements, and smp_call_function_single() Ingo Molnar
2008-03-21 13:15   ` Jens Axboe
2008-03-25  8:00     ` Nick Piggin
2008-03-27 10:08     ` Ingo Molnar
2008-03-27 10:37       ` Jens Axboe
2008-03-27 10:43         ` Ingo Molnar
2008-03-27 12:02           ` Jens Axboe
2008-03-27 12:32             ` Ingo Molnar
2008-03-27 12:35               ` Jens Axboe
2008-03-21 18:22 ` Luck, Tony
2008-03-21 18:31   ` Jens Axboe
2008-03-21 18:56     ` Luck, Tony
2008-03-22 12:29       ` Jens Axboe
2008-03-24 16:45         ` Luck, Tony
2008-03-24 20:28         ` Luck, Tony
2008-03-25  8:12           ` Jens Axboe
2008-03-25 16:48             ` Luck, Tony
2008-03-25 18:00               ` Jens Axboe
2008-03-21 20:04     ` Luck, Tony

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox