public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* report a bug about sched_rt
@ 2009-07-24 10:57 sen wang
  2009-07-24 12:14 ` Peter Zijlstra
  2009-07-24 14:28 ` Arjan van de Ven
  0 siblings, 2 replies; 37+ messages in thread
From: sen wang @ 2009-07-24 10:57 UTC (permalink / raw)
  To: mingo, akpm, kernel, npiggin, arjan, linux-arm-kernel,
	linux-kernel

I find something is wrong about sched_rt.

 when I am debugging my system with rt_bandwidth_enabled, there is a
running realtime FIFO task in the sched_rt running queue and
 the fair running queue is empty.  I found the idle task will be
scheduled up when the running task still lie in the  sched_rt running
queue!

this will happen when rt runqueue passed it's rt_bandwidth_enabled
runtime,then the scheduler choose the idle task instead of realtime
FIFO task.

the reason lie in: when scheduler try to pick up a realtime FIFO task,
it will check if rt_throttled is enabled,
if so, it'll return and try fair queue but it is empty, then it come
to the sched_idle class.

I don't think it reasonable, we should give the realtime FIFO task the
chance, even when rt runqueue passed it's runtime.
because it is cpu's free time.

To fix it ,and keep rt_bandwidth works as before, I think
pick_next_task_rt() is the best space,

the pick_next_task_rt should check another condiction: rq->cfs.nr_running.

So,I modify pick_next_task_rt() like this and debug it on my omap3430
zoom2 board, it works!


static struct task_struct *pick_next_task_rt(struct rq *rq)
{
	struct sched_rt_entity *rt_se;
	struct task_struct *p;
	struct rt_rq *rt_rq;

  ...

	if (rt_rq_throttled(rt_rq)&& rq->cfs.nr_running)
		return NULL;

  ...
}

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2009-07-27 13:35 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24 10:57 report a bug about sched_rt sen wang
2009-07-24 12:14 ` Peter Zijlstra
2009-07-24 13:04   ` sen wang
2009-07-24 13:14     ` Peter Zijlstra
2009-07-24 13:26       ` sen wang
2009-07-24 13:33         ` Peter Zijlstra
2009-07-24 13:44           ` sen wang
2009-07-24 13:54             ` Peter Zijlstra
2009-07-24 14:04               ` sen wang
2009-07-24 14:48                 ` Peter Zijlstra
2009-07-24 14:53                   ` sen wang
2009-07-24 15:07                   ` sen wang
2009-07-24 15:24                     ` Peter Zijlstra
2009-07-24 15:43                       ` sen wang
2009-07-24 15:34                     ` Thomas Gleixner
2009-07-25 11:12                     ` Raistlin
2009-07-24 14:24               ` sen wang
2009-07-24 14:48                 ` Peter Zijlstra
2009-07-24 15:02                   ` sen wang
2009-07-24 15:40                   ` Jamie Lokier
2009-07-24 16:01                     ` Peter Zijlstra
2009-07-24 23:30                       ` Jamie Lokier
2009-07-25  5:22                         ` Bill Gatliff
2009-07-25 22:48                           ` Jamie Lokier
2009-07-26  2:44                             ` Bill Gatliff
2009-07-26 19:03                               ` Jamie Lokier
2009-07-27 10:45                                 ` Peter Zijlstra
2009-07-27 13:35                                 ` Bill Gatliff
2009-07-25 12:33                         ` Raistlin
2009-07-25 14:58                           ` Tommaso Cucinotta
2009-07-25 12:19                       ` Raistlin
2009-07-25 22:54                         ` Jamie Lokier
2009-07-25 23:24                           ` Tommaso Cucinotta
2009-07-25 11:10         ` Raistlin
     [not found]           ` <454c71700907250429i1c77658bt6d65b02f08a29f4a@mail.gmail.com>
2009-07-25 23:01             ` Jamie Lokier
2009-07-24 14:28 ` Arjan van de Ven
2009-07-26  3:55   ` sen wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox