]> git.karo-electronics.de Git - mv-sheeva.git/commit
sched: Fix sched rt group scheduling when hierachy is enabled
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Thu, 3 Mar 2011 11:34:35 +0000 (17:04 +0530)
committerIngo Molnar <mingo@elte.hu>
Fri, 4 Mar 2011 10:03:18 +0000 (11:03 +0100)
commit0c3b9168017cbad2c4af3dd65ec93fe646eeaa62
tree98ae84f8060a62bc95ab3734b345fa87d0688a16
parentb65a0e0c84cf489bfa00d6aa6c48abc5a237100f
sched: Fix sched rt group scheduling when hierachy is enabled

The current sched rt code is broken when it comes to hierarchical
scheduling, this patch fixes two problems

1. It adds redundant enqueuing (harmless) when it finds a queue
   has tasks enqueued, but it has no run time and it is not
   throttled.

2. The most important change is in sched_rt_rq_enqueue/dequeue.
   The code just picks the rt_rq belonging to the current cpu
   on which the period timer runs, the patch fixes it, so that
   the correct rt_se is enqueued/dequeued.

Tested with a simple hierarchy

/c/d, c and d assigned similar runtimes of 50,000 and a while
1 loop runs within "d". Both c and d get throttled, without
the patch, the task just stops running and never runs (depends
on where the sched_rt b/w timer runs). With the patch, the
task is throttled and runs as expected.

[ bharata, suggestions on how to pick the rt_se belong to the
  rt_rq and correct cpu ]

Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Acked-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: stable@kernel.org
LKML-Reference: <20110303113435.GA2868@balbir.in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_rt.c