1. 02 3月, 2007 2 次提交
  2. 13 2月, 2007 2 次提交
    • Z
      [PATCH] i386: paravirt CPU hypercall batching mode · 9226d125
      Zachary Amsden 提交于
      The VMI ROM has a mode where hypercalls can be queued and batched.  This turns
      out to be a significant win during context switch, but must be done at a
      specific point before side effects to CPU state are visible to subsequent
      instructions.  This is similar to the MMU batching hooks already provided.
      The same hooks could be used by the Xen backend to implement a context switch
      multicall.
      
      To explain a bit more about lazy modes in the paravirt patches, basically, the
      idea is that only one of lazy CPU or MMU mode can be active at any given time.
       Lazy MMU mode is similar to this lazy CPU mode, and allows for batching of
      multiple PTE updates (say, inside a remap loop), but to avoid keeping some
      kind of state machine about when to flush cpu or mmu updates, we just allow
      one or the other to be active.  Although there is no real reason a more
      comprehensive scheme could not be implemented, there is also no demonstrated
      need for this extra complexity.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      9226d125
    • N
      [PATCH] sched: avoid div in rebalance_tick · ff91691b
      Nick Piggin 提交于
      Avoid expensive integer divide 3 times per CPU per tick.
      
      A userspace test of this loop went from 26ns, down to 19ns on a G5; and
      from 123ns down to 28ns on a P3.
      
      (Also avoid a variable bit shift, as suggested by Alan. The effect
      of this wasn't noticable on the CPUs I tested with).
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ff91691b
  3. 12 2月, 2007 2 次提交
  4. 12 1月, 2007 1 次提交
  5. 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
  6. 23 12月, 2006 2 次提交
  7. 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
  8. 14 12月, 2006 1 次提交
  9. 11 12月, 2006 16 次提交
  10. 08 12月, 2006 7 次提交
  11. 21 10月, 2006 1 次提交
  12. 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
  13. 03 10月, 2006 3 次提交