linux_dsm_epyc7002/arch/arm
Gilad Ben-Yossef 3fc498f165 smp: introduce a generic on_each_cpu_mask() function
We have lots of infrastructure in place to partition multi-core systems
such that we have a group of CPUs that are dedicated to specific task:
cgroups, scheduler and interrupt affinity, and cpuisol= boot parameter.
Still, kernel code will at times interrupt all CPUs in the system via IPIs
for various needs.  These IPIs are useful and cannot be avoided
altogether, but in certain cases it is possible to interrupt only specific
CPUs that have useful work to do and not the entire system.

This patch set, inspired by discussions with Peter Zijlstra and Frederic
Weisbecker when testing the nohz task patch set, is a first stab at trying
to explore doing this by locating the places where such global IPI calls
are being made and turning the global IPI into an IPI for a specific group
of CPUs.  The purpose of the patch set is to get feedback if this is the
right way to go for dealing with this issue and indeed, if the issue is
even worth dealing with at all.  Based on the feedback from this patch set
I plan to offer further patches that address similar issue in other code
paths.

This patch creates an on_each_cpu_mask() and on_each_cpu_cond()
infrastructure API (the former derived from existing arch specific
versions in Tile and Arm) and uses them to turn several global IPI
invocation to per CPU group invocations.

Core kernel:

on_each_cpu_mask() calls a function on processors specified by cpumask,
which may or may not include the local processor.

You must not call this function with disabled interrupts or from a
hardware interrupt handler or from a bottom half handler.

arch/arm:

Note that the generic version is a little different then the Arm one:

1. It has the mask as first parameter
2. It calls the function on the calling CPU with interrupts disabled,
   but this should be OK since the function is called on the other CPUs
   with interrupts disabled anyway.

arch/tile:

The API is the same as the tile private one, but the generic version
also calls the function on the with interrupts disabled in UP case

This is OK since the function is called on the other CPUs
with interrupts disabled.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Sasha Levin <levinsasha928@gmail.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Avi Kivity <avi@redhat.com>
Acked-by: Michal Nazarewicz <mina86@mina86.org>
Cc: Kosaki Motohiro <kosaki.motohiro@gmail.com>
Cc: Milton Miller <miltonm@bga.com>
Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-28 17:14:35 -07:00
..
boot ARM: device tree work 2012-03-27 16:47:35 -07:00
common Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
configs ARM: driver specific updates 2012-03-27 16:41:24 -07:00
include/asm Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
kernel smp: introduce a generic on_each_cpu_mask() function 2012-03-28 17:14:35 -07:00
lib ARM: 7301/1: Rename the T() macro to TUSER() to avoid namespace conflicts 2012-01-25 11:07:40 +00:00
mach-at91 ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-bcmring Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-clps711x Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-cns3xxx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-davinci ARM: global cleanups 2012-03-27 16:03:32 -07:00
mach-dove Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ebsa110 Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-ep93xx Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/boards 2012-03-27 15:18:19 -07:00
mach-exynos ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-footbridge Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-gemini Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-h720x Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-highbank ARM: SoC specific updates 2012-03-27 16:14:44 -07:00
mach-imx ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-integrator Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-iop13xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-iop32x Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-iop33x Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-ixp4xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ixp23xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ixp2000 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-kirkwood ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-ks8695 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-l7200/include/mach
mach-lpc32xx ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-mmp ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-msm ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-mv78xx0 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-mxs ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-netx Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-nomadik Merge branch 'tegra/cleanups' into next/timer 2012-03-21 14:27:34 +00:00
mach-omap1 ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-omap2 ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-orion5x Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-picoxcell Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-pnx4008 Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-prima2 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-pxa Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-realview ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-rpc Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-s3c24xx ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-s3c64xx ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-s3c2410 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s3c2412 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s3c2440 Merge branch 'next/fixes-non-critical' into next/drivers 2012-03-20 22:42:24 +00:00
mach-s5p64x0 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s5pc100 Merge branch 'next/cleanup-use-static' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup 2012-03-07 14:45:28 -08:00
mach-s5pv210 ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-sa1100 Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-shark Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-shmobile ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-spear3xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-spear6xx Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-tegra ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-u300 Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into next/drivers 2012-03-24 11:29:58 +00:00
mach-ux500 ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-versatile Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-vexpress ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-vt8500 Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-w90x900 Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mach-zynq Merge branch 'entry-macro-cleanup' of git://sources.calxeda.com/kernel/linux into for-armsoc 2012-02-22 22:04:41 +00:00
mm Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-03-23 14:02:12 -07:00
nwfpe
oprofile oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue 2011-12-23 11:58:34 +01:00
plat-iop arm/PCI: get rid of device resource fixups 2012-02-23 20:19:01 -07:00
plat-mxc ARM: device tree work 2012-03-27 16:47:35 -07:00
plat-nomadik ARM: plat-nomadik: modernize MTU timer 2012-01-31 00:18:26 +01:00
plat-omap ARM: device tree work 2012-03-27 16:47:35 -07:00
plat-orion ARM: orion: Fix USB phy for orion5x. 2012-02-09 16:16:35 -08:00
plat-pxa
plat-s3c24xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
plat-s5p Merge branch 'samsung/cleanup-exynos-clock' into next/soc 2012-03-20 10:07:48 +00:00
plat-samsung ARM: driver specific updates 2012-03-27 16:41:24 -07:00
plat-spear Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
plat-versatile ARM: plat-versatile: convert to twd_local_timer_register() interface 2012-03-13 13:29:58 +00:00
tools ARM: Update mach-types 2011-12-23 22:58:10 +00:00
vfp
Kconfig Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
Kconfig-nommu
Kconfig.debug Merge branch 'imx/driver' of git://git.linaro.org/people/shawnguo/linux-2.6 into next/drivers 2012-02-28 12:23:27 +00:00
Makefile Merge branch 'topic/cleanup-s3c24xx' into next/cleanup-s3c24xx 2012-03-07 01:36:33 -08:00