====== re-cell-oprofile-spu-profiling-updated-patch-4.diff ====== Subject: Add support to OProfile for profiling Cell BE SPUs From: Maynard Johnson This patch updates the existing arch/powerpc/oprofile/op_model_cell.c to add in the SPU profiling capabilities. In addition, a 'cell' subdirectory was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code. Signed-off-by: Carl Love Signed-off-by: Maynard Johnson Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/configs/cell_defconfig | 3 arch/powerpc/kernel/time.c | 1 arch/powerpc/oprofile/Kconfig | 7 arch/powerpc/oprofile/Makefile | 4 arch/powerpc/oprofile/cell/pr_util.h | 90 + arch/powerpc/oprofile/cell/spu_profiler.c | 220 +++ arch/powerpc/oprofile/cell/spu_task_sync.c | 464 +++++++ arch/powerpc/oprofile/cell/vma_map.c | 279 ++++ arch/powerpc/oprofile/common.c | 51 arch/powerpc/oprofile/op_model_cell.c | 603 ++++++++-- arch/powerpc/oprofile/op_model_power4.c | 11 arch/powerpc/oprofile/op_model_rs64.c | 10 arch/powerpc/platforms/cell/spufs/context.c | 20 arch/powerpc/platforms/cell/spufs/sched.c | 4 arch/powerpc/platforms/cell/spufs/spufs.h | 4 drivers/oprofile/buffer_sync.c | 3 drivers/oprofile/event_buffer.h | 20 drivers/oprofile/oprof.c | 26 include/asm-powerpc/oprofile_impl.h | 10 include/asm-powerpc/spu.h | 15 include/linux/dcookies.h | 1 include/linux/elf-em.h | 3 include/linux/oprofile.h | 35 23 files changed, 1760 insertions(+), 124 deletions(-) ====== re-add-support-to-oprofile-for-profiling-cell-be-spus-update-2.diff ====== Subject: Enable SPU switch notification to detect currently active SPU tasks. From: Maynard Johnson This patch adds to the capability of spu_switch_event_register so that the caller is also notified of currently active SPU tasks. It also exports spu_switch_event_register and spu_switch_event_unregister. Signed-off-by: Maynard Johnson Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: run.c | 16 ++++++++++++++-- sched.c | 30 ++++++++++++++++++++++++++++-- spufs.h | 2 ++ 3 files changed, 44 insertions(+), 4 deletions(-) ====== oprofile-fix-parameter-types-in-function-defs.diff ====== Subject: OProfile: fix parameter types in function defs From: Bob Nelson A 64-bit unsigned long parameter is being demoted to 32-bit unsigned int as it is being passed along by several functions and eventually being promoted back to unsigned long in the CBE module spu_task_sync.c. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: spu_task_sync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ====== spusched-kthread.diff ====== Subject: spu sched: switch from workqueues to kthread + timer tick From: Christoph Hellwig Get rid of the scheduler workqueues that complicated things a lot to a dedicated spu scheduler thread that gets woken by a traditional scheduler tick. By default this scheduler tick runs a HZ * 10, aka one spu scheduler tick for every 10 cpu ticks. Currently the tick is not disabled when we have less context than available spus, but I will implement this later. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 4 - run.c | 6 - sched.c | 142 +++++++++++++++++++++++------------------- spufs.h | 10 +- 4 files changed, 87 insertions(+), 75 deletions(-) ====== spusched-dynamic-timeslicing.diff ====== Subject: spu sched: dynamic timeslicing for SCHED_OTHER From: Christoph Hellwig Enable preemptive scheduling for non-RT contexts. We use the same algorithms as the CPU scheduler to calculate the time slice length, and for now we also use the same timeslice length as the CPU scheduler. This might be not enough for good performance and can be changed after some benchmarking. Note that currently we do not boost the priority for contexts waiting on the runqueue for a long time, so contexts with a higher nice value could starve ones with less priority. This could easily be fixed once the rework of the spu lists that Luke and I discussed is done. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 15 +++++++++-- sched.c | 54 +++++++++++++++++++++++++++++++++++------- spufs.h | 4 --- 3 files changed, 58 insertions(+), 15 deletions(-) ====== spusched-update-policy.diff ====== Subject: spufs: update scheduling paramters on every spu_run From: Christoph Hellwig Update scheduling information on every spu_run to allow for setting threads to realtime priority just before running them. This requires some slightly ugly code in spufs_run_spu because we can just update the information unlocked if the spu is not runnable, but we need to acquire the active_mutex when it is runnable to protect against find_victim. This locking scheme requires opencoding spu_acquire_runnable in spufs_run_spu which actually is a nice cleanup all by itself. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 11 ----------- run.c | 19 ++++++++++++++++--- sched.c | 27 +++++++++++++++++++++++++++ spufs.h | 2 ++ 4 files changed, 45 insertions(+), 14 deletions(-) ====== spusched-fix-cpubind.diff ====== Subject: spu sched: fix cpu/node binding From: Christoph Hellwig Add a cpus_allowed allowed filed to struct spu_context so that we always use the cpu mask of the owning thread instead of the one happening to call into the scheduler. Also use this information in grab_runnable_context to avoid spurious wakeups. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 2 - sched.c | 70 +++++++++++++++++++++++++++++------------- spufs.h | 2 + 3 files changed, 52 insertions(+), 22 deletions(-) ====== cell-be_info-2.diff ====== Subject: cell: add per BE structure with info about its SPUs From: Andre Detsch Addition of a spufs-global "cbe_info" array. Each entry contains information about one Cell/B.E. node, namelly: * list of spus (both free and busy spus are in this list); * list of free spus (replacing the static spu_list from spu_base.c) * number of spus; * number of reserved (non scheduleable) spus. SPE affinity implementation actually requires only access to one spu per BE node (since it implements its own pointer to walk through the other spus of the ring) and the number of scheduleable spus (n_spus - non_sched_spus) However having this more general structure can be useful for other functionalities, concentrating per-cbe statistics / data. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 21 ++++++---- arch/powerpc/platforms/cell/spufs/sched.c | 4 + include/asm-powerpc/spu.h | 10 ++++ 3 files changed, 28 insertions(+), 7 deletions(-) ====== cell-spu_indexing-2.diff ====== Subject: cell: add vicinity information on spus From: Andre Detsch This patch adds affinity data to each spu instance. A doubly linked list is created, meant to connect the spus in the physical order they are placed in the BE. SPUs near to memory should be marked as having memory affinity. Adjustments of the fields acording to FW properties is done in separate patches, one for CPBW, one for Malta (patch for Malta under testing). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 2 ++ include/asm-powerpc/spu.h | 3 +++ 2 files changed, 5 insertions(+) ====== cell-spu_indexing_QS20-2.diff ====== Subject: cell: add hardcoded spu vicinity information for QS20 From: Andre Detsch This patch allows the use of spu affinity on QS20, whose original FW does not provide affinity information. This is done through two hardcoded arrays, and by reading the reg property from each spu. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 55 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) ====== spufs-affinity_create-4.diff ====== Subject: spufs: extension of spu_create to support affinity definition From: Andre Detsch This patch adds support for additional flags at spu_create, which relate to the establishment of affinity between contexts and contexts to memory. A fourth, optional, parameter is supported. This parameter represent a affinity neighbor of the context being created, and is used when defining SPU-SPU affinity. Affinity is represented as a doubly linked list of spu_contexts. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_syscalls.c | 17 + arch/powerpc/platforms/cell/spufs/context.c | 1 arch/powerpc/platforms/cell/spufs/gang.c | 4 arch/powerpc/platforms/cell/spufs/inode.c | 132 +++++++++- arch/powerpc/platforms/cell/spufs/spufs.h | 16 + arch/powerpc/platforms/cell/spufs/syscalls.c | 32 ++ include/asm-powerpc/spu.h | 8 include/linux/syscalls.h | 2 8 files changed, 195 insertions(+), 17 deletions(-) ====== spufs-affinity_placement-4.diff ====== Subject: cell: add placement computation for scheduling of affinity contexts From: Andre Detsch This patch provides the spu affinity placement logic for the spufs scheduler. Each time a gang is going to be scheduled, the placement of a reference context is defined. The placement of all other contexts with affinity from the gang is defined based on this reference context location and on a precomputed displacement offset. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: gang.c | 4 - sched.c | 142 ++++++++++++++++++++++++++++++++++++++++++++ spufs.h | 6 + 3 files changed, 151 insertions(+), 1 deletion(-) ====== spufs-affinity_schedulling-2.diff ====== Subject: spufs: integration of SPE affinity with the scheduller From: Andre Detsch This patch makes the scheduller honor affinity information for each context being scheduled. If the context has no affinity information, behaviour is unchanged. If there are affinity information, context is schedulled to be run on the exact spu recommended by the affinity placement algorithm. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 19 +++++++++++++++++++ spufs/sched.c | 4 ++++ 2 files changed, 23 insertions(+) ====== cell-spu_indexing_FW_vicinity-1.diff ====== Subject: cell: indexing of SPUs based on firmware vicinity properties From: Andre Detsch This patch links spus according to their physical position using information provided by the firmware through a special vicinity device-tree property. This property is present in current version of Malta firmware. Example of vicinity properties for a node in Malta: Node: Vicinity property contains phandles of: spe@0 [ spe@100000 , mic-tm@50a000 ] spe@100000 [ spe@0 , spe@200000 ] spe@200000 [ spe@100000 , spe@300000 ] spe@300000 [ spe@200000 , bif0@512000 ] spe@80000 [ spe@180000 , mic-tm@50a000 ] spe@180000 [ spe@80000 , spe@280000 ] spe@280000 [ spe@180000 , spe@380000 ] spe@380000 [ spe@280000 , bif0@512000 ] Only spe@* have a vicinity property (e.g., bif0@512000 and mic-tm@50a000 do not have it). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 90 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) ====== spu_base-locking-cleanup.diff ====== Subject: spu_base: locking cleanup From: Christoph Hellwig Sort out the locking mess in spu_base and document the current rules. As an added benefit spu_alloc* and spu_free don't block anymore. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 84 ++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 33 deletions(-) ====== axon-ram-6.diff ====== Subject: cell: updated driver for DDR2 memory on AXON From: Maxim Shchetynin Signed-off-by: Maxim Shchetynin Signed-off-by: Arnd Bergmann --- diffstat: platforms/Kconfig | 10 sysdev/Makefile | 1 sysdev/axonram.c | 385 ++++++++++++++++++++++++++++++++++ 3 files changed, 396 insertions(+) ====== spufs-remove-spufs_dir_inode_operations.diff ====== Subject: spufs: Remove spufs_dir_inode_operations From: Jeremy Kerr spufs_dir_inode_operations is exactly the same as simple_dir_inode_operations. Use that instead. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/inode.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) --- diffstat: inode.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) ====== spufs-add-support-for-spu-single-stepping.diff ====== Subject: spufs: Add support for SPU single stepping From: Benjamin Herrenschmidt This patch adds support for SPU single stepping. The single step bit is set in the SPU when the current process is being single-stepped via ptrace. The spu then stops and returns with a specific flag set and the syscall exit code will generate the SIGTRAP. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- --- arch/powerpc/platforms/cell/spufs/run.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- diffstat: run.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ====== spufs-add-a-capabilities-file-to-spu-contexts.diff ====== Subject: spufs: Add a "capabilities" file to spu contexts From: Benjamin Herrenschmidt This adds a "capabilities" file to spu contexts consisting of a list of space separated capability names. The current exposed capabilities are "sched" (the context is scheduleable) and "step" (the context supports single stepping). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- --- arch/powerpc/platforms/cell/spufs/file.c | 32 +++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) --- diffstat: file.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) ====== cell-spus-info-kexec-crash-1.diff ====== Subject: cell: saving spus information for kexec crash From: Andre Detsch This patch adds support for investigating spus information after a kernel crash event, through kdump vmcore file. Implementation is based on xmon code, but the new functionality was kept independent from xmon. Signed-off-by: Lucio Jose Herculano Correia Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/kernel/crash.c | 67 +++++++++++++ arch/powerpc/platforms/cell/spu_base.c | 3 include/asm-powerpc/spu.h | 4 3 files changed, 74 insertions(+) ====== spufs-dont-deactivate-nosched-contexts.diff ====== Subject: spufs: catch nosched contexts in spu_deactivate From: Christoph Hellwig spu_deactivate should never be called for nosched contets. Put in a check so we can print a stacktrace and exit early in case it happes errornously. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 9 +++++++++ 1 file changed, 9 insertions(+) ====== spusched-no-tick-for-nosched-contexts.diff ====== Subject: spusched: no preemption for nosched contexts From: Christoph Hellwig And last but not least we need to make sure the scheduler tick never preempts a nosched context. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ====== cbe_cpufreq-split-code-and-fixes.diff ====== Subject: cbe_cpufreq: reorganize code and fix some bugs From: Christian Krafft This patch reorganizes the code of the driver into three files. Two cbe_cpufreq_pmi.c and cbe_cpufreq_pervasive.c care about hardware. cbe_cpufreq.c contains the logic. Tuning the frequency using the PMI device has been commented out, as there is no hardware working yet. However, using PMI the board management controller is able to limit the frequency in situations as power failure. The PMI code is marked as experimental until it has been tested much more. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: Kconfig | 10 + Makefile | 4 cbe_cpufreq.c | 204 +++------------------------- cbe_cpufreq.h | 24 +++ cbe_cpufreq_pervasive.c | 121 ++++++++++++++++ cbe_cpufreq_pmi.c | 128 +++++++++++++++++ 6 files changed, 309 insertions(+), 182 deletions(-) ====== spu-loadavg.diff ====== Subject: spufs: implement /proc/spu_loadavg From: Christoph Hellwig Provide load averange information for spu context. The format is identical to /proc/loadavg, which is also where a lot of code and concepts is borrowed from. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 7 ++ sched.c | 127 +++++++++++++++++++++++++++++++++++++++--- spufs.h | 1 3 files changed, 127 insertions(+), 8 deletions(-) ====== spufs-tid-file.diff ====== Subject: adds tid file to spufs From: Christoph Hellwig The new tid file contains the ID of the thread currently running the context, if any. This is used so that the new spu-top and spu-ps tools can find the thread in /proc. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: file.c | 23 +++++++++++++++++++++++ sched.c | 7 +++++++ spufs.h | 3 +++ 3 files changed, 33 insertions(+) ====== spufs-stats-file.diff ====== Subject: add stat file to spufs From: Christoph Hellwig Export per-context statistics in spufs. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 3 arch/powerpc/platforms/cell/spufs/context.c | 2 arch/powerpc/platforms/cell/spufs/fault.c | 19 ++ arch/powerpc/platforms/cell/spufs/file.c | 79 ++++++++++ arch/powerpc/platforms/cell/spufs/run.c | 4 arch/powerpc/platforms/cell/spufs/sched.c | 19 ++ arch/powerpc/platforms/cell/spufs/spufs.h | 51 ++++++ include/asm-powerpc/spu.h | 6 8 files changed, 178 insertions(+), 5 deletions(-) ====== spu-stats-in-sysfs.diff ====== Subject: add spu stats in sysfs From: Christoph Hellwig Export spu statistics in sysfs. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 44 ++++++++++ arch/powerpc/platforms/cell/spufs/fault.c | 10 ++ arch/powerpc/platforms/cell/spufs/run.c | 5 - arch/powerpc/platforms/cell/spufs/sched.c | 10 ++ arch/powerpc/platforms/cell/spufs/spufs.h | 13 ++ include/asm-powerpc/spu.h | 17 +++ 6 files changed, 97 insertions(+), 2 deletions(-)