1. 20 8月, 2009 1 次提交
  2. 19 2月, 2009 1 次提交
    • I
      timers: add mod_timer_pending() · 74019224
      Ingo Molnar 提交于
      Impact: new timer API
      
      Based on an idea from Martin Josefsson with the help of
      Patrick McHardy and Stephen Hemminger:
      
      introduce the mod_timer_pending() API which is a mod_timer()
      offspring that is an invariant on already removed timers.
      
      (regular mod_timer() re-activates non-pending timers.)
      
      This is useful for the networking code in that it can
      allow unserialized mod_timer_pending() timer-forwarding
      calls, but a single del_timer*() will stop the timer
      from being reactivated again.
      
      Also while at it:
      
      - optimize the regular mod_timer() path some more, the
        timer-stat and a debug check was needlessly duplicated
        in __mod_timer().
      
      - make the exports come straight after the function, as
        most other exports in timer.c already did.
      
      - eliminate __mod_timer() as an external API, change the
        users to mod_timer().
      
      The regular mod_timer() code path is not impacted
      significantly, due to inlining optimizations and due to
      the simplifications.
      
      Based-on-patch-from: Stephen Hemminger <shemminger@vyatta.com>
      Acked-by: NStephen Hemminger <shemminger@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Patrick McHardy <kaber@trash.net>
      Cc: netdev@vger.kernel.org
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      74019224
  3. 26 12月, 2008 1 次提交
  4. 21 10月, 2008 2 次提交
  5. 08 9月, 2008 1 次提交
  6. 05 9月, 2008 2 次提交
    • J
      powerpc/spufs: Fix race for a free SPU · b65fe035
      Jeremy Kerr 提交于
      We currently have a race for a free SPE. With one thread doing a
      spu_yield(), and another doing a spu_activate():
      
      thread 1				thread 2
      spu_yield(oldctx)			spu_activate(ctx)
        __spu_deactivate(oldctx)
        spu_unschedule(oldctx, spu)
        spu->alloc_state = SPU_FREE
      					spu = spu_get_idle(ctx)
      					    - searches for a SPE in
      					      state SPU_FREE, gets
      					      the context just
      					      freed by thread 1
      					spu_schedule(ctx, spu)
      					  spu->alloc_state = SPU_USED
      spu_schedule(newctx, spu)
        - assumes spu is still free
        - tries to schedule context on
          already-used spu
      
      This change introduces a 'free_spu' flag to spu_unschedule, to indicate
      whether or not the function should free the spu after descheduling the
      context. We only set this flag if we're not going to re-schedule
      another context on this SPU.
      
      Add a comment to document this behaviour.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      b65fe035
    • J
      powerpc/spufs: Fix multiple get_spu_context() · 9f43e391
      Jeremy Kerr 提交于
      Commit 8d5636fb introduced a reference
      count on SPU contexts during find_victim, but this may cause a leak in
      the reference count if we later find a better contender for a context to
      unschedule.
      
      Change the reference to after we've found our victim context, so we
      don't do the extra get_spu_context().
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      9f43e391
  7. 19 8月, 2008 1 次提交
  8. 14 8月, 2008 1 次提交
  9. 24 7月, 2008 2 次提交
  10. 09 7月, 2008 2 次提交
  11. 16 6月, 2008 2 次提交
  12. 15 5月, 2008 1 次提交
  13. 08 5月, 2008 1 次提交
  14. 05 5月, 2008 1 次提交
    • L
      [POWERPC] spufs: try to route SPU interrupts to local node · 7a214200
      Luke Browning 提交于
      Currently, we re-route SPU interrupts to the current cpu, which may be
      on a remote node. In the case of time slicing, all spu interrupts will
      end up routed to the same cpu, where the spusched_tick occurs.
      
      This change routes mfc interrupts to the cpu where the controlling
      thread last ran, provided that cpu is on the same node as the spu
      (otherwise don't reroute interrupts).
      
      This should improve performance and provide a more predictable
      environment for processing spu exceptions. In the past we have seen
      concurrent delivery of spu exceptions to two cpus. This eliminates that
      concern.
      Signed-off-by: NLuke Browning <lukebr@linux.vnet.ibm.com>
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      7a214200
  15. 30 4月, 2008 2 次提交
  16. 29 4月, 2008 1 次提交
  17. 11 3月, 2008 1 次提交
  18. 29 2月, 2008 1 次提交
  19. 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
  20. 06 2月, 2008 1 次提交
  21. 02 1月, 2008 1 次提交
  22. 28 12月, 2007 1 次提交
  23. 21 12月, 2007 9 次提交
  24. 19 9月, 2007 2 次提交
  25. 03 8月, 2007 1 次提交