1. 16 1月, 2009 1 次提交
  2. 15 1月, 2009 4 次提交
    • P
      sched: fix update_min_vruntime · e17036da
      Peter Zijlstra 提交于
      Impact: fix SCHED_IDLE latency problems
      
      OK, so we have 1 running task A (which is obviously curr and the tree is
      equally obviously empty).
      
      'A' nicely chugs along, doing its thing, carrying min_vruntime along as it
      goes.
      
      Then some whacko speed freak SCHED_IDLE task gets inserted due to SMP
      balancing, which is very likely far right, in that case
      
      update_curr
        update_min_vruntime
          cfs_rq->rb_leftmost := true (the crazy task sitting in a tree)
            vruntime = se->vruntime
      
      and voila, min_vruntime is waaay right of where it ought to be.
      
      OK, so why did I write it like that to begin with...
      
      Aah, yes.
      
      Say we've just dequeued current
      
      schedule
        deactivate_task(prev)
          dequeue_entity
            update_min_vruntime
      
      Then we'll set
      
        vruntime = cfs_rq->min_vruntime;
      
      we find !cfs_rq->curr, but do find someone in the tree. Then we _must_
      do vruntime = se->vruntime, because
      
       vruntime = min_vruntime(vruntime := cfs_rq->min_vruntime, se->vruntime)
      
      will not advance vruntime, and cause lags the other way around (which we
      fixed with that initial patch: 1af5f730
      (sched: more accurate min_vruntime accounting).
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Tested-by: NMike Galbraith <efault@gmx.de>
      Acked-by: NMike Galbraith <efault@gmx.de>
      Cc: <stable@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e17036da
    • P
      sched: SCHED_OTHER vs SCHED_IDLE isolation · 6bc912b7
      Peter Zijlstra 提交于
      Stronger SCHED_IDLE isolation:
      
       - no SCHED_IDLE buddies
       - never let SCHED_IDLE preempt on wakeup
       - always preempt SCHED_IDLE on wakeup
       - limit SLEEPER fairness for SCHED_IDLE.
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6bc912b7
    • P
      sched: SCHED_IDLE weight change · cce7ade8
      Peter Zijlstra 提交于
      Increase the SCHED_IDLE weight from 2 to 3, this gives much more stable
      vruntime numbers.
      
      time advanced in 100ms:
      
       weight=2
      
       64765.988352
       67012.881408
       88501.412352
      
       weight=3
      
       35496.181411
       34130.971298
       35497.411573
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cce7ade8
    • P
      sched: fix bandwidth validation for UID grouping · 98a4826b
      Peter Zijlstra 提交于
      Impact: make rt-limit tunables work again
      
      Mark Glines reported:
      
      > I've got an issue on x86-64 where I can't configure the system to allow
      > RT tasks for a non-root user.
      >
      > In 2.6.26.5, I was able to do the following to set things up nicely:
      > echo 450000 >/sys/kernel/uids/0/cpu_rt_runtime
      > echo 450000 >/sys/kernel/uids/1000/cpu_rt_runtime
      >
      > Seems like every value I try to echo into the /sys files returns EINVAL.
      
      For UID grouping we initialize the root group with infinite bandwidth
      which by default is actually more than the global limit, therefore the
      bandwidth check always fails.
      
      Because the root group is a phantom group (for UID grouping) we cannot
      runtime adjust it, therefore we let it reflect the global bandwidth
      settings.
      Reported-by: NMark Glines <mark@glines.org>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      98a4826b
  3. 12 1月, 2009 1 次提交
  4. 11 1月, 2009 8 次提交
  5. 10 1月, 2009 26 次提交