1. 31 3月, 2008 1 次提交
  2. 20 3月, 2008 2 次提交
  3. 13 3月, 2008 1 次提交
  4. 11 3月, 2008 2 次提交
    • J
      [POWERPC] spufs: fix rescheduling of non-runnable contexts · c368392a
      Jeremy Kerr 提交于
      At present, we can hit the BUG_ON in __spu_update_sched_info by reading
      the regs file of a context between two calls to spu_run. The
      spu_release_saved called by spufs_regs_read() is resulting in the (now
      non-runnable) context being placed back on the run queue, so the next
      call to spu_run ends up in the bug condition.
      
      This change uses the SPU_SCHED_SPU_RUN flag to only reschedule a context
      if it's still in spu_run().
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      c368392a
    • J
      [POWERPC] spufs: don't (ab)use SCHED_IDLE · ce7c191b
      Jeremy Kerr 提交于
      commit 4ef11014 introduced a usage of SCHED_IDLE to detect when
      a context is within spu_run.
      
      Instead of SCHED_IDLE (which has other meaning), add a flag to
      sched_flags to tell if a context should be running.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      ce7c191b
  5. 10 3月, 2008 1 次提交
  6. 07 3月, 2008 1 次提交
  7. 03 3月, 2008 10 次提交
  8. 29 2月, 2008 5 次提交
    • A
      [POWERPC] spufs: fix use time accounting on SPE-overcommit · 2a58aa33
      Andre Detsch 提交于
      The spu_runcntl_RW register is restored within spu_restore function.
      So, at the end of spu_bind_context, the SPU context is not just loaded,
      but running.
      
      This change corrects the state switch to account the time as USER.
      Signed-off-by: NAndre Detsch <adetsch@br.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      2a58aa33
    • A
      [POWERPC] spufs: serialize SLB invalidation against SLB loading · c92a1acb
      Arnd Bergmann 提交于
      There is a potential race between flushes of the entire SLB in the MFC
      and the point where new entries are being established. The problem is
      that we might put a ESID entry into the MFC SLB when the VSID entry has
      just been cleared by the global flush.
      
      This can be circumvented by holding the register_lock throughout both
      the flushing and the creation of SLB entries.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      c92a1acb
    • A
      [POWERPC] spufs: invalidate SLB translation before adding a new entry · cc4b7c18
      Arnd Bergmann 提交于
      When we replace an SLB entry in the MFC after using up all the available
      entries, there is a short window in which an incorrect entry is marked
      as valid.
      
      The problem is that the 'valid' bit is stored in the ESID, which is
      always written after the VSID. Overwriting the VSID first will make the
      original ESID entry point to the new VSID, which means that any
      concurrent DMA accessing the old ESID ends up being redirected to the
      new virtual address.  A few cycles later, we write the new ESID and
      everything is fine again.
      
      That race can be closed by writing a zero entry to the ESID first, which
      makes sure that the VSID is not accessed until we write the new ESID.
      
      Note that we don't actually need to invalidate the SLB entry using the
      invalidation register, which would also flush any ERAT entries for that
      segment, because the segment translation does not become invalid but is
      only removed from the SLB cache.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      cc4b7c18
    • A
      [POWERPC] spufs: synchronize IRQ when disabling · fae9ca79
      Arnd Bergmann 提交于
      There is a small race between the context save procedure
      and the SPU interrupt handling, where we expect all interrupt
      processing to have finished after disabling them, while
      an interrupt is still being processed on another CPU.
      
      The obvious fix is to call synchronize_irq() after disabling
      the interrupts at the start of the context save procedure
      to make sure we never access the SPU any more during an
      ongoing save or even after that.
      
      Thanks to Benjamin Herrenschmidt for pointing this out.
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      fae9ca79
    • J
      [POWERPC] spufs: fix order of sputrace thread IDs · 71791bee
      Jeremy Kerr 提交于
      Currently, we get the following output from sputrace:
      
      [5.097935954] 1606: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
      [5.097958164] 1606: spufs_ps_nopfn__insert (thread = 1605, spu = 15)
      [5.097973529] 1607: spufs_ps_nopfn__enter (thread = 1605, spu = -1)
      [5.097989174] 1607: spufs_ps_nopfn__insert (thread = 1605, spu = 14)
      
      Which leads me to believe that 160[67] is the current thread ID, and
      1605 is the context backing the psmap.
      
      However, the 'current' and 'owner' tids are reversed - the 'current'
      tid is on the right. This change puts the current thread ID in the
      left-hand column instead, and renames the right to 'ctxthread'.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      71791bee
  9. 28 2月, 2008 1 次提交
    • J
      [POWERPC] spufs: fix invalid scheduling of forgotten contexts · 0111a701
      Jeremy Kerr 提交于
      At present, we have a situation where a context with no owner is
      re-scheduled by spu_forget:
      
      	Thread 1: reading regs file	Thread 2: context owner
      
      					spu_forget()
      						- ctx->owner = NULL
      						- set SPU_SCHED_WAS_ACTIVE
      
      	spu_acquire_saved()
      	- context is in saved state
      
      	spu_release_saved()
      	- SPU_SCHED_WAS_ACTIVE is set,
      	  so spu_activate() the context,
      	  which now has no owner
      
      In spu_forget(), we shouldn't be requesting a re-schedule by setting
      SPU_SCHED_WAS_ACTIVE. This change removes the set_bit in spu_forget(),
      so that spu_release_saved() doesn't reinsert this destroyed context on
      to the run queue.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      0111a701
  10. 27 2月, 2008 1 次提交
    • J
      [POWERPC] spufs: fix context destruction during psmap fault · d5883137
      Jeremy Kerr 提交于
      We have a small window where a spu context may be destroyed while
      we're servicing a page fault (from another thread) to the context's
      problem state mapping.
      
      After we up_read() the mmap_sem, it's possible that the context is
      destroyed by its owning thread, and so the later references to ctx
      are invalid. This can maifest as a deadlock on the (now free()-ed)
      context state mutex.
      
      This change adds a reference to the context before we release the
      mmap_sem, so that the context cannot be destroyed.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      d5883137
  11. 24 2月, 2008 1 次提交
  12. 22 2月, 2008 1 次提交
  13. 21 2月, 2008 1 次提交
  14. 20 2月, 2008 2 次提交
  15. 19 2月, 2008 1 次提交
    • J
      [POWERPC] spufs: fix scheduler starvation by idle contexts · 4ef11014
      Jeremy Kerr 提交于
      2.6.25 has a regression where we can starve the scheduler by creating
      (N_SPES+1) contexts, then running them one at a time.
      
      The final context will never be run, as the other contexts are loaded on
      the SPEs, none of which are repoted as free (ie, spu->alloc_state !=
      SPU_FREE), so spu_get_idle() doesn't give us a spu to run on. Because
      all of the contexts are stopped, none are descheduled by the scheduler
      tick, as spusched_tick returns if spu_stopped(ctx).
      
      This change replaces the spu_stopped() check with checking for SCHED_IDLE
      in ctx->policy. We set a context's policy to SCHED_IDLE when we're not
      in spu_run(). We also favour SCHED_IDLE contexts when looking for contexts
      to unbind, but leave their timeslice intact for later resumption.
      
      This patch fixes the following test in the spufs-testsuite:
        tests/20-scheduler/02-yield-starvation
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      4ef11014
  16. 16 2月, 2008 1 次提交
  17. 15 2月, 2008 2 次提交
  18. 14 2月, 2008 4 次提交
    • G
      [POWERPC] Remove unused CONFIG_WANT_DEVICE_TREE · d4eac750
      Grant Likely 提交于
      CONFIG_DEVICE_TREE was the only user of CONFIG_WANT_DEVICE_TREE but
      it was removed in commit id 25431333
      (bootwrapper: Build multiple cuImages).
      
      This removes CONFIG_WANT_DEVICE_TREE from Kconfig and the defconfigs.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d4eac750
    • M
      [POWERPC] Cell RAS: Remove DEBUG, and add license and copyright · bdb226ba
      Michael Ellerman 提交于
      arch/powerpc/platforms/cell/ras.c still has DEBUG #defined, which is no
      longer necessary.  Disable it - this disables two pr_debugs().
      
      While we're there this file should have a copyright notice and license,
      so add both.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      bdb226ba
    • A
      [POWERPC] free_property() must not be __init · 16e543ff
      Adrian Bunk 提交于
      This fixes the following section mismatch:
      
      <--  snip  -->
      
      ...
      WARNING: vmlinux.o(.text+0x55648): Section mismatch in reference from the function .free_node() to the function .init.text:.free_property()
      ...
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Acked-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      16e543ff
    • M
      Linux Kernel Markers: support multiple probes · fb40bd78
      Mathieu Desnoyers 提交于
      RCU style multiple probes support for the Linux Kernel Markers.  Common case
      (one probe) is still fast and does not require dynamic allocation or a
      supplementary pointer dereference on the fast path.
      
      - Move preempt disable from the marker site to the callback.
      
      Since we now have an internal callback, move the preempt disable/enable to the
      callback instead of the marker site.
      
      Since the callback change is done asynchronously (passing from a handler that
      supports arguments to a handler that does not setup the arguments is no
      arguments are passed), we can safely update it even if it is outside the
      preempt disable section.
      
      - Move probe arm to probe connection. Now, a connected probe is automatically
        armed.
      
      Remove MARK_MAX_FORMAT_LEN, unused.
      
      This patch modifies the Linux Kernel Markers API : it removes the probe
      "arm/disarm" and changes the probe function prototype : it now expects a
      va_list * instead of a "...".
      
      If we want to have more than one probe connected to a marker at a given
      time (LTTng, or blktrace, ssytemtap) then we need this patch. Without it,
      connecting a second probe handler to a marker will fail.
      
      It allow us, for instance, to do interesting combinations :
      
      Do standard tracing with LTTng and, eventually, to compute statistics
      with SystemTAP, or to have a special trigger on an event that would call
      a systemtap script which would stop flight recorder tracing.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Mike Mason <mmlnx@us.ibm.com>
      Cc: Dipankar Sarma <dipankar@in.ibm.com>
      Cc: David Smith <dsmith@redhat.com>
      Cc: "Paul E. McKenney" <paulmck@us.ibm.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fb40bd78
  19. 09 2月, 2008 2 次提交