1. 15 10月, 2007 34 次提交
  2. 10 10月, 2007 1 次提交
  3. 20 9月, 2007 2 次提交
    • H
      sched: fix invalid sched_class use · 9c95e731
      Hiroshi Shimamoto 提交于
      When using rt_mutex, a NULL pointer dereference is occurred at
      enqueue_task_rt. Here is a scenario;
      1) there are two threads, the thread A is fair_sched_class and
         thread B is rt_sched_class.
      2) Thread A is boosted up to rt_sched_class, because the thread A
         has a rt_mutex lock and the thread B is waiting the lock.
      3) At this time, when thread A create a new thread C, the thread
         C has a rt_sched_class.
      4) When doing wake_up_new_task() for the thread C, the priority
         of the thread C is out of the RT priority range, because the
         normal priority of thread A is not the RT priority. It makes
         data corruption by overflowing the rt_prio_array.
      The new thread C should be fair_sched_class.
      
      The new thread should be valid scheduler class before queuing.
      This patch fixes to set the suitable scheduler class.
      Signed-off-by: NHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      9c95e731
    • I
      sched: add /proc/sys/kernel/sched_compat_yield · 1799e35d
      Ingo Molnar 提交于
      add /proc/sys/kernel/sched_compat_yield to make sys_sched_yield()
      more agressive, by moving the yielding task to the last position
      in the rbtree.
      
      with sched_compat_yield=0:
      
         PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
        2539 mingo     20   0  1576  252  204 R   50  0.0   0:02.03 loop_yield
        2541 mingo     20   0  1576  244  196 R   50  0.0   0:02.05 loop
      
      with sched_compat_yield=1:
      
         PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
        2584 mingo     20   0  1576  248  196 R   99  0.0   0:52.45 loop
        2582 mingo     20   0  1576  256  204 R    0  0.0   0:00.00 loop_yield
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      1799e35d
  4. 05 9月, 2007 3 次提交