Re: report a bug about sched_rt

From: sen wang
Date: Sat Jul 25 2009 - 23:56:08 EST


2009/7/24 Arjan van de Ven <arjan@xxxxxxxxxxxxx>
>
> On Fri, 24 Jul 2009 18:57:35 +0800
> sen wang <wangsen.linux@xxxxxxxxx> wrote:
>
> > 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.
>
>
> sounds like a good power limiting feature...
>
>

what I want to say is:
If we give cpu to rt task at that situation,the normal fair task still
have chance to get cpu in the left 50ms.(say the throttle is 950
ms).because in the left 50ms,throttle is still enabled, every
tick,the rt schedule will check the normal fair task.if find some
one,rt will yield cpu to
the new coming noraml fair task.

for realtime system there is stll normal fair task, so the bandwidth
is useful,we cann't just
turn it off simply.

I think the usespace schedule policy is not feasible. because when and
who and where to implemnt it?glibc,uclibc,android bionic.? can you
make sure they will implent the compatible policy? kernel is the best
place to do it.

and since linux is used for so many fields,why not provide different
feature for different system.by adding a new kenrel config item,say
CONFIG_REAL_TIME_SYSTEM, we can give cpu to rt task when throttle is
on,by disable CONFIG_REAL_TIME_SYSTEM,everything is keep untouched for
server and desktop.

i don't know if the viewpoint will offsend somebody, sorry first :)


> --
> Arjan van de Ven    ÂIntel Open Source Technology Centre
> For development, discussion and tips for power savings,
> visit http://www.lesswatts.org
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/