1. 09 1月, 2006 5 次提交
    • A
      [PATCH] spufs: Improved SPU preemptability [part 2]. · 2a911f0b
      Arnd Bergmann 提交于
      This patch reduces lock complexity of SPU scheduler, particularly
      for involuntary preemptive switches.  As a result the new code
      does a better job of mapping the highest priority tasks to SPUs.
      
      Lock complexity is reduced by using the system default workqueue
      to perform involuntary saves.  In this way we avoid nasty lock
      ordering problems that the previous code had.  A "minimum timeslice"
      for SPU contexts is also introduced.  The intent here is to avoid
      thrashing.
      
      While the new scheduler does a better job at prioritization it
      still does nothing for fairness.
      
      From: Mark Nutter <mnutter@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2a911f0b
    • A
      [PATCH] spufs: Improved SPU preemptability. · 5110459f
      Arnd Bergmann 提交于
      This patch makes it easier to preempt an SPU context by
      having the scheduler hold ctx->state_sema for much shorter
      periods of time.
      
      As part of this restructuring, the control logic for the "run"
      operation is moved from arch/ppc64/kernel/spu_base.c to
      fs/spufs/file.c.  Of course the base retains "bottom half"
      handlers for class{0,1} irqs.  The new run loop will re-acquire
      an SPU if preempted.
      
      From: Mark Nutter <mnutter@us.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5110459f
    • A
      [PATCH] spufs: cooperative scheduler support · 8b3d6663
      Arnd Bergmann 提交于
      This adds a scheduler for SPUs to make it possible to use
      more logical SPUs than physical ones are present in the
      system.
      
      Currently, there is no support for preempting a running
      SPU thread, they have to leave the SPU by either triggering
      an event on the SPU that causes it to return to the
      owning thread or by sending a signal to it.
      
      This patch also adds operations that enable accessing an SPU
      in either runnable or saved state. We use an RW semaphore
      to protect the state of the SPU from changing underneath
      us, while we are holding it readable. In order to change
      the state, it is acquired writeable and a context save
      or restore is executed before downgrading the semaphore
      to read-only.
      
      From: Mark Nutter <mnutter@us.ibm.com>,
            Uli Weigand <Ulrich.Weigand@de.ibm.com>
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b3d6663
    • M
      [PATCH] spufs: switchable spu contexts · 5473af04
      Mark Nutter 提交于
      Add some infrastructure for saving and restoring the context of an
      SPE. This patch creates a new structure that can hold the whole
      state of a physical SPE in memory. It also contains code that
      avoids races during the context switch and the binary code that
      is loaded to the SPU in order to access its registers.
      
      The actual PPE- and SPE-side context switch code are two separate
      patches.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5473af04
    • A
      [PATCH] spufs: The SPU file system, base · 67207b96
      Arnd Bergmann 提交于
      This is the current version of the spu file system, used
      for driving SPEs on the Cell Broadband Engine.
      
      This release is almost identical to the version for the
      2.6.14 kernel posted earlier, which is available as part
      of the Cell BE Linux distribution from
      http://www.bsc.es/projects/deepcomputing/linuxoncell/.
      
      The first patch provides all the interfaces for running
      spu application, but does not have any support for
      debugging SPU tasks or for scheduling. Both these
      functionalities are added in the subsequent patches.
      
      See Documentation/filesystems/spufs.txt on how to use
      spufs.
      Signed-off-by: NArnd Bergmann <arndb@de.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      67207b96