Messages in this thread | | | Subject | Re: [tip:sched/core] sched: Do not account irq time to current task | From | Raistlin <> | Date | Mon, 29 Nov 2010 18:06:35 +0100 |
| |
On Mon, 2010-11-29 at 22:22 +0800, Yong Zhang wrote: > > If you still want to throttle RT tasks simply ensure their bandwidth > > constraint is lower than the available time. > > But the available time is harder to calculated than before. > Well, it shouldn't... I would say it makes it easier! :-P
> IRQ is random, so as to the irq_time. > Well, that's definitely true, as it is true that the time needed to deal with IRQ is now somehow "lost" or "hidden" (meaning that it is not accounted to anyone).
> But the unthrottle(do_sched_rt_period_timer()) runs in fixed > period which is based on hard clock. > > Is that what we want? > I'm not sure I'm getting what the issue is here... Do you have an example do discuss? Because, referring to the one in your first e-mail, if in the last period (of 1sec) we spent 900ms running -rt tasks and 50ms servicing interrupts, given a limit was 950ms for sched_rt, why should we throttle them? :-O
Well, I see that this could mean that all we'd do in that period will be servicing interrupts and running -rt tasks (for _their_ last 50ms) but, also means (at least to me) that your system needs some more design effort. Then I can also agree on the point that it might make sense to think a bit on how to take the 50ms from interrupts somehow into account, but just charging -rt tasks for that time seems quite arbitrary... :-O
Something that I've done recently is trying to figure out, if interrupts handler have their own threads (as in PREEMPT_RT), what happens if you try constraining the bandwidth of those thread, using proper scheduling mechanisms (such as deadline scheduling, but rt-throttling could also be a "reasonable approximation" :-P)... But it's just preliminary research results.
BTW, having handlers in threads could actually be the solution per-se here, since they would then consume -rt bandwidth (if set to -rt) and contribute to throttling... :-)
Regards, Dario
-- <<This happens because I choose it to happen!>> (Raistlin Majere) ---------------------------------------------------------------------- Dario Faggioli, ReTiS Lab, Scuola Superiore Sant'Anna, Pisa (Italy)
http://retis.sssup.it/people/faggioli -- dario.faggioli@jabber.org [unhandled content-type:application/pgp-signature] | |