1. 12 2月, 2007 1 次提交
  2. 12 1月, 2007 1 次提交
  3. 31 12月, 2006 1 次提交
    • I
      [PATCH] sched: fix cond_resched_softirq() offset · 9414232f
      Ingo Molnar 提交于
      Remove the __resched_legal() check: it is conceptually broken.  The biggest
      problem it had is that it can mask buggy cond_resched() calls.  A
      cond_resched() call is only legal if we are not in an atomic context, with
      two narrow exceptions:
      
       - if the system is booting
       - a reacquire_kernel_lock() down() done while PREEMPT_ACTIVE is set
      
      But __resched_legal() hid this and just silently returned whenever
      these primitives were called from invalid contexts. (Same goes for
      cond_resched_locked() and cond_resched_softirq()).
      
      Furthermore, the __legal_resched(0) call was buggy in that it caused
      unnecessarily long softirq latencies via cond_resched_softirq().  (which is
      only called from softirq-off sections, hence the code did nothing.)
      
      The fix is to resurrect the efficiency of the might_sleep checks and to
      only allow the narrow exceptions.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9414232f
  4. 23 12月, 2006 2 次提交
  5. 21 12月, 2006 1 次提交
    • P
      [PATCH] sched: improve efficiency of sched_fork() · bc947631
      Peter Williams 提交于
      Problem:
        sched_fork() has always called scheduler_tick() in some (unlikely)
        circumstances in order to update the current task in light of those
        circumstances.  It has always been the case that the work done by
        scheduler_tick() was more than was required to handle the problem in
        hand but no harm was done except for the waste of a few CPU cycles.
      
        However, the splitting of scheduler_tick() into two procedures in
        2.6.20-rc1 enables the wasted cycles to be saved as the new procedure
        task_running_tick() does all the work that is required to rectify the
        problem being handled.
      
      Solution:
        Replace the call to scheduler_tick() in sched_fork() with a call to
        task_running_tick().
      Signed-off-by: NPeter Williams <pwil3058@bigpond.com.au>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bc947631
  6. 14 12月, 2006 1 次提交
  7. 11 12月, 2006 16 次提交
  8. 08 12月, 2006 7 次提交
  9. 21 10月, 2006 1 次提交
  10. 12 10月, 2006 1 次提交
    • N
      [PATCH] sched: likely profiling · beed33a8
      Nick Piggin 提交于
      This likely profiling is pretty fun. I found a few possible problems
      in sched.c.
      
      This patch may be not measurable, but when I did measure long ago,
      nooping (un)likely cost a couple of % on scheduler heavy benchmarks, so
      it all adds up.
      
      Tweak some branch hints:
      
      - the 2nd 64 bits in the bitmask is likely to be populated, because it
        contains the first 28 bits (nearly 3/4) of the normal priorities.
        (ratio of 669669:691 ~= 1000:1).
      
      - it isn't unlikely that context switching switches to another process. it
        might be very rapidly switching to and from the idle process (ratio of
        475815:419004 and 471330:423544). Let the branch predictor decide.
      
      - preempt_enable seems to be very often called in a nested preempt_disable
        or with interrupts disabled (ratio of 3567760:87965 ~= 40:1)
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Daniel Walker <dwalker@mvista.com>
      Cc: Hua Zhong <hzhong@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      beed33a8
  11. 03 10月, 2006 7 次提交
  12. 02 10月, 2006 1 次提交